public inbox for [email protected]
help / color / mirror / Atom feedFrom: Giacomo Cavalieri <[email protected]>
To: [email protected]
Subject: Figure out nullability of query parameters
Date: Fri, 27 Jun 2025 16:30:41 +0200
Message-ID: <[email protected]> (raw)
Hello!
I’m Giacomo, I’m the maintainer of <https://github.com/giacomocavalieri/squirrel;, a tool that can generate type safe bindings to run and decode the results of Postgres queries. It does that by implementing the extended query protocol, which, among other things, returns the OIDs of the query parameters’ types.
This is really handy and has worked great so far but I’m running into some rough edges when it comes to the nullability of query parameters.
Take a query like this one:
```
insert into some_table(not_null_col, nullable_column)
values ($1, $2)
```
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?
Sorry if this is not the proper list, I’m very new to all of this :)
Thanks!
Giacomo
view thread (2+ messages) latest in thread
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 using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: Figure out nullability of query parameters
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox