Re: massive quotes?

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: massive quotes?
Дата
Msg-id 200309120220.h8C2KaW10432@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: massive quotes?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
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 pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Examining the output of: ldd `which postgres`
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [PATCHES] Reorganization of spinlock defines