Re: [GENERAL] stored function data structures - difficulty

2011-11-29 Thread Pavel Stehule
Hello 2011/11/29 J.V. : > 1) > What is "a1" ? a1 is table name > > 2) > Where did the queries below come from? > These queries are used in "psql" console to ensure run backslash commands > 3) > What information does each query below provide? columns names, column types and other Regards Pavel

Re: [GENERAL] stored function data structures - difficulty

2011-11-29 Thread J.V.
1) What is "a1" ? 2) Where did the queries below come from? 3) What information does each query below provide? On 11/21/2011 9:14 PM, Pavel Stehule wrote: Hello 2011/11/22 J.V.: I cannot find a way to programatically: 1. Given a table name, find all foreign key fields in the given table

Re: [GENERAL] stored function data structures - difficulty

2011-11-21 Thread Pavel Stehule
Hello 2011/11/22 J.V. : > > I cannot find a way to programatically: >    1.  Given a table name, find all foreign key fields in the given table by > field name (column name) >    2.  Given a single foreign key field name, programatically look up the > corresponding reference table name and the ref

Re: [GENERAL] stored function data structures - difficulty

2011-11-21 Thread Mike Blackwell
Take a look at http://www.postgresql.org/docs/9.1/interactive/information-schema.html and http://www.postgresql.org/docs/9.1/interactive/catalogs.html. I think you'll find what you need. The former is relatively stable between releases, while the latter has more detail but is subject to change.

[GENERAL] stored function data structures - difficulty

2011-11-21 Thread J.V.
I cannot find a way to programatically: 1. Given a table name, find all foreign key fields in the given table by field name (column name) 2. Given a single foreign key field name, programatically look up the corresponding reference table name and the reference primary key field so h