Re: Empty Output? How Do I Determine the Character?

From: Hunter Hillegas <lists(at)lastonepicked(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL <pgsql-general(at)postgresql(dot)org>
Subject: Re: Empty Output? How Do I Determine the Character?
Date: 2003-08-08 23:06:57
Message-ID: BB597B21.C75BC%lists@lastonepicked.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Ok... I don't think that it is null:
thedonnaholics=# select count(*) from mailing_list where state = null;
count
-------
0
(1 row)

I ran the query you suggested but I don't know what it means:
thedonnaholics=# select '>' || state || '<' from mailing_list where rec_num
= 7;
?column?
----------

(1 row)

Any insight appreciated.

Thanks,
Hunter

> From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
> Date: Fri, 08 Aug 2003 19:03:24 -0400
> To: Hunter Hillegas <lists(at)lastonepicked(dot)com>
> Cc: PostgreSQL <pgsql-general(at)postgresql(dot)org>
> Subject: Re: [GENERAL] Empty Output? How Do I Determine the Character?
>
> Hunter Hillegas <lists(at)lastonepicked(dot)com> writes:
>> I cannot determine what character is stored in a varchar...
>> For instance:
>> thedonnaholics=# select state from mailing_list where rec_num = 7;
>> state
>> -------
>
>> (1 row)
>
> I'd say it's either NULL or between one and five space characters.
> To find out, try something like
>
> select '>' || state || '<' from mailing_list where rec_num = 7;
>
> regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2003-08-08 23:08:54 Re: Empty Output? How Do I Determine the Character?
Previous Message Tom Lane 2003-08-08 23:03:24 Re: Empty Output? How Do I Determine the Character?