Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hTH8m-0003UY-2Y for pgsql-general@arkaria.postgresql.org; Wed, 22 May 2019 02:38:04 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hTH8i-0005f8-3S for pgsql-general@arkaria.postgresql.org; Wed, 22 May 2019 02:38:00 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hTH8h-0005f0-MR for pgsql-general@lists.postgresql.org; Wed, 22 May 2019 02:37:59 +0000 Received: from mail-it1-x132.google.com ([2607:f8b0:4864:20::132]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hTH8d-0002Ip-OC for pgsql-general@postgresql.org; Wed, 22 May 2019 02:37:58 +0000 Received: by mail-it1-x132.google.com with SMTP id i10so1141305ite.0 for ; Tue, 21 May 2019 19:37:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=7CsXXnQrVc67vw12F6lPZcLwe2+yaI+B03xMb2Lk20w=; b=X4qFw38fsjCZKEiPa1+I/eNbQeMU75XlYJtcLbwU/+Va+n5bNEDfrtt8xVz2QJiqim QaRYSB4Hicz4FHg0cDV+1ZidT4oYkKnW25USF4e4hZRufgmG1RskC9Y3J5a6+R333DF4 pCtbSrdhgVu2Ul4SRuU4rBikf/1Y/0sjdN2Dd0POKrXcApMkoj2CpZSbTviH29BwEadi 83XDEQHgJjGWGkBUuUPE1Tmn17QVXurjaAwB+2Fxq0mz07OH7wOharHDMdR/WvqHLnqr waH607OfKj6Ec4Z6U+VgjltHAUB+eH7YtvkQ3K5bYhh8Yv2FQcWjKr+2DILqe45vXnbr ph/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=7CsXXnQrVc67vw12F6lPZcLwe2+yaI+B03xMb2Lk20w=; b=jkpjLUibm7wP18RqjDP+bS70KROSCyrCFDufnjHESHw+sf+rbqKViM4EDG4qKK8KZ5 VFncZGIR9/3shePqN/EvG/gBUaAagodMWTA4HHw/U3iLsdDO1yHX/2cXqf1RhE/sY5Wa 0FN2PZANoUh2a601XrWryviI5M276UKC4dKNmgYAXcTnOCoPJcOU8yF5OJdzPtMIIIfy tVBxCxm3lVOPK18AIFjExQJ6ly7B5Lc4ZsZtBwjIvHGGAk3FjSKUgwWQMuc3LhgJrLMv dfTyZ1uBrVbpxCJbTnSq9pRmItlpNIQY3o86d9mg0sA/TOtmaJgReqAEkbazURWkXWcu Ovtw== X-Gm-Message-State: APjAAAXSjjva5/ml3WbJLUNOo5ZcrRe68CU0jf+mmT4KVJZ5GDPqMtqs D5S6xe1zrWUbQn5Cu0Qrmbe4kfCf3YI= X-Google-Smtp-Source: APXvYqw2adMhyMyqyou9WRavjk1oE8/jrmMxDi2DMRIuUMbiPcfYEViPNoVK7o2cP00PqPty5lVvkg== X-Received: by 2002:a24:a348:: with SMTP id p69mr6992684ite.140.1558492673589; Tue, 21 May 2019 19:37:53 -0700 (PDT) Received: from pryzbyj (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id k184sm3013016itk.3.2019.05.21.19.37.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 21 May 2019 19:37:52 -0700 (PDT) Received: by pryzbyj (Postfix, from userid 1000) id 2E300800AA7; Tue, 21 May 2019 21:37:49 -0500 (CDT) Date: Tue, 21 May 2019 21:37:49 -0500 From: Justin Pryzby To: Adrian Klaver Cc: pgsql-general@postgresql.org Subject: Re: distinguish update from insert (on conflict) Message-ID: <20190522023748.GH4426@telsasoft.com> References: <20190522013428.GG4426@telsasoft.com> <106c0789-7a13-7f9c-8d49-3562556bcdd8@aklaver.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <106c0789-7a13-7f9c-8d49-3562556bcdd8@aklaver.com> User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Tue, May 21, 2019 at 06:57:36PM -0700, Adrian Klaver wrote: > On 5/21/19 6:34 PM, Justin Pryzby wrote: > >Is it still impossible to distinguish whether a row was inserted vs updated ? > > You will need to be more specific. Sorry, I mean with UPSERT / "INSERT .. ON CONFLICT DO UPDATE", is it possible to tell whether a row was inserted vs. updated ? Thanks, Justin