Re: PGSQL-to-MYSQL Migration: Error in a 'simple' inner join query

From: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
To: DaNieL <daniele(dot)pignedoli(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: PGSQL-to-MYSQL Migration: Error in a 'simple' inner join query
Date: 2009-05-04 19:10:47
Message-ID: dcc563d10905041210n69abf891q3b0eeab63336f4ff@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

To get a postgresql behavior similar to mysql's you need to use distinct on:

select distinct on (a) a,b,c from sometable; (or something like that)

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2009-05-04 20:26:34 Re: PGSQL-to-MYSQL Migration: Error in a 'simple' inner join query
Previous Message Jeff Davis 2009-05-04 19:05:44 Re: PGSQL-to-MYSQL Migration: Error in a 'simple' inner join query