pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Postgres 14 update clause bug
2+ messages / 2 participants
[nested] [flat]

* Postgres 14 update clause bug
@ 2022-02-10 07:29  Jüri Tali <Jyri.Tali@agri.ee>
  0 siblings, 1 reply; 2+ messages in thread

From: Jüri Tali @ 2022-02-10 07:29 UTC (permalink / raw)
  To: pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>

Hi,

Postgres 14 probably have Update clause bug

If I write Update clause little bit wrong:

UPDATE "table name" SET column1=1 and column2=2
WHERE id=1;  there is a syntax error, in set part columns must be delimited with comma

Then postgres 14 do not give a error message and show that Update is successful, but without no updated columns.
POstgres 12 gives a error.

Exact version: psql (14.1 (Ubuntu 14.1-2.pgdg20.04+1))

I will be happy to answer any additional questions that may arise


Best regards,
Jüri Tali
Chief specialist  | IT department
+372 625 6549

Ministry of Rural Affairs
Lai tn 39 // Lai tn 41 | 15056 Tallinn
625 6101 | www.agri.ee<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.agri.ee%2F&data=02%7C01%7C%...; , Facebook<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.facebook.com%2FMaaeluministeer...;



<p></p>

^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Postgres 14 update clause bug
@ 2022-02-10 08:28  Julien Rouhaud <rjuju123@gmail.com>
  parent: Jüri Tali <Jyri.Tali@agri.ee>
  0 siblings, 0 replies; 2+ messages in thread

From: Julien Rouhaud @ 2022-02-10 08:28 UTC (permalink / raw)
  To: Jüri Tali <Jyri.Tali@agri.ee>; +Cc: pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>

On Thu, Feb 10, 2022 at 07:29:54AM +0000, Jüri Tali wrote:
> 
> Postgres 14 probably have Update clause bug
> 
> If I write Update clause little bit wrong:
> 
> UPDATE "table name" SET column1=1 and column2=2
> WHERE id=1;  there is a syntax error, in set part columns must be delimited with comma
> 
> Then postgres 14 do not give a error message and show that Update is successful, but without no updated columns.
> POstgres 12 gives a error.

Can you show the definition of the table on both system?  Also did you add some
extension or created some casts?  I'm wondering if your problem is that you're
actually executing something like that:

UPDATE table_name SET column1 = (1::bool AND column2 = 2) WHERE id = 1;

due to implicit int - bool cast, which aren't present in you pg12 instance (and
shouldn't be present in vanilla postgres).





^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2022-02-10 08:28 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2022-02-10 07:29 Postgres 14 update clause bug Jüri Tali <Jyri.Tali@agri.ee>
2022-02-10 08:28 ` Julien Rouhaud <rjuju123@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox