Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Interfaces Pgadmin Support > Re: Show NULL v...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 4 of 6 Topic 1934 of 2158
Post > Topic >>

Re: Show NULL values AS <NULL> not working

by dpage@[EMAIL PROTECTED] ("Dave Page") Jan 14, 2008 at 10:58 PM

Hi Andy

On 14/01/2008, Andy Shellam <andy.shellam-lists@[EMAIL PROTECTED]
> wrote:
> Hi Dave and team,
>
> Another slight bug (I think):
>
> I have a table which has a column called "first_invalid" which should be
a
> timestamp if the record is invalid, or NULL if it's valid.
> In PgAdmin I have the "Show NULL values as <NULL>" option enabled, but
it
> still displays a blank cell for this column.
>
> The reason why I think it may not be a bug, is I tried doing this:
>
> "SELECT COALESCE(first_invalid, '<NULL>') AS first_invalid FROM table"
>
> but PostgreSQL threw it out because "<NULL>" is not a valid timestamp -

Right - thats what I'd expect.

> instead I had to do:
>
> "SELECT COALESCE(first_invalid, '1900-01-01') AS first_invalid FROM
table"
>
> to prove the column is in fact NULL, and I do get: "1900-01-01
00:00:00+00"
> for this record, but in the data entry grid, PgAdmin still displays it
> blank.

That doesn't prove it's null - it proves it's null OR 1900-01-01
00:00:00+00. However, the <NULL> output option is onlt for the Query
Tool. The data entry grid always displays an empty cell for NULL, ''
for a blank string, and \'\' for a pair or single quotes. From the
docs:

Show NULL values as <NULL>? - This option will cause NULL values to be
shown as <NULL> in the Query Tool's results grid.

http://www.pgadmin.org/docs/1.8/options-tab3.html

Regards, Dave.

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match
 




 6 Posts in Topic:
Show NULL values AS not working
andy.shellam-lists@[EMAIL  2008-01-14 22:41:59 
Re: Show NULL values AS not working
andy.shellam-lists@[EMAIL  2008-01-14 22:49:57 
Re: Show NULL values AS not working
mshapiro51@[EMAIL PROTECT  2008-01-14 16:57:10 
Re: Show NULL values AS not working
dpage@[EMAIL PROTECTED]   2008-01-14 22:58:09 
Re: Show NULL values AS not working
andy.shellam-lists@[EMAIL  2008-01-14 23:29:03 
Re: Show NULL values AS not working
dpage@[EMAIL PROTECTED]   2008-01-15 08:52:18 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Dec 1 17:34:01 CST 2008.