Also, try psql -E, and then \d and the other commands. When ECHO_HIDDEN is set (either by -E, or by issuing \set ECHO_HIDDEN), all the commands print their corresponding SQL queries first :)
-- G. On 2006.01.27. 11:53, Bart Samwel wrote: > David Pessel wrote: >> Hi, >> >> I'm using the libpqxx library and im doing fine but one thing i can't >> figure it out how it should work. >> I need to get table information. To MySQL i can simply use the following >> Syntax: 'DESC <tablename>' >> So to PostgreSQL i use an escape command like this: '\d "<tablename>"' >> Now i thought simply use this command in the transaction.exec() function. >> But i get a Syntax-Error. >> I tried with objects 'transaction<>' and 'nontransaction' but its the same >> result. > > The \d command is a command of the psql database client, not a > PostgreSQL database native command. If you want to access this > information, you want to access the metadata tables, contained in the > schema "information_schema". Use this post as a starter: > > http://archives.postgresql.org/pgsql-admin/2003-10/msg00374.php > > --Bart > _______________________________________________ > Libpqxx-general mailing list > [email protected] > http://gborg.postgresql.org/mailman/listinfo/libpqxx-general > _______________________________________________ Libpqxx-general mailing list [email protected] http://gborg.postgresql.org/mailman/listinfo/libpqxx-general
