Re: [INTERFACES] C++/C interface functions to find tables in a database???

From: The Hermit Hacker <scrappy(at)hub(dot)org>
To: SN14(at)chrysler(dot)com
Cc: pgsql-interfaces(at)postgreSQL(dot)org
Subject: Re: [INTERFACES] C++/C interface functions to find tables in a database???
Date: 1998-01-26 19:03:47
Message-ID: Pine.NEB.3.95.980126140015.1373P-100000@hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

On Mon, 26 Jan 1998 SN14(at)chrysler(dot)com wrote:

>
> I need C/C++ interface functions to find all tables in a database and all the
> fields in a table.

Check out 'man libpq' for the PQfname() function...you'll want to do a
'SELECT * from <table> WHERE oid = 0'; which will return zero results, but
will give you the fields to grab using PQfname()

Can't help with the tables though...you'll want to look at 'man catalogs'

Another good place to look is psql.c, which has the various 'SELECT'
statements used in psql for calling up tables and whatnot

In response to

Browse pgsql-interfaces by date

  From Date Subject
Next Message Stefan Ratschan 1998-02-01 20:24:05 Inserting NULL values via PgAccess
Previous Message SN14 1998-01-26 13:14:51 C++/C interface functions to find tables in a database???