Re: use of alias - Mailing list pgsql-hackers

From Brendan Jurd
Subject Re: use of alias
Date
Msg-id 37ed240d0802112159s6595da16i188c235853cfa2ce@mail.gmail.com
Whole thread Raw
In response to Re: use of alias  (Brett McBride <brett@deakin.edu.au>)
List pgsql-hackers
Though to be safe you should be quoting MT and ST with quote_ident()
before putting them into a dynamic statement.

Cheers
BJ

On Feb 12, 2008 4:38 PM, Brett McBride <brett@deakin.edu.au> wrote:
> you could do this with 'execute' like so:
>
> execute 'select  count(*) into count1 from ' || MT || ',' || ST || '
> where ' || MT || '.phonenumber= ' || ST || '.phonenumber' into v_variable;
>
> brett


pgsql-hackers by date:

Previous
From: Brett McBride
Date:
Subject: Re: use of alias
Next
From: Matteo Beccati
Date:
Subject: Re: patternsel() and histogram_selectivity() and the hard cutoff of 100