Alter strings that don't belong to the application

Поиск
Список
Период
Сортировка
От Dennis Björklund
Тема Alter strings that don't belong to the application
Дата
Msg-id Pine.LNX.4.44.0306120836150.13332-100000@zigo.dhs.org
обсуждение исходный текст
Ответы Re: Alter strings that don't belong to the application  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
I've been looking into the code of psql to fix a problem with charsets and
noticed that psql changes the strings it gets back from functions like
PQfname() and PQgetvalue().

I can't find in the docs anything that says that it is okay to alter the
returned string. It works since it's allocated and stored in the PGresult
(I assume), so it's local to one result. But it's not obvious to me just
looking at the API that it's allowed.

Or should I read that the return value is "char *" and not "const char *" 
as it's okay to alter it?

-- 
/Dennis



В списке pgsql-hackers по дате отправления:

Предыдущее
От: "P.M"
Дата:
Сообщение: PostgreSQL and Windows
Следующее
От: Srikanth M
Дата:
Сообщение: Printing groupClause List