public inbox for [email protected]  
help / color / mirror / Atom feed
From: Roger Mason <[email protected]>
To: pgsql-novice <[email protected]>
Subject: Re: select from grouped data
Date: Sat, 28 Aug 2021 10:38:41 -0230
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAOuzzgpa7+octXt69xQZ7x_w_ppRdUHAGTtBDGKoiTgk2LPvaA@mail.gmail.com>
References: <[email protected]>
	<[email protected]>
	<CAOuzzgpa7+octXt69xQZ7x_w_ppRdUHAGTtBDGKoiTgk2LPvaA@mail.gmail.com>


Stephen Frost writes:

>
> It’s generally better as it follows the SQL standard and is more flexible
> as it allows you to get top-N, as I said. DISTINCT ON has always been a
> hack and its use should be discouraged at this point.
>
> When an UPSERT capability exists in the actual standard then it’s use
> should be promoted over other hacks that various vendors have implemented
> also.

OK, thanks, I've filed this discussion away for future reference.
Meanwhile I'm having trouble getting this function to work as a
trigger.  I'll start another thread on that.

Thanks again.

Roger





view thread (7+ messages)

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected]
  Subject: Re: select from grouped data
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox