Tom Lane wrote: > Keep in mind that we have two different requirements: the quote start > marker has to be recognizable while we are parsing SQL (or possibly > plpgsql) code. The quote end marker has to be recognizable while we are > scanning text that could be almost anything. > > The cute thing about the here-document solution to this problem is that > you can choose the quote end marker on a case-by-case basis. So you can > always pick something that won't conflict with anything that's actually > in the text you need to quote. > > If we try to go with fixed markers (like {' ... }' and some other ideas > that were floated today), then we lose that flexibility, and we're up > against the losing game of trying to pick an end-marker that won't cause > problems in any programming language anywhere (not to mention possible > uses of the quoting mechanism for arbitrary string literals that aren't > even function bodies). > > I'm not wedded to the "$$FOO" idea in particular, but I do think we want > to go with a solution that allows a variable end-marker.
Agreed --- with multiple languages, we have to allow users to specify a unique end marker. -- Bruce Momjian | http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073 ---------------------------(end of broadcast)--------------------------- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match