Re: dynamic table/col names in plpgsql

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: gary jefferson <garyjefferson123(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: dynamic table/col names in plpgsql
Date: 2007-06-26 13:24:26
Message-ID: 20070626132426.GA14962@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sat, Jun 23, 2007 at 09:43:01PM -0600, gary jefferson wrote:
> Is there a way to use a variable as the name of a table or column in
> plpgsql?

No, plpgsql is statically typed, it can't handle the possiblity of the
types of variables changing. Use a more dynamic
language(perl/tcl/python/etc...)

Have a nice day,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Rafal Pietrak 2007-06-26 13:42:33 Re: a JOIN on same table, but 'slided over'
Previous Message Michael Glaesemann 2007-06-26 12:56:30 Re: yet another simple SQL question