Re: libpq: make PGresult* "const" in PQcmdStatus()/PQcmdTuples()?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jeroen Vermeulen <jtvjtv(at)gmail(dot)com>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: libpq: make PGresult* "const" in PQcmdStatus()/PQcmdTuples()?
Date: 2024-12-21 16:06:58
Message-ID: 860902.1734797218@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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:

/message-id/flat/NCBBLFLGLEIDHCJLONHNKEDGFJAA.mdklatt%40ou.edu

and here:

/message-id/flat/E1RaRtZ-0008aS-MK%40hans3

regards, tom lane

In response to

Browse pgsql-interfaces by date

  From Date Subject
Previous Message Jeroen Vermeulen 2024-12-21 15:59:03 Re: libpq: make PGresult* "const" in PQcmdStatus()/PQcmdTuples()?