Re: [HACKERS] dollar-quoting in psql and in general

2004-08-11 Thread Andrew Dunstan
Philip Warner wrote: At 01:07 PM 12/08/2004, Andrew Dunstan wrote: \ is not magical inside dollar quotes, Sorry, I was confused by the manual: the paragraph that starts "C-style backslash escapes are also available..." is right after the paragraphs on dollar-quoting. The section on dollar-quot

Re: [HACKERS] dollar-quoting in psql and in general

2004-08-11 Thread Tom Lane
Philip Warner <[EMAIL PROTECTED]> writes: > At 01:07 PM 12/08/2004, Andrew Dunstan wrote: >> \ is not magical inside dollar quotes, > Sorry, I was confused by the manual: the paragraph that starts "C-style > backslash escapes are also available..." is right after the paragraphs on > dollar-quoti

Re: [HACKERS] dollar-quoting in psql and in general

2004-08-11 Thread Tom Lane
Philip Warner <[EMAIL PROTECTED]> writes: > At 12:47 PM 12/08/2004, Tom Lane wrote: >> Backslashes are not special inside >> dollar quotes --- nor is anything else, except the matching close tag > If they are not special, then shouldnt: > select $a$\$a$; > result in > ?column? >\ >

Re: [HACKERS] dollar-quoting in psql and in general

2004-08-11 Thread Philip Warner
At 01:07 PM 12/08/2004, Andrew Dunstan wrote: \ is not magical inside dollar quotes, Sorry, I was confused by the manual: the paragraph that starts "C-style backslash escapes are also available..." is right after the paragraphs on dollar-quoting. The section on dollar-quoting is also not explici

Re: [HACKERS] dollar-quoting in psql and in general

2004-08-11 Thread Andrew Dunstan
Philip Warner wrote: While trying to understand dollar-quoting, I found the following in psql: select $a$ hello $a$; behaves as expected, but psql does not like select $a$ \ $a$; or select $a$ \\ $a$; Should it? How should a dollar-quote handle: $a$ \$a\$a $a$ ? andrew=# select $a$ \

Re: [HACKERS] dollar-quoting in psql and in general

2004-08-11 Thread Philip Warner
At 12:47 PM 12/08/2004, Tom Lane wrote: Backslashes are not special inside dollar quotes --- nor is anything else, except the matching close tag If they are not special, then shouldnt: select $a$\$a$; result in ?column? \ rather than an error? Oops. It does. --

Re: [HACKERS] dollar-quoting in psql and in general

2004-08-11 Thread Philip Warner
At 12:47 PM 12/08/2004, Tom Lane wrote: Backslashes are not special inside dollar quotes --- nor is anything else, except the matching close tag If they are not special, then shouldnt: select $a$\$a$; result in ?column? \ rather than an error? --

Re: [HACKERS] dollar-quoting in psql and in general

2004-08-11 Thread Tom Lane
Philip Warner <[EMAIL PROTECTED]> writes: > While trying to understand dollar-quoting, I found the following in psql: > select $a$ hello $a$; > behaves as expected, but psql does not like > select $a$ \ $a$; > or > select $a$ \\ $a$; Define "does not like". The behavior seems correc

[HACKERS] dollar-quoting in psql and in general

2004-08-11 Thread Philip Warner
While trying to understand dollar-quoting, I found the following in psql: select $a$ hello $a$; behaves as expected, but psql does not like select $a$ \ $a$; or select $a$ \\ $a$; Should it? How should a dollar-quote handle: $a$ \$a\$a $a$ ?