Andrew Dunstan <[EMAIL PROTECTED]> 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

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Reply via email to