"James M Doherty" <[EMAIL PROTECTED]> writes: > declare > SQL text; > NSQL text;
> SQL := ''10/3/2009''; > NSQL := quote_literal(SQL); > The result is '10/3/2009 with no closing quote. Works for me: regression=# create function foo() returns text as ' regression'# declare SQL text; regression'# NSQL text; regression'# begin regression'# SQL := ''10/3/2009''; regression'# NSQL := quote_literal(SQL); regression'# return NSQL; regression'# end' language plpgsql; CREATE FUNCTION regression=# select foo(); foo ------------- '10/3/2009' (1 row) Again, I suggest giving a *complete* example, because you are obviously not looking in the right place for your problem. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 4: Have you searched our list archives? http://archives.postgresql.org