Re: (no subject)

Bob Kimble <rjkimble-FrUbXkNCsVf2fBVCVOL8/[email protected]> Mon, 16 Aug 2004 11:42:55 -0400
Newsgroups gmane.comp.python.db.pypgsql.user
Message-ID <[email protected]>
On Monday 16 August 2004 10:28 am, Blyth A J C (Comp) wrote:
> I am trying execute the following and keep getting an error.
>
> self._query       =     "\d syslogdb"
> com.execute(self.query)
>
> What I can to do is to write a little program in python that will get a
> description (type definition) for a table.  -  HELP
>
>
> Andrew

One approach to consider is to run psql with the -E flag. Then when you run 
commands like "\d syslogdb", psql will show you the SQL it runs itself in 
order to retrieve the information. I think the reason your query fails is 
because a number of commands are run to get the result.

.... Bob


-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285