pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Re: Getting Metadata
3+ messages / 2 participants
[nested] [flat]

* Re: Getting Metadata
@ 2002-04-19 00:36  matt <vagnoni@uiuc.edu>
  0 siblings, 0 replies; 3+ messages in thread

From: matt @ 2002-04-19 00:36 UTC (permalink / raw)
  To: pgsql-docs

I need to be able to do this-

array columns = QUERY metadata ON table_name RETURN column_names;

That is, I am not sure how to query the metatables.  I need to get all the
column names for a given table (I'll have the name of the table) and put
that into an array, so I can access it while I am exporting the data from a
table.

I need to couple the col_name with the data for each column, to get my XML
extention to the copy command to work.

thanks
matt





^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Getting Metadata
@ 2002-04-19 00:47  matt <vagnoni@uiuc.edu>
  0 siblings, 1 reply; 3+ messages in thread

From: matt @ 2002-04-19 00:47 UTC (permalink / raw)
  To: pgsql-docs

That is how do i access pg_attribute within a program?  

Also, are the columns stored in order within pg_attribute?

thanks 
matt





^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Getting Metadata
@ 2002-04-19 01:35  Roberto Mello <rmello@cc.usu.edu>
  parent: matt <vagnoni@uiuc.edu>
  0 siblings, 0 replies; 3+ messages in thread

From: Roberto Mello @ 2002-04-19 01:35 UTC (permalink / raw)
  To: matt <vagnoni@uiuc.edu>; +Cc: pgsql-docs

On Thu, Apr 18, 2002 at 07:47:04PM -0500, matt wrote:
> That is how do i access pg_attribute within a program?  

With a regular SELECT.
 
> Also, are the columns stored in order within pg_attribute?

Go into psql and type "\d pg_attribute" like any other table.

If you want to see how psql does its internal queries (e.g. when you
run '\d table') run psql with the -E switch.

-Roberto
 
-- 
+----| http://fslc.usu.edu/ USU Free Software & GNU/Linux Club |------+
  Roberto Mello - Computer Science, USU - http://www.brasileiro.net/ 
       http://www.sdl.usu.edu/ - Space Dynamics Lab, Developer    
Newsbytes - Microsoft announce EDLIN for Windows.



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2002-04-19 01:35 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-04-19 00:36 Re: Getting Metadata matt <vagnoni@uiuc.edu>
2002-04-19 00:47 Re: Getting Metadata matt <vagnoni@uiuc.edu>
2002-04-19 01:35 ` Roberto Mello <rmello@cc.usu.edu>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox