gid is unique.. it's a serial..
funny thing is tho this worked on 6.5
oh well thanks for the info.
On Tue, 30 May 2000, omid omoomi wrote:
> Hi jeff,
> I'm not sure but may be that's because you are using select distinct and so
> there would be a few rows with same "gid" but different "created" fields in
> your table . And PG does not know which one to select and compare for ORDER
> BY clause. If that ,you would need to change the table structure to a better
> normal form.
> Regards ,
> Omid Omoomi
> >From: Jeff MacDonald <jeff(at)pgsql(dot)com>
> >Reply-To: Jeff MacDonald <jeff(at)pgsql(dot)com>
> >To: pgsql-sql(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org
> >Subject: [SQL] 7.0 weirdness
> >Date: Tue, 30 May 2000 09:28:11 -0300 (ADT)
> >hi folks,
> >this query works fine in 6.5 but screwie in 7.0
> >gm=> SELECT DISTINCT gid FROM members
> >gm-> WHERE active = 't'
> >gm-> AND (gender = 0
> >gm-> AND (wantrstypemale LIKE '%Short Term%'
> >gm-> OR wantrstypemale like '%Marriage%'
> >gm-> OR wantrstypemale like '%Long Term%'
> >gm-> OR wantrstypemale like '%Penpal%'
> >gm-> OR wantrstypemale like '%Activity Partner%')
> >gm-> ) order by created desc;
> >ERROR: For SELECT DISTINCT, ORDER BY expressions must appear in target
> >any idea's ?
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
In response to
pgsql-hackers by date
|Next:||From: Tom Lane||Date: 2000-05-30 14:22:39|
|Subject: Re: Configuration and build clean-up |
|Previous:||From: Karel Zak||Date: 2000-05-30 14:08:31|
|Subject: Re: AW: AW: Proposal for enhancements of privilege system|
pgsql-sql by date
|Next:||From: Matthias Urlichs||Date: 2000-05-30 14:31:35|
|Subject: Re: [HACKERS] Re: 7.0 weirdness|
|Previous:||From: Jeff MacDonald||Date: 2000-05-30 13:46:30|
|Subject: RE: 7.0 weirdness|