Re: [SQL] query configuration for validate empty quote to zero

2005-01-18 Thread KÖPFERL Robert
Did you try to explicitly give the type for the literal? e.g.  ''::varchar     -Original Message-From: Yudie [mailto:[EMAIL PROTECTED]Sent: Montag, 17. Jänner 2005 19:44To: pgsql-sql@postgresql.orgSubject: [SQL] query configuration for validate empty quote to zero

Re: [SQL] query configuration for validate empty quote to zero

2005-01-17 Thread Yudie
The problem is not stop there, I had a table that can't be updated since then with this simply command: update prdttable set webinclude = '0' where prdtnumber = '6002' Again, the errors (invalid input syntax for integer: "") apears. Then I found this temporary solution to make replica to this rec

Re: [SQL] query configuration for validate empty quote to zero

2005-01-17 Thread Tom Lane
"Yudie" <[EMAIL PROTECTED]> writes: > Now, if I use the same query it return an error: > invalid input syntax for integer: "" > Anyone know what's the problem?? None. That's an intentional change. The fact that it ever accepted '' as meaning 0 was a bug. regards, tom l

[SQL] query configuration for validate empty quote to zero

2005-01-17 Thread Yudie
We just changed the postgresql server and got some problem with sql command in our old server we can exexute this query:   SELECT * FROM product WHERE prdtnumber = ''   field prdtnumber data type is integer and the empty quote somehow can be assumed into 0 (zero) Now,  if I use the same qu