Re: [HACKERS] Alter strings that don't belong to the application

2003-06-12 Thread Dennis Björklund
On Thu, 12 Jun 2003, Tom Lane wrote: > I think the string ought to be copied first ... although that might > create memory-leak problems. Could you take a look at fixing this, > while you're in the area? Sure. > I can whitelist you if you have a stable IP address --- is that a static > or dynam

Re: [HACKERS] Alter strings that don't belong to the application

2003-06-12 Thread Tom Lane
=?ISO-8859-1?Q?Dennis_Bj=F6rklund?= <[EMAIL PROTECTED]> writes: > On Thu, 12 Jun 2003, Tom Lane wrote: >> I'd call that a bug in psql. Where do you see it happening exactly? > It's the utf-8 validation function (mbvalidate) that removes characters > that it does not understand. I think the stri

Re: [HACKERS] Alter strings that don't belong to the application

2003-06-12 Thread Dennis Björklund
On Thu, 12 Jun 2003, Tom Lane wrote: > I'd call that a bug in psql. Where do you see it happening exactly? It's the utf-8 validation function (mbvalidate) that removes characters that it does not understand. > No, I think the return value ought to be treated as const char *. > We're hesitant t

Re: [HACKERS] Alter strings that don't belong to the application

2003-06-12 Thread Tom Lane
=?ISO-8859-1?Q?Dennis_Bj=F6rklund?= <[EMAIL PROTECTED]> 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 happ

[HACKERS] Alter strings that don't belong to the application

2003-06-11 Thread Dennis Björklund
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