Re: Correct pg_type for a list of columns with SELECT?

John R Pierce <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.dbi.general
Message-ID <[email protected]>
On 11/24/2013 10:05 AM, dome stuff wrote:
>
> $1 contains a comma delimited list of column names.
>
> I can run the query on the CLI and it works. If I swap the question 
> mark that is $1 in the query, with a static column list, the query 
> works in perl. Presumably I should be able to pass a column list as a 
> variable when preparing a statement, but apparently I'm not getting 
> the type correct?

You are not supposed to be able to do that in SQL.   parameters can only 
be used for data values, not field names or other statement components.

-- 
john r pierce                                      37N 122W
somewhere on the middle of the left coast
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.