On 2005-04-24, Alan Chandler <[EMAIL PROTECTED]> wrote: > I am rather new to Postgres (running 7.4) but I am trying to port some PHP > code that has been built to run with mysql. > > I have got stuck trying to find the equivalent of the Mysql "DESCRIBE ><tablename>;" SQL statement that lists the columns and type identifiers of a > table. > > I think I am going to do a SELECT on the "pg_attribute" table,
Steer clear of reading the system catalogs directly; getting the right answers from them can be much harder than it appears, since they are organized purely for the convenience of the backend. For this specific task, information_schema.columns should be pretty close to what you need. -- Andrew, Supernews http://www.supernews.com - individual and corporate NNTP services ---------------------------(end of broadcast)--------------------------- TIP 7: don't forget to increase your free space map settings