From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
Cc: | "Patches (PostgreSQL)" <pgsql-patches(at)postgresql(dot)org> |
Subject: | Re: dollar quoting with flex |
Date: | 2004-02-24 18:42:56 |
Message-ID: | 23650.1077648176@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-patches |
Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> Attached is a patch for dollar quoting in the backend and in psql (with
> the new flex scanner). I'm fairly confident about the backend (because
> this is mainly Tom's work adapted :-) ) but rather less so about psql -
> I don't entirely understand all the odd states in psql's scanner. I'm
> not sure that I have freed up memory in all the necessary cases. Nor am
> I sure what the state is or should be if we end an included file in a
> dollar-quoting state, nor how to handle such a situation. So, some extra
> eyeballs would be appreciated.
I'll take a look soon. The psql behavior is that a new lexer is
instantiated for each include-file level, which means that quoting
states can't persist across file boundaries. This emulates the behavior
of the old handmade lexing code, and seems fairly reasonable to me.
(By definition, you weren't in a quoting state when you recognized the
\i command, and so you shouldn't be when you come out of the include
file.) We could argue about that if people want to reconsider it, but
it seems orthogonal to the dollar-quoting change to me.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2004-02-24 22:07:56 | Re: dollar quoting with flex |
Previous Message | Andrew Dunstan | 2004-02-24 17:40:19 | dollar quoting with flex |