Hi, I have observed a strange behavior with current source tree.
For example, 

	select usename from pg_user order by usename;

is ok. But

	select usename as aaa from pg_user order by usename;

will produce 2 column names: "aaa" and "usename". Is this normal?
---
Tatsuo Ishii



Sun, 16 May 1999 16:09:01 +0900
Tatsuo Ishii <t-ishii@sra.co.jp>
select + order by
Tatsuo Ishii <t-ishii@sra.co.jp> writes:
> But
> 	select usename as aaa from pg_user order by usename;
> will produce 2 column names: "aaa" and "usename". Is this normal?

No.  I am not seeing it here with sources from 12 May.  I am guessing
this has something to do with Jan's recent fixes for group by/order by
rewrites.  Do you see it when you use a plain table, rather than a view?

			regards, tom lane

Sun, 16 May 1999 10:07:41 -0400
Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] select + order by 
> > 	select usename as aaa from pg_user order by usename;
> > will produce 2 column names: "aaa" and "usename". Is this normal?
> 
> No.  I am not seeing it here with sources from 12 May.  I am guessing
> this has something to do with Jan's recent fixes for group by/order by
> rewrites.  Do you see it when you use a plain table, rather than a view?

I see it with a plain table too.
---
Tatsuo Ishii

Mon, 17 May 1999 09:50:19 +0900
Tatsuo Ishii <t-ishii@sra.co.jp>
Re: [HACKERS] select + order by 
> > > 	select usename as aaa from pg_user order by usename;
> > > will produce 2 column names: "aaa" and "usename". Is this normal?
> > 
> > No.  I am not seeing it here with sources from 12 May.  I am guessing
> > this has something to do with Jan's recent fixes for group by/order by
> > rewrites.  Do you see it when you use a plain table, rather than a view?
> 
> I see it with a plain table too.

I just did a make clean, initdb, etc, and got:

	test=> select usename as aaa from pg_user order by usename;
	aaa     
	--------
	postgres
	(1 row)

Looks good to me.


-- 
  Bruce Momjian                        |  http://www.op.net/~candle
  maillist@candle.pha.pa.us            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

Sun, 16 May 1999 21:01:24 -0400 (EDT)
Bruce Momjian <maillist@candle.pha.pa.us>
Re: [HACKERS] select + order by
>
> > > >   select usename as aaa from pg_user order by usename;
> > > > will produce 2 column names: "aaa" and "usename". Is this normal?
> > >
> > > No.  I am not seeing it here with sources from 12 May.  I am guessing
> > > this has something to do with Jan's recent fixes for group by/order by
> > > rewrites.  Do you see it when you use a plain table, rather than a view?
> >
> > I see it with a plain table too.
>
> I just did a make clean, initdb, etc, and got:
>
>    test=> select usename as aaa from pg_user order by usename;
>    aaa
>    --------
>    postgres
>    (1 row)
>
> Looks good to me.

    Yes, latest changes require a clear, intidb due to changes in
    the node out/read functions.


Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#======================================== jwieck@debis.com (Jan Wieck) #



Mon, 17 May 1999 10:51:42 +0200 (MET DST)
jwieck@debis.com (Jan Wieck)
Re: [HACKERS] select + order by
>> > > >   select usename as aaa from pg_user order by usename;
>> > > > will produce 2 column names: "aaa" and "usename". Is this normal?
>> > >
>> > > No.  I am not seeing it here with sources from 12 May.  I am guessing
>> > > this has something to do with Jan's recent fixes for group by/order by
>> > > rewrites.  Do you see it when you use a plain table, rather than a view?
>> >
>> > I see it with a plain table too.
>>
>> I just did a make clean, initdb, etc, and got:
>>
>>    test=> select usename as aaa from pg_user order by usename;
>>    aaa
>>    --------
>>    postgres
>>    (1 row)
>>
>> Looks good to me.
>
>    Yes, latest changes require a clear, intidb due to changes in
>    the node out/read functions.

Getting latest sources and doing initdb solved the problem.

Thanks and sorry for the confusion.
---
Tatsuo Ishii

Tue, 18 May 1999 10:47:31 +0900
Tatsuo Ishii <t-ishii@sra.co.jp>
Re: [HACKERS] select + order by 