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 1jLZ38-0003S2-Iw for pgsql-hackers@arkaria.postgresql.org; Mon, 06 Apr 2020 21:12:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jLZ37-0004Xz-G0 for pgsql-hackers@arkaria.postgresql.org; Mon, 06 Apr 2020 21:12:53 +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 1jLZ37-0004Xs-72 for pgsql-hackers@lists.postgresql.org; Mon, 06 Apr 2020 21:12:53 +0000 Received: from sender4-op-o13.zoho.com ([136.143.188.13]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1jLZ34-0005O8-4a for pgsql-hackers@postgresql.org; Mon, 06 Apr 2020 21:12:52 +0000 ARC-Seal: i=1; a=rsa-sha256; t=1586207564; cv=none; d=zohomail.com; s=zohoarc; b=i4EIHqi6ViYnN4C1F6YggU9lT8bmQhpXkWIfobOJihbeEBDegIdQyr2cIOuisCQzotNXfN7BSbYHMUbAWmQGH8f0Xd0yEUAz7iahJYZJJMmhbNs4hGcMe5e4St7PlN8LvNim/0lDaI/1jWUPJLJnBupawDoKzVQDtqYyogp64jI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1586207564; h=Content-Type:Date:From:MIME-Version:Message-ID:Subject:To; bh=EnjmcDntQAZ/SVoZxan1xG/FyZsyJAOcOK7x2zRTq0A=; b=Yx31NC9CjTTkREBpxTn/Uvmc7xVb4W60wFR7dLSMceEW0G42tRI9T8vRUJSEn33MUSXnbgh3bi5NkfLAXTgZY4FBPWWzMn6jk8N2/vXmilzhIXqj7817Hcikqh76zeJN6QOPI/ABHfYNB3CsRDXzW0H0Eq/DyJTMH5KMezQS3DM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=highgo.ca; spf=pass smtp.mailfrom=david.zhang@highgo.ca; dmarc=pass header.from= header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1586207564; s=zoho; d=highgo.ca; i=david.zhang@highgo.ca; h=To:From:Message-ID:Subject:Date:MIME-Version:Content-Type; bh=EnjmcDntQAZ/SVoZxan1xG/FyZsyJAOcOK7x2zRTq0A=; b=jGfROsI3sm7hi56D80LYOGchZZsxci5LEeEyLR6LgezQrFEg7/K/rHHXNg/AM9Xx anwFVd5XWd5+U//YD6tXJAt0pLCMhNcmV3vxidmHNO+rMzAONQ3ml4c6ALNcZ/WS8i5 HnWIpUa1IIygESZojbPf0scNgYrz5a+htoqyF+yg= Received: from david.highgo.ca (S01061056118cdb19.vf.shawcable.net [70.71.187.22]) by mx.zohomail.com with SMTPS id 1586207561626149.93543377987612; Mon, 6 Apr 2020 14:12:41 -0700 (PDT) To: pgsql-hackers@postgresql.org, David Zhang From: David Zhang Message-ID: <332c47fa-d951-7574-b5cc-a8f7f7201202@highgo.ca> Subject: ERROR: invalid input syntax for type circle Date: Mon, 6 Apr 2020 14:12:38 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------427340E4B6F024FAEDB426D5" Content-Language: en-US X-Zoho-Virus-Status: 2 X-ZohoMailClient: External List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. --------------427340E4B6F024FAEDB426D5 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Hi, I got an error when I was trying to insert a circle using the syntax=20 (the 3rd one) specified in the latest document. https://www.postgresql.org/docs/current/datatype-geometric.html#DATATYPE-CI= RCLE < ( x , y ) , r > ( ( x , y ) , r ) =C2=A0 ( x , y ) , r =C2=A0=C2=A0=C2=A0 x , y=C2=A0=C2=A0 , r Here is how to reproduce it. CREATE TABLE tbl_circle(id serial PRIMARY KEY, a circle); INSERT INTO tbl_circle(a) VALUES('( 1 , 1 ) , 5'::circle ); ERROR:=C2=A0 invalid input syntax for type circle: "( 1 , 1 ) , 5" LINE 1: INSERT INTO tbl_circle(a) VALUES('( 1 , 1 ) , 5'::circle ); I made a little change in the "circle_in" function, and then I can enter=20 a circle using the 3rd way. INSERT INTO tbl_circle(a) VALUES('( 1 , 1 ) , 5'::circle ); INSERT 0 1 The fix does generate the same output as the other three ways. INSERT INTO tbl_circle(a) VALUES( '< ( 1 , 1 ) , 5 >'::circle ); INSERT INTO tbl_circle(a) VALUES( '( ( 1 , 1 ) , 5 )'::circle ); INSERT INTO tbl_circle(a) VALUES( '1 , 1 , 5'::circle ); select * from tbl_circle; =C2=A0id |=C2=A0=C2=A0=C2=A0=C2=A0 a ----+----------- =C2=A0 1 | <(1,1),5> =C2=A0 2 | <(1,1),5> =C2=A0 3 | <(1,1),5> =C2=A0 4 | <(1,1),5> (4 rows) Sor far, no error found during the "make check". The patch based on tag "REL_12_2" is attached. --=20 David Software Engineer Highgo Software Inc. (Canada) www.highgo.ca --------------427340E4B6F024FAEDB426D5 Content-Type: text/plain; charset=UTF-8; x-mac-type="0"; x-mac-creator="0"; name="circle-in-input-format-fix.patch" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="circle-in-input-format-fix.patch" ZGlmZiAtLWdpdCBhL3NyYy9iYWNrZW5kL3V0aWxzL2FkdC9nZW9fb3BzLmMgYi9zcmMvYmFj a2VuZC91dGlscy9hZHQvZ2VvX29wcy5jCmluZGV4IDM3Mzc4NGZjYzEuLjZlZmQ1YmMxZjIg MTAwNjQ0Ci0tLSBhL3NyYy9iYWNrZW5kL3V0aWxzL2FkdC9nZW9fb3BzLmMKKysrIGIvc3Jj L2JhY2tlbmQvdXRpbHMvYWR0L2dlb19vcHMuYwpAQCAtNDUyOCw3ICs0NTI4LDcgQEAgY2ly Y2xlX2luKFBHX0ZVTkNUSU9OX0FSR1MpCiAKIAl3aGlsZSAoZGVwdGggPiAwKQogCXsKLQkJ aWYgKCgqcyA9PSBSREVMSU0pIHx8ICgoKnMgPT0gUkRFTElNX0MpICYmIChkZXB0aCA9PSAx KSkpCisJCWlmICgoKnMgPT0gUkRFTElNKSB8fCAoKCgqcyA9PSBSREVMSU1fQykgfHwgKCpz ID09ICdcMCcpKSAmJiAoZGVwdGggPT0gMSkpKQogCQl7CiAJCQlkZXB0aC0tOwogCQkJcysr Owo= --------------427340E4B6F024FAEDB426D5--