Re: libq API question - Mailing list pgsql-general

From David G. Johnston
Subject Re: libq API question
Date
Msg-id CAKFQuwZopezTfKnORWFod2Jqr1+BgFTEvb7+kvw=o-ELwtmKEg@mail.gmail.com
Whole thread
In response to libq API question  (Igor Korot <ikorot01@gmail.com>)
List pgsql-general
On Thursday, March 12, 2026, Igor Korot <ikorot01@gmail.com> 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.

pgsql-general by date:

Previous
From: Igor Korot
Date:
Subject: libq API question
Next
From: Igor Korot
Date:
Subject: POprepare fails