[HACKERS] \0 bug - Mailing list pgsql-hackers

From Micha³ Mosiewicz
Subject [HACKERS] \0 bug
Date
Msg-id af071ec434ad80c1d8f9c3ff8c7e159c
Whole thread Raw
List pgsql-hackers
I don't remember if I have wrote about it. But anyway I think it is
worth to remember.
Once I had some problems with string that had \0 inside. I used that
string in the query like this:

UPDATE sometable SET somefield='something' WHERE otherfield='\0sometext'
and otherf1=123;

The effect was quite unusual. All the records was updated like there was
no condition at all. After this happend I added filters in all of my
programs to catch those nulls. But I think that it should be taken care
inside.

Mike

- --
********     MEMBER OF THE INTERNATIONAL PROGRAMMERS GUILD    ********
WWW: http://www.lodz.pdi.net/~mimo  tel: Int. Acc. Code + 48 42 148340
add: Michal Mosiewicz  *  Bugaj 66 m.54 *  95-200 Pabianice  *  POLAND

------------------------------

pgsql-hackers by date:

Previous
From: "Vadim B. Mikheev"
Date:
Subject: Re: [HACKERS] 6.1 progress
Next
From: Igor
Date:
Subject: Re: [HACKERS] 6.1 progress