pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
6.5.3 - backend closes if wrong parameters to NULLIF, CASE
2+ messages / 2 participants
[nested] [flat]

* 6.5.3 - backend closes if wrong parameters to NULLIF, CASE
@ 1999-11-26 17:48  Emils Klotins <emils@mail.usis.bkc.lv>
  0 siblings, 1 reply; 2+ messages in thread

From: Emils Klotins @ 1999-11-26 17:48 UTC (permalink / raw)
  To: pgsql-sql

Continuing to try to work with the things.

I have a table "authors" with approx following fields:
( name text, id int4, birthdate date, ... , address_id int4 )

- when using a wrong CASE or NULLIF in INSERT/UPDATE 
statement on birthdate, it seems that it corrupts the 
address_id field.

Ie. If I do a thing like UPDATE authors set 
birthdate=NULLIF(date '12-12-1999', date '') ...

the backend will die and whenever afterwards I try to SELECT 
the address_id field from the updated row, it would die again.

If I do a SELECT NULLIF(date '12-12-1999', date '') it will 
correctly complain that '' is a wrong date value.

Seems also that when I try to UPDATE/INSERT using a CASE 
stmt it would die too, again corrupting the address_id field.





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

* Re: [SQL] 6.5.3 - backend closes if wrong parameters to NULLIF, CASE
@ 1999-11-26 18:06  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Emils Klotins <emils@mail.usis.bkc.lv>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 1999-11-26 18:06 UTC (permalink / raw)
  To: Emils Klotins <emils@mail.usis.bkc.lv>; +Cc: pgsql-sql

"Emils Klotins" <emils@mail.usis.bkc.lv> writes:
> Ie. If I do a thing like UPDATE authors set 
> birthdate=NULLIF(date '12-12-1999', date '') ...
> the backend will die and whenever afterwards I try to SELECT 
> the address_id field from the updated row, it would die again.

I get "Bad date external representation ''" from either 6.5.3
or current sources.

Are you sure you're running 6.5.3, and not some older version?
I fixed a lot of bugs involving CASE around 6.5 ...

If it's not that, then there must be some other aspect of your
example that's critical but you haven't shown us.  Please file
a formal bug report giving a complete SQL script that reproduces
the bug.

			regards, tom lane



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


end of thread, other threads:[~1999-11-26 18:06 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1999-11-26 17:48 6.5.3 - backend closes if wrong parameters to NULLIF, CASE Emils Klotins <emils@mail.usis.bkc.lv>
1999-11-26 18:06 ` Tom Lane <tgl@sss.pgh.pa.us>

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