Re: Initial review of xslt with no limits patch

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Initial review of xslt with no limits patch
Дата
Msg-id 6271.1281114116@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Initial review of xslt with no limits patch  (Andrew Dunstan <andrew@dunslane.net>)
Ответы Re: Initial review of xslt with no limits patch  (Pavel Stehule <pavel.stehule@gmail.com>)
Re: Initial review of xslt with no limits patch  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> writes:
> On 08/06/2010 12:15 PM, Tom Lane wrote:
>> Some examination of
>> http://www.xmlsoft.org/XSLT/tutorial/libxslttutorial.html
>> suggests that the parameter values need to be single-quoted,
>> and indeed when I change the last part of your example to
>> 
>> 'n1=''v1'',n2=''v2'',n3=''v3'',n4=''v4'',n5=''v5'''::text);

> Which would look a whole lot nicer with dollar quoting ;-)

No doubt.  But one would assume that constant parameters aren't going
to be the normal use-case, and dollar quoting isn't helpful for
nonconstant text.

I think there are issues here that we need to take a step back and think
about.  Right now, thanks to the lack of documentation, we can probably
assume there are approximately zero users of the xslt_process parameter
feature.  Once we document it that'll no longer be true.  So right now
would be the time to reflect on whether this is a specification we
actually like or believe is usable; it'll be too late to change it
later.

There are two specific points bothering me now that I see how it works:

1. name = value pretty much sucks, especially with the 100% lack of any
quoting convention for either equals or comma.  I concur with the
thoughts upthread that turning this into a variadic function would be a
more sensible solution.

2. I'm not sure whether we ought to auto-single-quote the values.
If we don't, how hard is it for users to properly quote nonconstant
parameter values?  (Will quote_literal work, or are the quoting rules
different for libxslt?)  If we do, are we giving up functionality
someone cares about?
        regards, tom lane


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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: including backend ID in relpath of temp rels - updated patch
Следующее
От: Tom Lane
Дата:
Сообщение: Re: including backend ID in relpath of temp rels - updated patch