Re: Get a table name - Mailing list pgsql-jdbc

From Maciek Sakrejda
Subject Re: Get a table name
Date
Msg-id 895e58dd0912271412hbf14159w8b2d71600f098bc0@mail.gmail.com
Whole thread Raw
In response to Re: Get a table name  (Filip Rembiałkowski <filip.rembialkowski@gmail.com>)
Responses Re: Get a table name
List pgsql-jdbc
>In general, no. That's because resultset columns can be "entangled" in more complex way than "column a of table b".

Actually, this *is* defined at the protocol level:

From the RowDescription message at
http://developer.postgresql.org/pgdocs/postgres/protocol-message-formats.html
:
...

Then, for each field, there is the following:

String

    The field name.
Int32

    If the field can be identified as a column of a specific table,
the object ID of the table; otherwise zero.

...

No idea whether JDBC exposes this or whether the server actually sends
the correct oids, or if this is just part of the protocol as a
future-proofing attempt.

---
Maciek Sakrejda | Software Engineer | Truviso

1065 E. Hillsdale Blvd., Suite 230
Foster City, CA 94404
(650) 242-3500 Main
(650) 242-3501 F
www.truviso.com

pgsql-jdbc by date:

Previous
From: Filip Rembiałkowski
Date:
Subject: Re: Get a table name
Next
From: Oliver Jowett
Date:
Subject: Re: Get a table name