dynamic table/col names in plpgsql

From: "gary jefferson" <garyjefferson123(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: dynamic table/col names in plpgsql
Date: 2007-06-24 03:43:01
Message-ID: 62ad745a0706232043i49de3d50s948374be309e56b2@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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
don't see them listed here
http://www.postgresql.org/docs/8.2/interactive/datatype.html ...

Also, I assume that once I figure out the right datatypes, I can
assign to them from functions like substring()?

Thanks,
Gary

Responses

Browse pgsql-general by date

  From Date Subject
Next Message gary jefferson 2007-06-24 03:47:14 dynamic table/col names in plpgsql
Previous Message Michael Glaesemann 2007-06-24 03:16:47 Re: Table Names