Re: Research on ?? operators

From: Steve Atkins <steve(at)blighty(dot)com>
To: PG mailing List <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Research on ?? operators
Date: 2019-06-04 12:44:34
Message-ID: 3C01A915-4C26-4803-81BD-2F68B304019F@blighty.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> On Jun 4, 2019, at 1:35 PM, Michael Lewis <mlewis(at)entrata(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jeremy Finzel 2019-06-04 13:37:22 Re: Questions about btree_gin vs btree_gist for low cardinality columns
Previous Message Matteo Beccati 2019-06-04 12:40:25 Re: Research on ?? operators