Re: Postgresql 9.5 and Shell scripts/variables vs. C programming/defining a value to be used - Mailing list pgsql-general

From Tom Lane
Subject Re: Postgresql 9.5 and Shell scripts/variables vs. C programming/defining a value to be used
Date
Msg-id 28320.1479915854@sss.pgh.pa.us
Whole thread Raw
In response to Re: Postgresql 9.5 and Shell scripts/variables vs. C programming/defining a value to be used  ("David G. Johnston" <david.g.johnston@gmail.com>)
Responses Re: Postgresql 9.5 and Shell scripts/variables vs. C programming/defining a value to be used
List pgsql-general
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> On Wed, Nov 23, 2016 at 3:46 AM, Poul Kristensen <bcc5226@gmail.com> wrote:
>> In the postgresql.log I get "select datname from $1".

> ​That is expected when you parameterize a query - the query string includes
> parameter​s instead of values.

It looks like Poul is hoping to use a parameter as a table name,
which doesn't work.  Parameters can only represent values (constants).

            regards, tom lane


pgsql-general by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: Postgresql 9.5 and Shell scripts/variables vs. C programming/defining a value to be used
Next
From: Adrian Klaver
Date:
Subject: Re: [SPAM] Re: Best practices to manage custom statistics