Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qi020-004udG-By for pgsql-hackers@arkaria.postgresql.org; Sun, 17 Sep 2023 22:14:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qi01z-00CqIe-0m for pgsql-hackers@arkaria.postgresql.org; Sun, 17 Sep 2023 22:14:19 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qi01y-00CqIK-E7 for pgsql-hackers@lists.postgresql.org; Sun, 17 Sep 2023 22:14:18 +0000 Received: from pb-smtp21.pobox.com ([173.228.157.53]) by makus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qi01v-0058fb-CF for pgsql-hackers@lists.postgresql.org; Sun, 17 Sep 2023 22:14:17 +0000 Received: from pb-smtp21.pobox.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id 346141D12F for ; Sun, 17 Sep 2023 18:14:13 -0400 (EDT) (envelope-from david@justatheory.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=pobox.com; h=from :content-type:mime-version:subject:message-id:date:to; s=sasl; bh=uW/l5detB/FwE7JeEKdUsQE/2DKYaOcHmMAlncdsLOQ=; b=YK9Re+HNU6tK UxRUQpDl38MLfOoZua5fVopWs2+hBUfWq8OZCcBLR6yAOPqvlXogq5QaOZXc/blm A3YIKEOnM0SWa/4aJpIkS63zxyWLyMj+wlE49qr/lzdCMj8sVY+yLel5X4tMzkJE vCIaBY6L8dAzyDYgFrQ8eeC/WHlegZM= Received: from pb-smtp21.sea.icgroup.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id 2DA1E1D12E for ; Sun, 17 Sep 2023 18:14:13 -0400 (EDT) (envelope-from david@justatheory.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=justatheory.com; h=from:content-type:mime-version:subject:message-id:date:to; s=2016-12.pbsmtp; bh=uW/l5detB/FwE7JeEKdUsQE/2DKYaOcHmMAlncdsLOQ=; b=k+c2c0Z6DY5XK6tM0OcVYqjGSPnxHULtbx5L+FJlU1KW0Ov3WrxoyzU630JIOmYFdWPP3ryuFSEgUfV1XDgNiRk9P2aJpv1lmmdPzY4v9L3oimisJ4oigHPTrmIzMYlUuBu70G4gLx2/NPC7rQst6U55dCdTfUCtQLglRcORT0A= Received: from smtpclient.apple (unknown [158.222.197.125]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp21.pobox.com (Postfix) with ESMTPSA id 4FC481D12D for ; Sun, 17 Sep 2023 18:14:09 -0400 (EDT) (envelope-from david@justatheory.com) From: "David E. Wheeler" Content-Type: multipart/signed; boundary="Apple-Mail=_2A9D2F32-3FCA-4E92-B992-BCD20E378E24"; protocol="application/pgp-signature"; micalg=pgp-sha256 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6\)) Subject: to_regtype() Raises Error Message-Id: <09F9CAD6-5096-43CC-B6A7-685703E4714D@justatheory.com> Date: Sun, 17 Sep 2023 18:13:56 -0400 To: pgsql-hackers@lists.postgresql.org X-Mailer: Apple Mail (2.3731.700.6) X-Pobox-Relay-ID: 863243BC-55A7-11EE-BF91-A19503B9AAD1-76319746!pb-smtp21.pobox.com List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --Apple-Mail=_2A9D2F32-3FCA-4E92-B992-BCD20E378E24 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 The docs for `to_regtype()` say, =E2=80=9Cthis function will return NULL = rather than throwing an error if the name is not found.=E2=80=9D And = it=E2=80=99s true most of the time: david=3D# select to_regtype('foo'), to_regtype('clam'); to_regtype | to_regtype ------------+------------ [null] | [null] But not others: david=3D# select to_regtype('inteval second'); ERROR: syntax error at or near "second" LINE 1: select to_regtype('inteval second'); ^ CONTEXT: invalid type name "inteval second=E2=80=9D I presume this has something to do with not catching errors from the = parser? david=3D# select to_regtype('clam bake'); ERROR: syntax error at or near "bake" LINE 1: select to_regtype('clam bake'); ^ CONTEXT: invalid type name "clam bake" Best, David --Apple-Mail=_2A9D2F32-3FCA-4E92-B992-BCD20E378E24 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEd+KfmbOQis6ZycGGkt9idPjIgfEFAmUHeiQACgkQkt9idPjI gfE6rhAAgWi+z5h5C4grYsdIFezr239+wdKnHDdSAOiWZxFRR/epywFuNGGDWonF swNAeccjNqfRjFNJp8Nitcuw3IaauNNPHi/Hp0CrdHE2iATpVY3r/siX15FbGIUx 9sQ9glBeceWDtbllPdJSSo7baFlGqaweaeHM9TvRmF1n03Cz83IWFZAjfpcxcXf0 fp5JyyJwxW80xgIu3EzuCNIVzbfxfUbWAJFjbW6QneBmCyHI8jyZZnzR2xBc6xZ/ 8Po5lA9zAOVXtS+0q+7jZtG0cDMsHi+BvesxEZYYekm1VkR/gLD1WthgBaX7Oymo xhBLWGMzCgDPZEub70tsl0/CeL1X4r14PMY01N+XzrYvvQ/HbyZN+Y4Vhu8c3BKo ziN+MiNIOu6N1z2CK1vF1EHmrLE0VoI165Uu8P1uvyA263vhIUm+14Ra1UgCHtrW 19gZiKxC9hv02TauV7Da4+3hGxLTqspmps+5S9A1rYMDhzO4WQkNzzukPe4KlcPa DoNiepVMkfKtT7mBrm3i85YpT/CL6pw4pq5wp0i7mxZfCbOhzlPGXoYaGpW6fu0O cDbYiTkTRaNWUnCtgYeXdcVkjpAAFA/XcN/jgfI6Ls0hFjNj0vcb/fQb8U4Qcsw7 a52OIzldsaY+6p4GMDTttjlYdCPPDoSqx84guxTbf+pPVT/U6lY= =NyPK -----END PGP SIGNATURE----- --Apple-Mail=_2A9D2F32-3FCA-4E92-B992-BCD20E378E24--