[GENERAL] dynamic table/col names in plpgsql

2007-06-23 Thread gary jefferson
Is there a way to use a variable as the name of a table or column in plpgsql? This might be a simple question, but I can't find the answer in the docs. http://www.postgresql.org/docs/8.2/interactive/plpgsql-declarations.html hints that there are data types that correspond to table/column, but I

Re: [GENERAL] dynamic table/col names in plpgsql

2007-06-25 Thread gary jefferson
ind an example snippet of how to accomplish this in the pg docs. Where should I be looking? Thanks again! Gary On 6/23/07, Michael Glaesemann <[EMAIL PROTECTED]> wrote: On Jun 23, 2007, at 22:47 , gary jefferson wrote: > Is there a way to use a variable as the name of a table or colum

Re: [GENERAL] dynamic table/col names in plpgsql

2007-06-25 Thread gary jefferson
query). The column names are the same for both tables, so all other parts of the query should remain relatively static. Its just the table name I need to be dynamic with. Thanks, Gary On 6/25/07, gary jefferson <[EMAIL PROTECTED]> wrote: Thanks Michael and Steve. Related question: If I p

[GENERAL] dynamic table/col names in plpgsql

2007-06-25 Thread gary jefferson
Is there a way to use a variable as the name of a table or column in plpgsql? This might be a simple question, but I can't find the answer in the docs. http://www.postgresql.org/docs/8.2/interactive/plpgsql-declarations.html hints that there are data types that correspond to table/column, but I