Peter wrote:
>
> Allright, the quote_literal() function helped to a certain extent. One
> field is now always properly formatted, and one other sometimes is
> quoted... and sometimes is not.
>
> It still feels like internal PG issue to me... we'll try upgrading to
> latest revision and see what happens...
The only place I can think is some subtle bug in the dollar-quoting
code. Otherwise, I think plpgsql just uses the SQL expression evaluator
so it can't come up with a different answer. And that doesn't sound
likely to me.
If you run that segment of the procedure with some hard-coded values,
does it still do it?
--
Richard Huxton
Archonet Ltd