Re: Postgresql 9.5 and Shell scripts/variables vs. C programming/defining a value to be used

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Poul Kristensen <bcc5226(at)gmail(dot)com>
Cc: John McKown <john(dot)archie(dot)mckown(at)gmail(dot)com>, PostgreSQL General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Postgresql 9.5 and Shell scripts/variables vs. C programming/defining a value to be used
Date: 2016-11-23 15:25:38
Message-ID: CAKFQuwb-iiuL6x0kwbrWJ_suenCpN8UQ-HuO+xx+N_GXT7m=Xg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Nov 23, 2016 at 3:46 AM, Poul Kristensen <bcc5226(at)gmail(dot)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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2016-11-23 15:44:14 Re: Postgresql 9.5 and Shell scripts/variables vs. C programming/defining a value to be used
Previous Message Adrian Klaver 2016-11-23 15:25:36 Re: query locks up when run concurrently