Return value if table doesn't exist

From: Paul M Foster <paulf(at)quillandmouse(dot)com>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: Return value if table doesn't exist
Date: 2002-03-31 22:15:50
Message-ID: 20020331171550.A12256@quillandmouse.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

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-interfaces by date

  From Date Subject
Next Message Christof Petig 2002-04-01 20:30:55 Re: A dynamic SQL/ecpg question
Previous Message Bruce Momjian 2002-03-28 16:17:18 Re: PyGreSQL bug