Re: psql's FETCH_COUNT (cursor) is not being respected for CTEs - Mailing list pgsql-hackers

From Daniel Verite
Subject Re: psql's FETCH_COUNT (cursor) is not being respected for CTEs
Date
Msg-id 092583fb-97c5-428f-8d99-fd31be4a5290@manitou-mail.org
Whole thread Raw
In response to Re: psql's FETCH_COUNT (cursor) is not being respected for CTEs  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: psql's FETCH_COUNT (cursor) is not being respected for CTEs
List pgsql-hackers
    Tom Lane wrote:

> This gives me several "-Wincompatible-pointer-types" warnings
> [...]
> I think what you probably ought to do to avoid all that is to change
> the arguments of PrintQueryResult and nearby routines to be "const
> PGresult *result" not just "PGresult *result".

The const-ness issue that I ignored in the previous patch is that
while C is fine with passing T* to a function expecting const T*, it's
not okay with passing T** to a function expecting const T**,
or more generally converting T** to const T**.

When callers need to pass arrays of PGresult* instead of const
PGresult*, I've opted to remove the const qualifiers for the functions
that are concerned by this change.


PFA an updated patch.


Best regards,
--
Daniel Vérité
https://postgresql.verite.pro/
Twitter: @DanielVerite

Attachment

pgsql-hackers by date:

Previous
From: Matthias van de Meent
Date:
Subject: Re: HOT readme missing documentation on summarizing index handling
Next
From: Gurjeet Singh
Date:
Subject: Re: [17] CREATE COLLATION default provider