Return value if table doesn't exist

From: Paul M Foster <paulf(at)quillandmouse(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Return value if table doesn't exist
Date: 2002-04-02 02:18:24
Message-ID: 20020401211824.A24228@quillandmouse.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

In the C++ interface, if one sends a query to the backend (via
ExecTuplesOk()) about a table, how do you tell if the table doesn't
exist? It appears that ExecTuplesOk() simply returns PGRES_EMPTY_QUERY,
and ConnectionBad() returns false. The only way I can see to tell if the
table doesn't exist is by checking ErrorMessage(). That seems pretty
goofy. This is pgsql 7.1.3.

Any ideas?

Paul

Browse pgsql-general by date

  From Date Subject
Next Message Richard Emberson 2002-04-02 03:00:05 Re: %ROWTYPE as PL/pgsql argument
Previous Message Tom Lane 2002-04-02 01:54:08 Re: %ROWTYPE as PL/pgsql argument