Jean-Christian Imbeault <jc(at)mega-bucks(dot)co(dot)jp> writes:
> I observed the following for one of my queries:
> TEST=# select distinct(prod_id), date_received from invoice_li;
> ...
> Is this the correct behaviour for a select distinct()?
Yes. Hint: the parentheses in what you wrote are noise.
Possibly you were looking for DISTINCT ON, which does have
a parenthetical list of things-to-distinctify.
regards, tom lane