why does this not give a syntax error?

Started by Scott Ribealmost 13 years ago4 messagesgeneral
Jump to latest
#1Scott Ribe
scott_ribe@elevated-dev.com

pg 9.2:

delete from "ExternalDocument" where id = 11825657and "Billed" = 'f';

--
Scott Ribe
scott_ribe@elevated-dev.com
http://www.elevated-dev.com/
(303) 722-0567 voice

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Scott Ribe (#1)
Re: why does this not give a syntax error?

Scott Ribe <scott_ribe@elevated-dev.com> writes:

pg 9.2:
delete from "ExternalDocument" where id = 11825657and "Billed" = 'f';

"11825657and" is not any more lexically ambiguous than "11825657+".
It has to be two separate tokens, and that's how it's read.

regards, tom lane

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#3Scott Ribe
scott_ribe@elevated-dev.com
In reply to: Tom Lane (#2)
Re: why does this not give a syntax error?

On Jun 10, 2013, at 12:52 PM, Tom Lane wrote:

Scott Ribe <scott_ribe@elevated-dev.com> writes:

pg 9.2:
delete from "ExternalDocument" where id = 11825657and "Billed" = 'f';

"11825657and" is not any more lexically ambiguous than "11825657+".
It has to be two separate tokens, and that's how it's read.

But it's not read correctly. In other words:

delete from "ExternalDocument" where id = 11825657and "Billed" = 'f';

deleted 0 rows, while:

delete from "ExternalDocument" where id = 11825657 and "Billed" = 'f';

deleted 1 row.

???

--
Scott Ribe
scott_ribe@elevated-dev.com
http://www.elevated-dev.com/
(303) 722-0567 voice

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#4Tom Lane
tgl@sss.pgh.pa.us
In reply to: Scott Ribe (#3)
Re: why does this not give a syntax error?

Scott Ribe <scott_ribe@elevated-dev.com> writes:

On Jun 10, 2013, at 12:52 PM, Tom Lane wrote:

"11825657and" is not any more lexically ambiguous than "11825657+".
It has to be two separate tokens, and that's how it's read.

But it's not read correctly.

[ shrug... ] Works for me. You want to put together a self-contained
test case showing differently?

regards, tom lane

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general