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 1uK4dG-00D3za-Vr for pgsql-admin@arkaria.postgresql.org; Wed, 28 May 2025 00:26:59 +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 1uK4dF-00Cgm7-Ia for pgsql-admin@arkaria.postgresql.org; Wed, 28 May 2025 00:26:57 +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 1uK4dF-00Cgl7-5f for pgsql-admin@lists.postgresql.org; Wed, 28 May 2025 00:26:57 +0000 Received: from mail-oo1-xc35.google.com ([2607:f8b0:4864:20::c35]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uK4dB-000SVa-2u for pgsql-admin@lists.postgresql.org; Wed, 28 May 2025 00:26:56 +0000 Received: by mail-oo1-xc35.google.com with SMTP id 006d021491bc7-6065803ef35so854374eaf.1 for ; Tue, 27 May 2025 17:26:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1748392012; x=1748996812; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=9U55gJFpUJS90xIQUmrKV3gGZBGQx37KjiAFn1m29VY=; b=l6Mg/WYuJbtX0SuJEZvnhNeWzeFf3GM/iSIr8zaUYwGJqw1TX80DW6SwlSK4MOftNO 4DwKTaQn1Z1bTgXh6DLKIlhtw26OVOkLcJKHfNfRSYwgF+k+kUUDDDb8DCzPqGgrnbyU 9vi8fhhQBvSsd6zpoIv/2QiES3rYYNXybZfTVX11gjokTlFT0aCsYvRxAtL5/oBDEGhc 5jSyDoSW3oo77YsCIMfuZnULB1wS9r+cG5M/pzB5wzisKDatpnWDrK7NGYtOYGB6Jhim z/vpixBvosG0rB7p8a0fo1quFVje8Wx5nc69zSDHRk9/6wAQiqwgxWRmGdjJBbpSe9Ak 7XWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1748392012; x=1748996812; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=9U55gJFpUJS90xIQUmrKV3gGZBGQx37KjiAFn1m29VY=; b=VqsguUr9FkmLJlt7hJwrHe5MVAbeOZhcs/zVei6kV1QA0AlkGagdHuupubOW9PIxz2 E0DZ2kT7+th9d0rwP1ew1oRVeneNjHftIYSrVsU7BEQWENgaXnCk6wiNONgDpmNR4D2R /bGVKfrPx+tqDoTkZHjEz6QhXUl05LA9EGwi259w3Wgon3OFe/2Mm1d43FoOkEq6oO6G otzsqs2i3ZLr2s8uGtVut95WuQrfrSU9PBg6AEZ1H0puZIQ92/JDFItOMreYtrSRDf7f 8HDNZaCHlAi5hdIsoNtdIKc68oNAIEVV8+6gRZjn048Kyr9u+SF3kthsXo8gkjWY5Cfz 04Mg== X-Gm-Message-State: AOJu0Yz+tlw+PwLLABo3cVr9nJ068wuti+KckW3K5V13NFwCHPEMavEW Gc6igQgYaptL0GDD2uYifNsOkH2fcuwRcxR2Yd9769VuplDyKW1xDL8/YDx3dQoOPRo2NvfeiQS 9SZhMKPVAIAwqn2MxajwmPaTaxCT/Nrk= X-Gm-Gg: ASbGncszV4kqqI5u3OsVnDcciZd48JvVjj/NeT2+ZFDYRX/1FWk1ZPZE4W1zYsslH1D yhnCtVqA6oCEgChjKlDZUEL/uKYWjgZH6aVRRxiA6wKA9XqJnI05V8+ob1sQ2DD8rDpssZvWokd IL+/nf3gZ3TMscSEIoOl0Ng5HUCCVplYxRLCDFgwsUa6Ds1ME9+pxGwl0eN2e6rvRq3pYKZmCzD 1U= X-Google-Smtp-Source: AGHT+IEPzVQGGCW33ysIdiHtw7jHY6wTvXy631JRVr/f0mUGodVXguX0EnHPLGi4MVRLvszLEksuruFiEc8/c4Gmc3g= X-Received: by 2002:a05:6820:440b:b0:606:44f0:a963 with SMTP id 006d021491bc7-60b9fa62432mr7615381eaf.1.1748392011897; Tue, 27 May 2025 17:26:51 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a8a:dd6:0:b0:5c9:f01c:52e7 with HTTP; Tue, 27 May 2025 17:26:51 -0700 (PDT) In-Reply-To: References: From: "David G. Johnston" Date: Tue, 27 May 2025 17:26:51 -0700 X-Gm-Features: AX0GCFvog2YQDFAFTsv9ualH67_nbCu7cH7HOyGBytmcxmrfjJRb_Vjz3oV7Z7s Message-ID: Subject: Re: How to check if a Procedure or FUNCTION EXIST To: Edwin UY Cc: Pgsql-admin Content-Type: multipart/alternative; boundary="000000000000cc21b20636273cd3" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000cc21b20636273cd3 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tuesday, May 27, 2025, Edwin UY wrote: > Hi David J > > Just thought I will just have to check whether the proowner is one of the > users/roles that we've created and if it is so, then it is not a system > function. > By system function, I mean something like version or current_user, they > are system functions, right? Or am I wrong again :( > I mean, so long as you never use/leave =E2=80=9Cpostgres=E2=80=9D (or whate= ver your bootstrap role name is) as the owner of a user-defined function it can work. Schema just seems easier though=E2=80=A6 David J. --000000000000cc21b20636273cd3 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tuesday, May 27, 2025, Edwin UY <edwin.uy@gmail.com> wrote:
Hi David J

Just = thought I will just have to check whether the proowner=C2=A0is one of the u= sers/roles that we've created and if it is so, then it is not a system = function.
By system function, I mean something like version or cu= rrent_user, they are system functions, right? Or am I wrong again :(
<= /div>

I mean, so long as you never us= e/leave =E2=80=9Cpostgres=E2=80=9D (or whatever your bootstrap role name is= ) as the owner of a user-defined function it can work.=C2=A0 Schema just se= ems easier though=E2=80=A6

David J.

=
--000000000000cc21b20636273cd3--