Thread: attributes of columns from a table in postgresql database
Hi, I am trying to read the attributes of columns from a database table in postgresql Can you please help me.. this is an important task with a very short deadline Thank you ahead,
On Fri, May 08, 2009 at 10:02:28AM -0600, Pallayya Sarma Karra wrote: > Hi, > > I am trying to read the attributes of columns from a database table in > postgresql What do you mean, exactly? You probably want the pg_attribute table, which describes each row in a table (its name, type, etc.). - Josh / eggyknap
Attachment
Hi, Thank you very much. I find pg_attribute table contains the info I am looking for. But I am not able to build a query, which should read the properties of columns of a table from a source database and populate tables of a destination database. In the destination database, there would be a table for each property of the column. For example, there would be a table in destination database for default_value. Hence, if source database contains 2 tables with 10 columns each and we are interested in collecting 6 different properties for each column, the destination database would contain 6 tables with 20 rows each. Please help me in this task.I am novice database programmer. I tried hard but it is being tough for me to store the results after reading the source database and them populating them into the destination database. Thanks in advance, Pallayya Sarma Karra