Re: Weird double single quote issue - Mailing list pgsql-general

From Richard Huxton
Subject Re: Weird double single quote issue
Date
Msg-id 4549FDE2.5020302@archonet.com
Whole thread Raw
In response to Weird double single quote issue  (Peter <peter@greatnowhere.com>)
Responses Re: Weird double single quote issue
List pgsql-general
Peter wrote:
> Now, the weirdest thing is that for some db users everything works as it
> should, but for others the returned string is with TWO single quotes!
>
> select 'string to be stored with '' quotemark'::text as returned_string
>
> returns
>
> string to be stored with '' quotemark
>
>
> I cannot replicate the same behavior from SQL Editor, or psql
> commandline. It only happens inside my proc (which is rather monstrous).

1. Have you done ALTER ROLE ... SET ... on any users?
2. Are the locales/encodings different for the users?
3. Can you isolate the problem part of the procedure?

I'm guessing you'll have to do #3 since you can't reproduce it with
psql. If I were you, I'd suspect the proc rather than the DB in this case.

--
   Richard Huxton
   Archonet Ltd

pgsql-general by date:

Previous
From: Martijn van Oosterhout
Date:
Subject: Re: compiling c-function on various version
Next
From: Peter
Date:
Subject: Re: Weird double single quote issue