Re: Review: Re: [PATCH] Re: [HACKERS] Adding xpath_exists function

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: David Fetter <david(at)fetter(dot)org>
Cc: Mike Fowler <mike(at)mlfowler(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Round Robin Reviewers <pgsql-rrreviewers(at)postgresql(dot)org>
Subject: Re: Review: Re: [PATCH] Re: [HACKERS] Adding xpath_exists function
Date: 2010-07-27 23:41:29
Message-ID: AANLkTinqV-LqCN1dGjf6TdqgXiFQ3Sc-deWr7a8LRCBV@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-rrreviewers

On Tue, Jul 27, 2010 at 7:33 PM, David Fetter <david(at)fetter(dot)org> wrote:
>        Minor quibble with the regression tests: should we be using
>        dollar quotes in things like this?  Doubled-up quote marks:
>
>        SELECT xpath_exists('//town[text() = ''Cwmbran'']','<towns><town>Bidford-on-Avon</town><town>Cwmbran</town><town>Bristol</town></towns>'::xml);
>
>        Dollar quote:
>
>        SELECT xpath_exists($$//town[text() = 'Cwmbran']$$,'<towns><town>Bidford-on-Avon</town><town>Cwmbran</town><town>Bristol</town></towns>'::xml);

Personally, I don't really see that as an improvement. Dollar-quotes
are really nice for longer strings, or where you would otherwise have
quadrupled quotes (or more), but I don't see a big advantage to it
here. Still, it's a question of opinion more than anything else.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise Postgres Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2010-07-27 23:43:51 Re: SSL cipher and version
Previous Message Robert Haas 2010-07-27 23:38:39 Re: Parsing of aggregate ORDER BY clauses

Browse pgsql-rrreviewers by date

  From Date Subject
Next Message Jeff Davis 2010-07-27 23:55:52 Re: Review: Re: [PATCH] Re: [HACKERS] Adding xpath_exists function
Previous Message David Fetter 2010-07-27 23:33:25 Review: Re: [PATCH] Re: [HACKERS] Adding xpath_exists function