From: | "Reggie Burnett" <rykr(at)bellsouth(dot)net> |
---|---|
To: | "'Dave Cramer'" <dave(at)fastcrypt(dot)com> |
Cc: | "'Hackers'" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: how do I get the table name from a query? |
Date: | 2003-01-27 14:59:02 |
Message-ID: | 00be01c2c614$a4bf20f0$c600a8c0@endeavor |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
So unless I parse the SQL statement myself, I can't tell anything about
the source table? To find out uniqueness, indexes, etc for fields in a
source table, I need the table name and have to execute queries against
pg_attribute and pg_indexes. But since the FE/BE doesn't return to me
the source table name, I would have to parse this myself?
Reggie
> -----Original Message-----
> From: pgsql-hackers-owner(at)postgresql(dot)org [mailto:pgsql-hackers-
> owner(at)postgresql(dot)org] On Behalf Of Dave Cramer
> Sent: Monday, January 27, 2003 8:42 AM
> To: Reggie Burnett
> Cc: 'Hackers'
> Subject: Re: [HACKERS] how do I get the table name from a query?
>
> Reggie,
>
> At the moment, you can't, but please comment on my request for
qualified
> column names. This is the same issue and there are many collateral
> issues which Tom has brought up.
>
> Dave
> On Mon, 2003-01-27 at 09:30, Reggie Burnett wrote:
> > When using the FE/BE, how do I retrieve the table name for a given
> > column? Say I had the following SQL:
> >
> >
> >
> > Select c.id, c.name, d.phone from Members c, Addresses d where c.id
<
> > 200
> >
> >
> >
> > From the docs of the FE/BE, I would see that the fields are named
id,
> > name, phone but how do I find out the source tables that each field
> > came from? I need to know this to discover nullability of fields,
> > uniqueness, etc.
> >
> >
> >
> > Thanks
> >
> > Reggie
> --
> Dave Cramer <dave(at)fastcrypt(dot)com>
> Cramer Consulting
>
>
> ---------------------------(end of
broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
From | Date | Subject | |
---|---|---|---|
Next Message | Boris Klug | 2003-01-27 15:05:30 | Please include hier-patch in next PostgreSQL version |
Previous Message | Reggie Burnett | 2003-01-27 14:53:51 | Re: Request for qualified column names |