Обсуждение: pg environment? metadata?

Поиск
Список
Период
Сортировка

pg environment? metadata?

От
"Martin Matusiak"
Дата:

> Hello,
>
> I was wondering what kind of functions/constants exist in Postgre to dig
up
> metadata. I barely scratched the surface of Oracle but I know you find
> things like user_tables there that can be used to extract info about your
> tables. What I'm looking for is some kind of functions to extract column
> names, possibly data types, etc. And by that I don't mean console
commands,
> sql statements that will do the job with tcp/ip.
>
> Moreover, are there any ANSI standards for this kind of thing? Or each one
> to his own?
>
>
> Martin
>




Re: pg environment? metadata?

От
Christoph Haller
Дата:
> >
> > I was wondering what kind of functions/constants exist in Postgre to
dig
> up
> > metadata. I barely scratched the surface of Oracle but I know you
find
> > things like user_tables there that can be used to extract info about
your
> > tables. What I'm looking for is some kind of functions to extract
column
> > names, possibly data types, etc. And by that I don't mean console
> commands,
> > sql statements that will do the job with tcp/ip.
> >
> > Moreover, are there any ANSI standards for this kind of thing? Or
each one
> > to his own?
> >
Refer to the System Catalogs chapter within the Developer's Guide
section
of the documentation. In addition, if you start a psql session with the
-E option,
you will see how all these \d commands are generated.
I would love to hear there is a standard about system catalogs, but I've
never heard
of one and I doubt there will be one ever in the future.

Regards, Christoph




Re: pg environment? metadata?

От
Bruno Wolff III
Дата:
On Tue, Feb 18, 2003 at 13:13:30 +0100, Christoph Haller <ch@rodos.fzk.de> wrote:
> > >
> > > Moreover, are there any ANSI standards for this kind of thing? Or
> each one
> > > to his own?

Based on discussions in the past that I have loosely followed, I believe
there is some kind of standard and that views implementing some of this
standard are slated to go into 7.4.


Re: pg environment? metadata?

От
Christopher Kings-Lynne
Дата:
> On Tue, Feb 18, 2003 at 13:13:30 +0100,
>   Christoph Haller <ch@rodos.fzk.de> wrote:
> > > >
> > > > Moreover, are there any ANSI standards for this kind of thing? Or
> > each one
> > > > to his own?
>
> Based on discussions in the past that I have loosely followed, I believe
> there is some kind of standard and that views implementing some of this
> standard are slated to go into 7.4.

Well, if you're referring to the standard INFORMATION_SCHEMA, it is
already in 7.4 and it is standard.  You can't inspect it to find out
postgres-specific information tho.  You can actually grab the
information_schema.sql from 7.4 CVS and install it into 7.3 to create a
new 'information_schema' quite happily though.

Regards,

Chris