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