Re: dynamic table naming in function

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Matthew Peter <survivedsushi(at)yahoo(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: dynamic table naming in function
Date: 2005-10-29 18:14:08
Message-ID: 20051029181408.GA14086@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sat, Oct 29, 2005 at 10:45:21 -0700,
Matthew Peter <survivedsushi(at)yahoo(dot)com> wrote:
> Out of curiosity, I was wondering if it is possible to
> use dynamic table names in a function? AND whether or
> not you can test a value prior to insert to see
> whether or not you want to update that column. Where
> you could pass in the name of the table for it use ANY
> name passed in rather than statically defining it.

You can use the EXECUTE statement to do this kind of thing.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2005-10-29 18:16:26 Re: dynamic table naming in function
Previous Message Matthew Peter 2005-10-29 17:45:21 dynamic table naming in function