Re: [HACKERS] money or dollar type - Mailing list pgsql-hackers

From Jose' Soares Da Silva
Subject Re: [HACKERS] money or dollar type
Date
Msg-id Pine.LNX.3.96.980513094736.474B-100000@proxy.bazzanese.com
Whole thread Raw
In response to Re: [HACKERS] money or dollar type  (Bruce Momjian <maillist@candle.pha.pa.us>)
Responses Re: [HACKERS] money or dollar type
List pgsql-hackers
On Tue, 12 May 1998, Bruce Momjian wrote:

> > prova=> select var as my_varchar from prova where var = '12';
> > my_varchar
> > ----------
> >         12         <--right justified
> > (1 row)
> >
> > prova=> select var as my_varchar from prova;
> > my_varchar
> > ----------
> > 12         <--left justified, this time ???
> > a12
> > a12
> > (3 rows)
> >                                               Jose'
>
> I can't reproduce this here.
Seems that PostgreSQL justify data based on data not on data type.
My environment is:
    PostgreSQL v6.3
    Linux 2.0.33

also Daniel A. Gauthier <3in7ifi@cmich.edu>
reported the same problem.

here my script:

create table prova ( my_varchar varchar );
CREATE
insert into prova values ('12');
INSERT 528521 1
insert into prova values ('a12');
INSERT 528522 1
select * from prova where my_varchar = '12';
my_varchar
----------
        12
(1 row)

select * from prova;
my_varchar
----------
12
a12
(2 rows)

EOF
                                                     Jose'


pgsql-hackers by date:

Previous
From: "Göran Thyni"
Date:
Subject: Re: [HACKERS] mmap and MAP_ANON
Next
From: "Mikhail Routchiev"
Date:
Subject: One problem with Postgres...