Re: database design questions - Mailing list pgsql-general

From hubert depesz lubaczewski
Subject Re: database design questions
Date
Msg-id 9e4684ce0604050033w321a816hac33f4b9c7e16736@mail.gmail.com
Whole thread Raw
In response to Re: database design questions  (Ottavio Campana <ottavio@campana.vi.it>)
List pgsql-general
On 4/4/06, Ottavio Campana <ottavio@campana.vi.it> wrote:
hubert depesz lubaczewski wrote:
>     2) do you think it's possible in  a plpgsql procedure select the name of
>     a table into a variable and use that variable in the query?
> possible, but not really good way. read about 'execute' in plpgsql.
why isn't it good?
I mean, from my point of view is like a function accepting a pointer. In
many languages it is used.

when coding in plpgsql you have to use dynamic queries to use this kind of thing. this - by itself - is not bad. but it has certain performance penalty when compared to standard queries.
i think reading plpgsql's manual about "execute" is the best one can do about it :)

best regards

depesz

pgsql-general by date:

Previous
From: Don Y
Date:
Subject: Re: User defined data type
Next
From: "Chris Velevitch"
Date:
Subject: pg_dump and copy command