Search Postgresql Archives

Re: UPDATE statement with syntax error doesn't raise a warning?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Mirko Pace wrote:
I've ran an update statement like this (obviously wrong, I know!):

update my_table
  set boolean_field = true AND
  my_notes = 'something'
where id in
   (select id from my_table order by random() limit 4000);

in my psql client and I had a "UPDATE 4000" result but, correctly, anything was changed in my_table.

So... why pg didn't raise a warning about syntax issue?

Thank you!

Mirko

P.S.
PostgreSQL 8.3.8 on i686-pc-linux-gnu, compiled by GCC gcc (Debian 4.3.2-1.1) 4.3.2
psql 8.3.8 (Ubuntu package)

are you sure its wrong?

maybe pg looked at it like:
boolean_field = (true AND my_notes = 'something')


-Andy

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux