public inbox for [email protected]  
help / color / mirror / Atom feed
Re: Figure out nullability of query parameters
2+ messages / 2 participants
[nested] [flat]

* Re: Figure out nullability of query parameters
@ 2025-06-27 14:52  David G. Johnston <[email protected]>
  0 siblings, 1 reply; 2+ messages in thread

From: David G. Johnston @ 2025-06-27 14:52 UTC (permalink / raw)
  To: Giacomo Cavalieri <[email protected]>; +Cc: [email protected] <[email protected]>

On Friday, June 27, 2025, Giacomo Cavalieri <[email protected]>
wrote:

>
> It would be really handy to know that `$1` is being used as a non nullable
> value, while `$2` could actually be null. Can this already be achieve
> today, or would there be a way to surface this kind of information for
> query parameters in the extended protocol?
>

There is no attempt in the system to try and pass constraint information
through the query planner and expose it to the client.  It doesn’t seem
like there is sufficient utility to try and do so.  The fact that it pretty
much only works in the exact query form you’ve shown here is part of that.
Not sure we’d turn it down but someone will need to step up and scratch
their own itch in all likelihood (the request for similar functionality in
the result comes up too).

David J.


^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Figure out nullability of query parameters
@ 2025-06-27 15:15  Greg Sabino Mullane <[email protected]>
  parent: David G. Johnston <[email protected]>
  0 siblings, 0 replies; 2+ messages in thread

From: Greg Sabino Mullane @ 2025-06-27 15:15 UTC (permalink / raw)
  To: David G. Johnston <[email protected]>; +Cc: Giacomo Cavalieri <[email protected]>; [email protected] <[email protected]>

>
> It would be really handy to know that `$1` is being used as a non nullable
> value


To push back in a different way, how exactly would this be useful?

The system catalogs are the best place to get all the various information
about a relation, including any and all constraints. Data type info via
protocol, yes, but constraints seems a whole other level of bother.

Cheers,
Greg

--
Crunchy Data - https://www.crunchydata.com
Enterprise Postgres Software Products & Tech Support


^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2025-06-27 15:15 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-06-27 14:52 Re: Figure out nullability of query parameters David G. Johnston <[email protected]>
2025-06-27 15:15 ` Greg Sabino Mullane <[email protected]>

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