=?ISO-8859-1?Q?Dennis_Bj=F6rklund?= <db(at)zigo(dot)dhs(dot)org> writes:
> 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'd call that a bug in psql. Where do you see it happening exactly?
> Or should I read that the return value is "char *" and not "const char *"
> as it's okay to alter it?
No, I think the return value ought to be treated as const char *.
We're hesitant to actually declare it that way because we'd cause compile
errors in many client applications that aren't being const-paranoid.
But the app has no business modifying those values.
regards, tom lane