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 1uWeU5-00GvzG-7n for pgsql-admin@arkaria.postgresql.org; Tue, 01 Jul 2025 17:09:29 +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 1uWeU3-007Bi8-7g for pgsql-admin@arkaria.postgresql.org; Tue, 01 Jul 2025 17:09:27 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uWeU2-007Bhq-RG for pgsql-admin@lists.postgresql.org; Tue, 01 Jul 2025 17:09:27 +0000 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uWeU1-0058LZ-0N for pgsql-admin@lists.postgresql.org; Tue, 01 Jul 2025 17:09:27 +0000 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-453608ed113so36280185e9.0 for ; Tue, 01 Jul 2025 10:09:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec.at; s=google; t=1751389764; x=1751994564; darn=lists.postgresql.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:from:to:cc:subject:date :message-id:reply-to; bh=FcDD0qlxqogm4JIZHUoUlTfkUpnnXWz8IfoOQiG2Obg=; b=lZn/G8NQiePaOlxp9No/PuTzlZJlcc6ODFockcvnyLJj2zAnlLUmUIeZPAgQXQ4Uvc L7/96CdF1vzKySJxH4bdeUH4Q978jhIuUBXs+sSMZ7/wFiN/6Q0/lVEC4dxRbjoOTQAm nOOT9KkVLowwa8HHdUn/LjvTBnbjNBecXLuPFQocwFnh0RO/f/Ivk5ImV7Z/g4QRkGra DUOZzfzlAOJmCNDQefjZhaRmfb+aJLuNnVS3NZcyA9Xngzud1tRbzKC9xqSiGTuGKpgn mzNRVZM3xZrz/Av+FO53A0dT1sLNjSDorV6ZfvwD9LyRwe63U2hdLQpz+niu/bdrgq68 tbfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1751389764; x=1751994564; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=FcDD0qlxqogm4JIZHUoUlTfkUpnnXWz8IfoOQiG2Obg=; b=Bo9f39W8A/smVY1MTtV6eQh2IfMST6zG1XYNkI8i3wL6VNKS/Yw/6e55rshi3SFDi/ b4xYB7oIhzw8sJB12OFVjSIHVo6d0nHWX13iOnTyjim/qdyQmTr61xnxY08NHLrNUhQh pz3HjBM/A2+NCLwnoPXfM/n0HsSA/cXc357EbqfpG5KRno1mFnd9gM56tFuPftAZakEX C6SbCBFKOlLbZblRKenlUw9YGOetrlK4cDzLWercN7KlzgIDfue5H78xgimx2avWZDy5 dKF8XRWYPb7F2gs3Xzb3AKGXV+MxTDCdlyQLIZo24p2ScWtZEDlO3tl/8StA8yeKwT/d BJTA== X-Forwarded-Encrypted: i=1; AJvYcCX935xKUY+uImUG1FGB3NeLMJj+lHPbyRO1C7KooTaHvnhsR2+ZvNpSZiMCg6aWlSuwICGYa+plxanezA==@lists.postgresql.org X-Gm-Message-State: AOJu0Ywsec00rAFo6qhqRgbYSpmnuJ0PUzcStVZz3KCf3zIoDAOG/v9z avjqsiRaH9mAXQMc93KsdDA1z5bAjXqAc0vjTOy8z8W8pDHpPTVmCyD/FJ+ZgGEm0K0= X-Gm-Gg: ASbGncvHx1gf47/l46yKvKongGnzAkW46qsZDTbwP80NWsGT+rakZtOinFZUrOHmuu5 JcVOdDOST5+74OD+QxUTu6OZ06/fPFPjtF9g/rT1NYIUQOToZlkF8F//O835lRuBDovfUrPDNcb ++vuIPp9ngneneAEZ5SF9NbBQHixzmLJXq/YS2aWcCGRY8c9OwHzu08fvFUWtvcSm0WOJQC0OCK 6ptHkw8z8rq/5wcLHCSUHY0lmGemoMyco7SsEInZ6J9yJPGWVyC1XT6vw4R4FO1VvuA9IWlQRcC Nb6cqzORu+ydXfhBz+uRuoU7fOOg6kznkH1sO3gRXmrIiLSc84t1TkHq+beYqrziUmq6HP6adTQ KMX6/eb1MVhkDGlpSXMvlM3XYn3E= X-Google-Smtp-Source: AGHT+IHtuv6fzNqA9//dV3Y1ERGxvn4jYJT/q42tHv90ulSBlN7Uz9XTGn3RJagtTZiBpK3yNHbGcQ== X-Received: by 2002:a05:600c:46cb:b0:441:d437:e3b8 with SMTP id 5b1f17b1804b1-4538f88348fmr161199785e9.23.1751389763836; Tue, 01 Jul 2025 10:09:23 -0700 (PDT) Received: from laurenz.albe-K4N0CV00F97414D ([2001:871:260:4e06:1f84:4e47:6c15:c0a5]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-453835798acsm201643885e9.10.2025.07.01.10.09.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Jul 2025 10:09:23 -0700 (PDT) Message-ID: Subject: Re: pg_upgrade failure due to dependencies From: Laurenz Albe To: "Edward J. Sabol" , Pgsql-admin Date: Tue, 01 Jul 2025 19:09:21 +0200 In-Reply-To: References: <396f2fb636248f329c152c6eca189f4348fec726.camel@cybertec.at> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.56.2 (3.56.2-1.fc42) MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, 2025-07-01 at 07:10 -0400, Edward J. Sabol wrote: > On Jul 1, 2025, at 5:37=E2=80=AFAM, Laurenz Albe wrote: > > Moreover, PostgreSQL cannot check dependencies, since the function was = defined using > > the "old"=C2=A0style for SQL functions, where the function body is just= a string. > > If they had used the standard=C2=A0conforming new style, PostgreSQL wou= ld try to trach > > dependencies. =C2=A0Not sure if that would have been=C2=A0enough to avo= id the problem, > > but clearly better. >=20 > Just for my edification, how would one create that PostGIS function using= the > "standard-conforming new style"? CREATE FUNCTION public.st_transform(geom geometry, from_proj text, to_srid = integer) RETURNS geometry IMMUTABLE PARALLEL SAFE STRICT COST 5000 BEGIN ATOMIC SELECT public.postgis_transform_geometry($1, $2, proj4text, $3) FROM public.spatial_ref_sys WHERE srid=3D$3; END; (The IMMUTABLE would still be a lie, though.) > *All* of the examples in PostgeSQL's current documentation are the "old" = (string) > style at=C2=A0https://www.postgresql.org/docs/18/xfunc-sql.html. >=20 > The only example of the new style in the PostgreSQL documentation that I = could > find is the very trivial second example at > https://www.postgresql.org/docs/18/sql-createfunction.html. The other exa= mples > on that web page are all the old style. >=20 > If the new style is better, perhaps someone should update the PostgreSQL > documentation to use it more than just once. More complicated examples of > "new style" SQL functions are needed, I feel. That is true; we could do more there. Yours, Laurenz Albe