Re: POWER vs. POW ???

From: Michael Glaesemann <grzm(at)myrealbox(dot)com>
To: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: POWER vs. POW ???
Date: 2005-11-24 12:09:59
Message-ID: 9EF7779C-BBAF-4FB4-890E-4382A68E0A0D@myrealbox.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On Nov 24, 2005, at 21:00 , Christopher Kings-Lynne wrote:

> How come these give slightly different results?
>
> test=# SELECT POW(2,-2);
> pow
> ------
> 0.25
> (1 row)
>
> test=# SELECT POWER(2,-2);
> power
> -------
> 0.25
> (1 row)
>
>
> (Note width of result field.)

It appears that the line is extended one underscore beyond the width
of the wider of the attribute name and value. Am I missing something?

test=# create table foo (this_is_a_long_attribute text not null,
short_attr text not null);
CREATE TABLE
test=# insert into foo (this_is_a_long_attribute, short_attr) values
('narrow_value', 'this_is_a_very_wide_value');
INSERT 0 1
test=# select * from foo;
this_is_a_long_attribute | short_attr
--------------------------+---------------------------
narrow_value | this_is_a_very_wide_value
(1 row)

Michael Glaesemann
grzm myrealbox com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Christopher Kings-Lynne 2005-11-24 12:11:13 TRUNC vs. TRUNCATE
Previous Message Reinoud van Leeuwen 2005-11-24 12:06:00 Re: POWER vs. POW ???