public inbox for [email protected]
help / color / mirror / Atom feedlibq API question
2+ messages / 2 participants
[nested] [flat]
* libq API question
@ 2026-03-12 22:35 Igor Korot <[email protected]>
2026-03-12 22:39 ` Re: libq API question David G. Johnston <[email protected]>
0 siblings, 1 reply; 2+ messages in thread
From: Igor Korot @ 2026-03-12 22:35 UTC (permalink / raw)
To: pgsql-generallists.postgresql.org <[email protected]>
Hi, ALL,
In the docs I see the following:
[quote]
PGresult *PQexecParams(PGconn *conn,
const char *command,
int nParams,
const Oid *paramTypes,
const char * const *paramValues,
const int *paramLengths,
const int *paramFormats,
int resultFormat);
[/quote]
Is there a reason why the parameters are int and not unsigned int?
There is no way the length can be negative...
Is it for backward compatibility?
Thank you.
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: libq API question
2026-03-12 22:35 libq API question Igor Korot <[email protected]>
@ 2026-03-12 22:39 ` David G. Johnston <[email protected]>
0 siblings, 0 replies; 2+ messages in thread
From: David G. Johnston @ 2026-03-12 22:39 UTC (permalink / raw)
To: Igor Korot <[email protected]>; +Cc: pgsql-generallists.postgresql.org <[email protected]>
On Thursday, March 12, 2026, Igor Korot <[email protected]> wrote:
> Hi, ALL,
>
> In the docs I see the following:
>
> [quote]
>
> PGresult *PQexecParams(PGconn *conn,
> const char *command,
> int nParams,
> const Oid *paramTypes,
> const char * const *paramValues,
> const int *paramLengths,
> const int *paramFormats,
> int resultFormat);
> [/quote]
>
> Is there a reason why the parameters are int and not unsigned int?
>
Unsigned ints are, I believe, less performant, and losing half the value
space is immaterial here.
David J.
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2026-03-12 22:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-03-12 22:35 libq API question Igor Korot <[email protected]>
2026-03-12 22:39 ` David G. Johnston <[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