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

From David G. Johnston
Subject Re: Postgresql 9.5 and Shell scripts/variables vs. C programming/defining a value to be used
Date
Msg-id CAKFQuwb-iiuL6x0kwbrWJ_suenCpN8UQ-HuO+xx+N_GXT7m=Xg@mail.gmail.com
Whole thread Raw
In response to Re: Postgresql 9.5 and Shell scripts/variables vs. C programming/defining a value to be used  (Poul Kristensen <bcc5226@gmail.com>)
Responses Re: Postgresql 9.5 and Shell scripts/variables vs. C programming/defining a value to be used
List pgsql-general
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.  What you are seeing is the "Prepare" component of a "prepare-execute".  When you execute you then see something like; "execute unnamed_query ['pg_database']" (note, I'm not familiar with the exact syntax and terminology that would appear in the log file).

David J.

pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: query locks up when run concurrently
Next
From: Tom Lane
Date:
Subject: Re: Postgresql 9.5 and Shell scripts/variables vs. C programming/defining a value to be used