Re: SHOW
| От | Stephan Bergmann |
|---|---|
| Тема | Re: SHOW |
| Дата | |
| Msg-id | 3B94E93F.432272BC@ows.es обсуждение исходный текст |
| Ответ на | Re: SHOW (bpalmer <bpalmer@crimelabs.net>) |
| Список | pgsql-general |
Hi! > > Hmm, works for me. What version of Postgres are you using? I'm using 7.1.3 on Linux (compiled using the sources of pg). But thanx to the output list of Oliver I now have the result: how to get the header names of a table using the libpq. It's very interesting, that using PostgreSQL I need to build a huge query string: sprintf(pgquery2, "SELECT a.attname FROM pg_class c, pg_attribute a WHERE c.relname = '%s' AND a.attnum > 0 AND a.attrelid = c.oid;", ThisDBFileName); pgres = PQexec(pgsock2, pgquery2); ...when using e.g. MySQL I only need 4 words: sprintf(myquery2, "SHOW COLUMNS FROM %s", ThisDBFileName); if (mysql_query(mysql2, myquery2)) (...) Thanx Steve
В списке pgsql-general по дате отправления: