pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
C++/C interface functions to find tables in a database???
2+ messages / 2 participants
[nested] [flat]

* C++/C interface functions to find tables in a database???
@ 1998-01-26 13:14  SN14@chrysler.com
  0 siblings, 1 reply; 2+ messages in thread

From: SN14@chrysler.com @ 1998-01-26 13:14 UTC (permalink / raw)
  To: pgsql-interfaces


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

Thank you for the help.

Steven Nie




^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: [INTERFACES] C++/C interface functions to find tables in a database???
@ 1998-01-26 19:03  The Hermit Hacker <scrappy@hub.org>
  parent: SN14@chrysler.com
  0 siblings, 0 replies; 2+ messages in thread

From: The Hermit Hacker @ 1998-01-26 19:03 UTC (permalink / raw)
  To: SN14@chrysler.com; +Cc: pgsql-interfaces

On Mon, 26 Jan 1998 SN14@chrysler.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





^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~1998-01-26 19:03 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1998-01-26 13:14 C++/C interface functions to find tables in a database??? SN14@chrysler.com
1998-01-26 19:03 ` The Hermit Hacker <scrappy@hub.org>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox