Обсуждение: field names
I'd like to check field names for various tables in our code. Is there a system table that lists the field names of each table? ...some way to query this information to run an error check?
Thanks
Jodi Kanter
Thanks
Jodi Kanter
--
_______________________________
Jodi L Kanter
BioInformatics Database Administrator
University of Virginia
(434) 924-2846
jkanter@virginia.edu
On Thu, Apr 21, 2005 at 02:37:53PM -0400, Jodi Kanter wrote: > I'd like to check field names for various tables in our code. Is there a > system table that lists the field names of each table? ...some way to > query this information to run an error check? Yes, pg_attribute. Or you could check the information_schema. See the docs on "system catalogs" in the Internals chapter. -- Alvaro Herrera (<alvherre[@]dcc.uchile.cl>) "Escucha y olvidarás; ve y recordarás; haz y entenderás" (Confucio)
On Thu, Apr 21, 2005 at 02:37:53PM -0400, Jodi Kanter wrote: > > I'd like to check field names for various tables in our code. Is there a > system table that lists the field names of each table? ...some way to > query this information to run an error check? See the "System Catalogs" and "The Information Schema" chapters in the documentation (the latter in 7.4 and later). -- Michael Fuhr http://www.fuhr.org/~mfuhr/