Re: libpq: make PGresult* "const" in PQcmdStatus()/PQcmdTuples()? - Mailing list pgsql-interfaces

From Tom Lane
Subject Re: libpq: make PGresult* "const" in PQcmdStatus()/PQcmdTuples()?
Date
Msg-id 860902.1734797218@sss.pgh.pa.us
Whole thread Raw
In response to Re: libpq: make PGresult* "const" in PQcmdStatus()/PQcmdTuples()?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-interfaces
I wrote:
> Both of those return pointers to res->cmdStatus, so it would not make
> any sense to const-ify the argument unless you also const-ify the
> result; which would cause compiler warnings for users.  I'm pretty
> sure we've explicitly rejected making this change for that reason.

[ digs in archives... ]

See previous discussions here:

https://www.postgresql.org/message-id/flat/NCBBLFLGLEIDHCJLONHNKEDGFJAA.mdklatt%40ou.edu

and here:

https://www.postgresql.org/message-id/flat/E1RaRtZ-0008aS-MK%40hans3

            regards, tom lane



pgsql-interfaces by date:

Previous
From: Jeroen Vermeulen
Date:
Subject: Re: libpq: make PGresult* "const" in PQcmdStatus()/PQcmdTuples()?