Re: 7.3.3 behaving differently on OS X 10.2.6 and FreeBSD - Mailing list pgsql-general

From DeJuan Jackson
Subject Re: 7.3.3 behaving differently on OS X 10.2.6 and FreeBSD
Date
Msg-id 3F340562.5090606@speedfc.com
Whole thread Raw
In response to Re: 7.3.3 behaving differently on OS X 10.2.6 and FreeBSD 4.8-STABLE  ("David Olbersen" <DOlbersen@stbernard.com>)
Responses Re: 7.3.3 behaving differently on OS X 10.2.6 and FreeBSD  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: 7.3.3 behaving differently on OS X 10.2.6 and FreeBSD  (culley harrelson <culley@fastmail.fm>)
List pgsql-general
I have a suspicion that the version might be different.  I have the same symptom here on two different RH 7.3 boxes one running 7.3.2 and the other running 7.3.3
It would appear 7.3.2 is more strict about the naming of the GROUP BY fields.

David Olbersen wrote:
Culley,
 
But on my production machine postgresql complained about the order by 
clause-- it wanted the table alias to be on last_name.   
I believe this is because you used "u.last_name" earlier in the statement, and the ORDER BY clause doesn't know that's what you mean.

That's a guess that doesn't really explain why it'd work under one OS and not under another. Are the two versions of Postgres configured the same?

--------------------------
David Olbersen 
iGuard Engineer
St. Bernard Software

 
-----Original Message-----
From: culley harrelson [mailto:culley@fastmail.fm]
Sent: Friday, August 08, 2003 10:48 AM
To: pgsql-general@postgresql.org
Subject: [GENERAL] 7.3.3 behaving differently on OS X 10.2.6 
and FreeBSD
4.8-STABLE


I don't know if this is a postgresql bug or a problem with my 
architecture but I thought I would post here about a strange 
bug I just 
came across in my application.

I use OS X 10.2.6 as my development machine and FreeBSD 4.8 for my 
production machines.  All systems are running postgresql 
7.3.3. I just 
published some code to production and when testing the production 
results it blew up with a sql parsing error.  The following 
sql worked 
fine on my OS X development machine:

select u.user_id, u.first_name, u.last_name, u.email_address, w.w9, 
pm.description as payment_method, count(s.user_id) as documents, 
sum(s.payment_amount) as amt_sum from ht_user u inner join 
writer w on 
u.user_id = w.user_id inner join payment_method pm on 
w.payment_method_id = pm.payment_method_id left join submission s on 
u.user_id = s.user_id group by u.user_id, u.first_name, u.last_name, 
u.email_address, w.w9, pm.description order by lower(last_name) asc

But on my production machine postgresql complained about the order by 
clause-- it wanted the table alias to be on last_name.

culley



---------------------------(end of 
broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings
   
---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend 

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: 7.3.3 behaving differently on OS X 10.2.6 and FreeBSD 4.8-STABLE
Next
From: Anthony Best
Date:
Subject: Re: Anomaly with SUM().