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

Re: BUG #5102: Silent IN (list of strings) failure to detect syntax error when list is linewrapped

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Geoff Tolley <geoff(dot)tolley(at)yougov(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #5102: Silent IN (list of strings) failure to detect syntax error when list is linewrapped
Date: 2009-10-08 15:19:28
Message-ID: 24247.1255015168@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> I don't know much about this oddity but my first guess is that it's
> mandated by the SQL standard.

Yeah.  The spec defines that you can split a literal across lines this
way.  Notable quotes from SQL92:

         <separator> ::= { <comment> | <space> | <newline> }...


         1) In a <character string literal> or <national character string
            literal>, the sequence:

              <quote> <character representation>... <quote>
              <separator>... <quote> <character representation>... <quote>

            is equivalent to the sequence

              <quote> <character representation>... <character representa-
              tion>... <quote>


         4) In a <character string literal>, <national character string
            literal>, <bit string literal>, or <hex string literal>, a <sep-
            arator> shall contain a <newline>.

			regards, tom lane

In response to

Responses

pgsql-bugs by date

Next:From: Tom LaneDate: 2009-10-08 15:22:42
Subject: Re: BUG #5105: "Select Into Strict" does not throw NO_DATA_FOUND
Previous:From: Tom LaneDate: 2009-10-08 15:12:22
Subject: Re: BUG #5104: tsearch parser mislead

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