Stephen Frost <sfr...@snowman.net> writes: > The other idea which comes to mind is- could we try to actually resolve > what the 'right' answer is here, instead of setting a special value and > then having to detect and fix it later?
No, absolutely not. Read the NOTES at the head of gram.y. Or if you need it spelled out: when we run the bison parser, we may not be inside a transaction at all, and even if we are, we aren't necessarily going to be seeing the same current user that will apply when the parsetree is ultimately executed. (Consider a query inside a plpgsql function, which might be called under multiple userids over the course of a session.) I think Alvaro's suggestion is a perfectly appropriate solution. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers