7.0.3 max function

Started by PostgreSQL Bugs Listabout 25 years ago3 messagesbugs
Jump to latest
#1PostgreSQL Bugs List
pgsql-bugs@postgresql.org

Tae, KwangHo (khtae@selim.co.kr) reports a bug with a severity of 3
The lower the number the more severe it is.

Short Description
7.0.3 max function

Long Description
create table aaa ( aa varchar(3) );
insert into aaa values ('001');
insert into aaa values ('002');
insert into aaa values ('003');

select max(aa) from aaa;
max
-----
002
(1 row)

why???

Sample Code

No file was uploaded with this report

#2Karel Zak
zakkr@zf.jcu.cz
In reply to: PostgreSQL Bugs List (#1)
Re: 7.0.3 max function

On Wed, Mar 28, 2001 at 08:30:39AM -0500, pgsql-bugs@postgresql.org wrote:

Tae, KwangHo (khtae@selim.co.kr) reports a bug with a severity of 3
The lower the number the more severe it is.

Short Description
7.0.3 max function

Long Description
create table aaa ( aa varchar(3) );
insert into aaa values ('001');
insert into aaa values ('002');
insert into aaa values ('003');

select max(aa) from aaa;
max
-----
002
(1 row)

7.1:

test=# create table aaa ( aa varchar(3) );
CREATE
test=# insert into aaa values ('001');
INSERT 87956 1
test=# insert into aaa values ('002');
INSERT 87957 1
test=# insert into aaa values ('003');
INSERT 87958 1
test=#
test=# select max(aa) from aaa;
max
-----
003
(1 row)

test=#

Karel

--
Karel Zak <zakkr@zf.jcu.cz>
http://home.zf.jcu.cz/~zakkr/

C, PostgreSQL, PHP, WWW, http://docs.linux.cz, http://mape.jcu.cz

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: PostgreSQL Bugs List (#1)
Re: 7.0.3 max function

pgsql-bugs@postgresql.org writes:

create table aaa ( aa varchar(3) );
insert into aaa values ('001');
insert into aaa values ('002');
insert into aaa values ('003');

select max(aa) from aaa;
max
-----
002
(1 row)

Hm. It works for me, and doubtless for most other people. Something
is badly wrong with your installation. What platform are you on, and
how did you obtain or compile Postgres? If you enabled locale support,
what locale are you running the postmaster in?

regards, tom lane