Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cvSHk-00028K-P4 for pgsql-hackers@arkaria.postgresql.org; Tue, 04 Apr 2017 17:30:28 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cvSHk-0002Et-Bc for pgsql-hackers@arkaria.postgresql.org; Tue, 04 Apr 2017 17:30:28 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cvSGF-0007fm-6T for pgsql-hackers@postgresql.org; Tue, 04 Apr 2017 17:28:55 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cvSG8-0005e2-LJ for pgsql-hackers@postgresql.org; Tue, 04 Apr 2017 17:28:53 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id v34HSiDU019456; Tue, 4 Apr 2017 13:28:44 -0400 From: Tom Lane To: Peter Eisentraut cc: Andres Freund , Vitaly Burovoy , pgsql-hackers Subject: Re: identity columns In-reply-to: <38c3769c-eec5-19c6-ce33-16838de77ccc@2ndquadrant.com> References: <06a416db-e35b-36d1-7e2f-0affdee24745@2ndquadrant.com> <4b1d703f-818f-00bf-4169-3279af377f3d@2ndquadrant.com> <20170403181918.55rci53cll6fhcq6@alap3.anarazel.de> <38c3769c-eec5-19c6-ce33-16838de77ccc@2ndquadrant.com> Comments: In-reply-to Peter Eisentraut message dated "Mon, 03 Apr 2017 16:31:27 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <19454.1491326924.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Tue, 04 Apr 2017 13:28:44 -0400 Message-ID: <19455.1491326924@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Peter Eisentraut writes: > On 4/3/17 14:19, Andres Freund wrote: > + *op->resvalue =3D Int64GetDatum(nextval_internal(op->d.nextvalueexpr.= seqid, false)); >> Is it guaranteed that the caller expects an int64? I saw that >> nextvalueexpr's have a typeid field. > It expects one of the integer types. We could cast the result of > Int64GetDatum() to the appropriate type, but that wouldn't actually do > anything. Uh, really? On 32-bit platforms, int64 and int32 datums have entirely different representations. regards, tom lane --=20 Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers