"Tena Sakai" <tsakai@gallo.ucsf.edu> writes:
> I am a bit confused about distinct() function.
Your confusion is in thinking that DISTINCT is a function. It is not;
it's just a keyword that modifies SELECT. Write
select distinct subjectid, markerid, allele1id, allele2idfrom tsakai.mygenotype2...
The other syntax was being read as an implicit row constructor, like
select distinct row(subjectid, markerid, allele1id, allele2id)
which actually will work in PG 8.4, but does not in existing releases;
and you likely wouldn't like the output format anyway, since it would
just be one composite column.
regards, tom lane