Begin <karas.2ljbxz (AT) no-mx (DOT) forums.yourdomain.com.au>
On 2007-02-05, karas <karas.2ljbxz (AT) no-mx (DOT) forums.yourdomain.com.au> wrote:
Quote:
Is there a way to retrieve data from database about specific table
using some client interface in C or PHP? |
Obviously, yes; the commandline utility does use libpq.
Quote:
For example, if we have some table with few indexes and rules, how
to check if an index or rule exists? How to check if a given table
exists within a database? -PQexec-() can't be used because it is a
query function. |
There is an `information schema' documented in the manual that might
provide the information you are looking for. Chapter 32 of the 8.2
handbook. Say;
select * from information_schema.tables;
The specifics are left as an excercise. If that does not work for you,
you might have to query the postgresql specific system tables instead.
Oh, and you might consider not using someone's forum-to-usenet gateway
but using usenet directly instead. Some people do object to having their
usenet posts forum-ified that way. I don't like finding my usenet posts
redone as if on random forums that I never knew existed, for one.
It also invites posting habits that are frowned upon on usenet.
--
j p d (at) d s b (dot) t u d e l f t (dot) n l .
This message was originally posted on Usenet in plain text.
Any other representation, additions, or changes do not have my
consent and may be a violation of international copyright law.