Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] dollar quoting

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>,"Patches (PostgreSQL)" <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [HACKERS] dollar quoting
Date: 2004-02-15 16:42:40
Message-ID: 8642.1076863360@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
>> No, it won't.  The problem is that it should, because the backend will
>> see that as '42' followed by a $foo$ quote start.

> Ok, I see what you are saying. This mismatch would only happen on 
> invalid input, though. I believe that what I did will work on all legal 
> input.

I'm unconvinced.  Even if there are not any current syntaxes in which a
numeric literal can be adjacent to a string literal (I'm not totally
sure about that), what of the future?  We should solve the problem
rather than assuming it won't bite us.

> I think that this might be cured by having psql recognise a legal 
> identifier or keyword and eating it as a word, rather than treating it 
> as just another set of bytes in the stream.

Hm, might work ... will think about it ...

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Robert TreatDate: 2004-02-15 17:13:58
Subject: Re: RFC: Security documentation
Previous:From: Stephan SzaboDate: 2004-02-15 16:41:57
Subject: Re: [SQL] 7.4 - FK constraint performance

pgsql-patches by date

Next:From: Peter EisentrautDate: 2004-02-15 19:40:15
Subject: Re: Afrikaans translation of libpq
Previous:From: Andrew DunstanDate: 2004-02-15 14:36:58
Subject: Re: [HACKERS] dollar quoting

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group