Re: type of a field

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



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


[Index of Archives]     [Postgresql General]     [Postgresql Admin]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Yosemite Backpacking]     [Postgresql Jobs]

  Powered by Linux