Modifing returning value of PQgetvalue.

From: Dmitry Igrishin <dmitigr(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Modifing returning value of PQgetvalue.
Date: 2017-06-24 10:31:54
Message-ID: CAAfz9KO_yfJ96EknhfMPCqAq8+1m9m9k4DJrAnAUMBEWGJpOxg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello,

PQgetvalue returns a value of type char* (without const). But the
documentation says:
"The pointer returned by PQgetvalue points to storage that is part of the
PGresult structure. *One should not modify the data it points to*" (my
italics). Could someone tell me please, what wrong with modifing arbitrary
character of the data pointed by PQgetvalue's returning value? Or why this
restriction is documented? Thanks.

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2017-06-24 12:54:34 Re: Fix a typo in snapmgr.c
Previous Message Tom Lane 2017-06-24 05:51:20 Re: FIPS mode?