<p><font size="2">Many thanks, Tom.<br /><br /> Regards,<br /><br /> Tena Sakai<br /> tsakai@gallo.ucsf.edu<br /><br
/><br/> -----Original Message-----<br /> From: Tom Lane [<a
href="mailto:tgl@sss.pgh.pa.us">mailto:tgl@sss.pgh.pa.us</a>]<br/> Sent: Sun 3/29/2009 10:49 AM<br /> To: Tena Sakai<br
/>Cc: pgsql-sql@postgresql.org<br /> Subject: Re: [SQL] a bit confused about distinct() function<br /><br /> "Tena
Sakai"<tsakai@gallo.ucsf.edu> writes:<br /> > I am a bit confused about distinct() function.<br /><br /> Your
confusionis in thinking that DISTINCT is a function. It is not;<br /> it's just a keyword that modifies SELECT.
Write<br/><br /> select distinct subjectid, markerid, allele1id, allele2id<br /> from
tsakai.mygenotype2<br/> ...<br /><br /> The other syntax was being read as an implicit row constructor, like<br
/><br/> select distinct row(subjectid, markerid, allele1id, allele2id)<br /><br /> which actually will work in
PG8.4, but does not in existing releases;<br /> and you likely wouldn't like the output format anyway, since it
would<br/> just be one composite column.<br /><br /> regards, tom lane<br /><br /></font>