Re: [SQL] Inherited table identification possible

2012-05-25 Thread George Woodring
Thanks for all of the help, this was exactly what I was looking for. George On Thu, May 24, 2012 at 2:11 PM, Stephen Belcher wrote: > Yes, the system column "tableoid" identifies the actual table in which the > row is stored. If you cast this to "regclass" you'll get the name of the > table that

Re: [SQL] Inherited table identification possible

2012-05-24 Thread Stephen Belcher
Yes, the system column "tableoid" identifies the actual table in which the row is stored. If you cast this to "regclass" you'll get the name of the table that the row is stored in: SELECT tableoid::regclass FROM base_table; There's more documentation on this available at http://www.postgresql.org

Re: [SQL] Inherited table identification possible

2012-05-24 Thread Jonathan S. Katz
On May 24, 2012, at 2:01 PM, George Woodring wrote: > Is it possible to identify which inherited table data came from in a query? > We have a table that has 3 inherited tables attached to it. I am looking for > a way to identify the source of the data. > > My only thought would be to add a

[SQL] Inherited table identification possible

2012-05-24 Thread George Woodring
Is it possible to identify which inherited table data came from in a query? We have a table that has 3 inherited tables attached to it. I am looking for a way to identify the source of the data. My only thought would be to add a column to the tables that identify the table. I was just checking