Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e9tBs-0002V8-J5 for pgsql-bugs@arkaria.postgresql.org; Wed, 01 Nov 2017 13:36:20 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1e9tBq-00068o-R5 for pgsql-bugs@arkaria.postgresql.org; Wed, 01 Nov 2017 13:36:18 +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 1e9tBq-00068e-3X for pgsql-bugs@postgresql.org; Wed, 01 Nov 2017 13:36:18 +0000 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1e9tBm-0002WJ-RJ for pgsql-bugs@postgresql.org; Wed, 01 Nov 2017 13:36:16 +0000 Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id B186120BFA; Wed, 1 Nov 2017 09:36:13 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute7.internal (MEProxy); Wed, 01 Nov 2017 09:36:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=ZCvSTH gOeubSoiGmHvd5Tw/3pJy1ki8OlNPYPWMz36Y=; b=GUYFLbDGBdNLKYLg5BkE5J zB16dkjKgkVGDselABzMfwKZN2lY5wKeO5pR4OtoPfKQt47msPPek59uOvaMG9+5 s8i7oelLH0jy2GHu0wP24vPxrk+V3EjzSaH6J0cQo1Z1S9/RKWnnYpXqrMEgW/no KM/6akX0RSqzVD9H5OdZAokRUoCo/d6KSVd038kMSrtqyjZicxz0R8MMdEdp5RYE eJg+LEofiggSG824u1/P+2oj5TdM3Kscy147B1ZEvYDPzNi9cxw8EhmxvJEk756D XoAh1HpzBki2fStGzIzzhAHmDn4BhsP5MRpUYiHeMp+bx/6rdmZiU9Rt48u/XICg == X-ME-Sender: Received: from april.local (c-73-13-66-39.hsd1.pa.comcast.net [73.13.66.39]) by mail.messagingengine.com (Postfix) with ESMTPA id 670802486F; Wed, 1 Nov 2017 09:36:13 -0400 (EDT) Subject: Re: BUG #14866: The generated constraint in the typed table causes the server to crash To: Michael Paquier , gomer94@yandex.ru References: <20171023074458.1473.25799@wrigleys.postgresql.org> Cc: PostgreSQL mailing lists From: Peter Eisentraut Organization: 2ndQuadrant Message-ID: <8dd10932-16f0-7e07-6fd2-be33cbea962e@2ndquadrant.com> Date: Wed, 1 Nov 2017 09:36:12 -0400 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org On 10/23/17 18:21, Michael Paquier wrote: > Attached is a patch to address the problem. There are a couple of > things to consider: > - transformColumnDefinition is missing the fact that a type may not be > set for a column defined, and as far as I can see the type name is > needed beforehand to allow the generation of all the serial commands. > This can happen when using CREATE TABLE OF, as you reported, for which > the data type can be found in the type defined. But this can happen as > well when declaring a child partition. I wonder whether we should even allow this. The SQL standard does not allow identity columns in typed tables, so there is support for that. I'm not sure whether it makes sense in partitions. You are supposed to insert through the partition root, so making identity columns in partitions would just be confusing. > I am adding Peter E in CC, who is the author and committer of the > feature. I am adding an entry in the CF as well. There are two entries for this now. Maybe remove one? -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs