Bruce Momjian <[EMAIL PROTECTED]> writes: > Another idea would be to enable another set of quoting characters, like:
Yeah, I was toying with that also; it would be nearly the same as the psql literal proposal, but pushed into the backend. I am not sure what the quoting symbols should look like though. '<--' will not do, it conflicts with SQL comments. Another issue that no one has really addressed is that all these proposals only solve the basic need to double quotes and backslashes in function bodies. Yes, that would be a huge step forward, but if you look at the situations where the plpgsql quoting recipe recommends six or eight or ten quotes in a row, it's still gonna be messy. Seems like you might want another layer of "special quoting" within plpgsql to aid in constructing dynamic SQL commands. Can that be handled with the same notation, or do we need another one? This line of thought suggests that we might want a convention that supports multiple end-markers, like shell here-documents do, so that you can nest uses of special quoting. Perhaps we could do something like this: a special quoted string is started by a line like $$FOO where FOO represents any string of uppercase ASCII letters (we allow only A-Z here, and nothing else not even whitespace on the line, so as to minimize the potential for conflicts). Then the string extends to the first exactly-matching line. This would allow nesting: $$FOO ... $$BAR ... $$BAR ... $$FOO I'm not by any means wedded to this particular syntax, but it came to mind as unlikely to conflict with any existing or planned SQL notations. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 6: Have you searched our list archives? http://archives.postgresql.org