Re: libpq: What can and cannot be bound? How to know?

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Dominique Devienne <ddevienne(at)gmail(dot)com>
Cc: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>, pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: libpq: What can and cannot be bound? How to know?
Date: 2023-06-21 14:20:09
Message-ID: CAKFQuwY71m6fYEJEWwO13bs0tBPCXpGht=Yv-rygzd9qakLzqg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Jun 21, 2023 at 6:09 AM Dominique Devienne <ddevienne(at)gmail(dot)com>
wrote:

>
> I'm sure there are good technical reason. But from the outside, it is
> surprising and a bit inconsistent.
>
>
The planner is the thing that handles binds. The only things that are
planned are queries - i.e., SQL commands that are capable of producing
result sets from data within tables. I agree this seems like it should be
documented in places besides PREPARE.

Reworking that core design choice doesn't seem like a great use of time.
Especially when alternatives exist. Specifically, the pg_notify function
that can be parameterized and handles the SQL-injection stuff for you.

David J.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Marc Millas 2023-06-21 14:24:36 Re: pb with join plan
Previous Message Dominique Devienne 2023-06-21 13:09:51 Re: libpq: What can and cannot be bound? How to know?