| From: | Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> |
|---|---|
| To: | Dmitry Igrishin <dmitigr(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: Modifing returning value of PQgetvalue. |
| Date: | 2017-06-27 04:44:50 |
| Message-ID: | 0949f895-055c-6546-f8e6-77c82dee88fd@2ndquadrant.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On 6/24/17 06:31, Dmitry Igrishin wrote:
> 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.
This is just how the API is defined. It could be defined differently,
but it is not.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
| From | Date | Subject | |
|---|---|---|---|
| Next Message | sanyam jain | 2017-06-27 05:10:52 | Re: Logical decoding on standby |
| Previous Message | Michael Paquier | 2017-06-27 04:43:46 | Re: pg_basebackup fails on Windows when using tablespace mapping |