pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Steve Atkins <steve@blighty.com>
To: PG mailing List <pgsql-general@lists.postgresql.org>
Subject: Re: Research on ?? operators
Date: Tue, 4 Jun 2019 13:44:34 +0100
Message-ID: <3C01A915-4C26-4803-81BD-2F68B304019F@blighty.com> (raw)
In-Reply-To: <CAHOFxGo88Ubed_DhJn4JcsL9FODx5q26O2gYo5PCcCEE1oRRmw@mail.gmail.com>
References: <4b588eb1-a3af-3e25-c1f1-16fb93e602e3@beccati.com>
	<D5829AF7-2F39-44E2-81C0-D2AE19BD7D02@blighty.com>
	<9e74ec66-8fbf-a2b1-dbde-c6808ded6a94@beccati.com>
	<CAHOFxGo88Ubed_DhJn4JcsL9FODx5q26O2gYo5PCcCEE1oRRmw@mail.gmail.com>



> On Jun 4, 2019, at 1:35 PM, Michael Lewis <mlewis@entrata.com> wrote:
> 
> ":foo" named placeholders
> 
> If I may, is this supported natively in Postgres prepared statements?

It's not. The only type we support are numbered $1 type placeholders.

> Can I see an example? I do not care much for the numbers of positional placeholders and would love to use names instead if possible.

It'd be nice. They're supported via rewriting at the driver level in some drivers, and I've written shims to convert them in an app a few times and it makes for much more readable - and bug-resistant - code.

Supporting it at the protocol level would be very nice.

Cheers,
  Steve




view thread (8+ messages)

Message-ID: <3C01A915-4C26-4803-81BD-2F68B304019F@blighty.com>
Permalink:  ../3C01A915-4C26-4803-81BD-2F68B304019F@blighty.com/
Also on:    postgresql.org/message-id/3C01A915-4C26-4803-81BD-2F68B304019F@blighty.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: steve@blighty.com
  Subject: Re: Research on ?? operators
  In-Reply-To: <3C01A915-4C26-4803-81BD-2F68B304019F@blighty.com>
  References: <4b588eb1-a3af-3e25-c1f1-16fb93e602e3@beccati.com> <D5829AF7-2F39-44E2-81C0-D2AE19BD7D02@blighty.com> <9e74ec66-8fbf-a2b1-dbde-c6808ded6a94@beccati.com> <CAHOFxGo88Ubed_DhJn4JcsL9FODx5q26O2gYo5PCcCEE1oRRmw@mail.gmail.com> <3C01A915-4C26-4803-81BD-2F68B304019F@blighty.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox