Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oT4WS-0006YR-OU for pgsql-sql@arkaria.postgresql.org; Tue, 30 Aug 2022 16:55:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oT4WR-0004Oq-2s for pgsql-sql@arkaria.postgresql.org; Tue, 30 Aug 2022 16:55:31 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oT4WQ-0004OW-Pw for pgsql-sql@lists.postgresql.org; Tue, 30 Aug 2022 16:55:30 +0000 Received: from lana.depesz.com ([88.198.49.178] helo=depesz.com) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oT4WK-0001Yu-K7 for pgsql-sql@lists.postgresql.org; Tue, 30 Aug 2022 16:55:30 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=depesz.com; s=20170201; h=In-Reply-To:Content-Type:MIME-Version:References:Reply-To: Message-ID:Subject:Cc:To:Sender:From:Date:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=MrW7VkljX9Qiu//ANAe2zq7ERZGB2b76bmC6Lht9Eiw=; b=hnzn7ubdoxmVR3JgACUpRuNO/G sgHKW23iB5+0tB+PTODxVa4yM3yXaeS/GWehnRNn/XKqSACK2lGDGXRagm2+qSyINMn0AYHSxK32W zP7kIHTO44E5N38Dv5oLijQLbHf3NYffZdjdpVko2EXM//xCK/z1K3i++gAvoY+cqCcg=; Received: from lana.depesz.com ([88.198.49.178] helo=depesz.com) by depesz.com with esmtpa (Exim 4.92) (envelope-from ) id 1oT4WJ-0001se-5x; Tue, 30 Aug 2022 18:55:23 +0200 Date: Tue, 30 Aug 2022 18:55:23 +0200 From: hubert depesz lubaczewski Sender: depesz@depesz.com To: "Voillequin, Jean-Marc" Cc: "pgsql-sql@lists.postgresql.org" Subject: Re: execution id Message-ID: <20220830165523.GA32591@depesz.com> Reply-To: depesz@depesz.com References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, Aug 30, 2022 at 04:22:45PM +0000, Voillequin, Jean-Marc wrote: > Hello guys, > > Is there a kind of magical system administration function that returns a unique id each time a select/insert/update/delete statement is launched? What is the usecase? You can get something like this with statement_timestamp() Best regards, depesz