Re: POWER vs. POW ??? - Mailing list pgsql-hackers

From Michael Glaesemann
Subject Re: POWER vs. POW ???
Date
Msg-id 9EF7779C-BBAF-4FB4-890E-4382A68E0A0D@myrealbox.com
Whole thread Raw
In response to POWER vs. POW ???  (Christopher Kings-Lynne <chriskl@familyhealth.com.au>)
Responses Re: POWER vs. POW ???
List 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





pgsql-hackers by date:

Previous
From: Christopher Kings-Lynne
Date:
Subject: POWER vs. POW ???
Next
From: Christopher Kings-Lynne
Date:
Subject: TRUNC vs. TRUNCATE