Re: type of a field

From: knut(dot)suebert(at)web(dot)de
To: pgsql-php(at)postgresql(dot)org
Subject: Re: type of a field
Date: 2002-05-02 19:55:59
Message-ID: 20020502195559.GB12934@web.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-php

ameen eetemadi schrieb:

> I want to know the type of a field in a table how can I khow it ?

pg_fieldtype()

or something like

SELECT a.attname, format_type(a.atttypid, a.atttypmod)
FROM pg_class c, pg_attribute a
WHERE c.relname = '$tablename'
AND a.attnum > 0 AND a.attrelid = c.oid
ORDER BY a.attnum;

?

Bye,
Knut Sübert

In response to

Browse pgsql-php by date

  From Date Subject
Next Message Dave Page 2002-05-02 20:38:00 Re: [PHP] sql commands
Previous Message Josh Berkus 2002-05-02 16:49:03 Re: type of a field