Skip site navigation (1) Skip section navigation (2)

Re: Is this a bug????

From: "Qingqing Zhou" <zhouqq(at)cs(dot)toronto(dot)edu>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Is this a bug????
Date: 2005-12-04 23:10:41
Message-ID: dmvsvm$1v13$1@news.hub.org (view raw or flat)
Thread:
Lists: pgsql-bugs
"Joost Kraaijeveld" <J(dot)Kraaijeveld(at)Askesis(dot)nl> wrote
>
> select objectid,defaulttermsofpayment from prototype.customers
> where
> objectid = '336A0451-D9E8-7C11-6333-C17DF18E8979'
>
> I get the following answer:
>
> "336A0451-D9E8-7C11-6333-C17DF18E8979";"null"
>

test=# create table m (c1 char(10), c2 char(10));
CREATE TABLE
test=# insert into m values('hello', null);
INSERT 0 1
test=# select * from m where c1 = 'hello';
     c1     | c2
------------+----
 hello      |
(1 row)
test=# select * from m where c2 is null;
     c1     | c2
------------+----
 hello      |
(1 row)

Notice if an column is null, then nothing is shown. So the strange thing is 
how you get "null"?

Regards,
Qingqing 



In response to

pgsql-bugs by date

Next:From: Tom LaneDate: 2005-12-05 00:24:14
Subject: Re: Is this a bug????
Previous:From: Joost KraaijeveldDate: 2005-12-04 22:29:30
Subject: Is this a bug????

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group