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 1ti7I3-00BZ2e-PT for pgsql-admin@arkaria.postgresql.org; Wed, 12 Feb 2025 07:36:11 +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 1ti7I1-0066Jo-SA for pgsql-admin@arkaria.postgresql.org; Wed, 12 Feb 2025 07:36:10 +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 1ti7I1-0066Az-FO for pgsql-admin@lists.postgresql.org; Wed, 12 Feb 2025 07:36:10 +0000 Received: from mail-ej1-x632.google.com ([2a00:1450:4864:20::632]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1ti7Hx-000N37-1e for pgsql-admin@lists.postgresql.org; Wed, 12 Feb 2025 07:36:08 +0000 Received: by mail-ej1-x632.google.com with SMTP id a640c23a62f3a-aaee2c5ee6eso1042838366b.1 for ; Tue, 11 Feb 2025 23:36:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec.at; s=google; t=1739345763; x=1739950563; darn=lists.postgresql.org; h=mime-version:user-agent:references:in-reply-to:date:cc:to:from :subject:message-id:from:to:cc:subject:date:message-id:reply-to; bh=bs9dRy4KO9E5tMIEABnKDz77QuHGpYMID0ZzoCXBXJI=; b=H+ApiBvWxV1NYZy9sG7EVKpwj6t+OeQ6IM21U4u7d42NhIbvWLmrbupSioIhybBwSx ec/d6Uyd1ma/USTLiJz6/I8ZCnPheg62ZWhriHqyQqeHvIiBLWX87s3lw1jPZRJboF8o ZAUrQCTtN+UR25ngjCBjAKLK4GQquBf46YrpBXLHhGVoe3Amt0asFvjpa/3xRnjaU01I GILKdIGDDd7chLYYsLD7IHk3OQQCa/ZJpJnKKLJqcfwJdU+Gz1NAdMWiuIW1LCSkkZmf hUN0uUCZ4oA9C67A7wrrvag8tEqKzW2EWbN4ChUibd0aF9JyYNRTcNjGg6qFJn538STh OENQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739345763; x=1739950563; h=mime-version:user-agent:references:in-reply-to:date:cc:to:from :subject:message-id:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=bs9dRy4KO9E5tMIEABnKDz77QuHGpYMID0ZzoCXBXJI=; b=Pdtu1N6cOCG8MxMrIk2v+77KlWyIek2vBN0vGz8O0rABAr5+7Pna2AYecYYqjHQ4Gi Paon5EonQ8hByLuoutFLXRJlm/HV1D6tZZ0NfZrjGsWU/Cvb+ydgNR9QVyVNYOJNIqjD bXXWh42eIBQ4t08aKeHfSwEXtxE5ATVZcryfFF4iqH4XeUQ2GbsGdIKGR9z1QBEuI5u1 yRxNYMdtxooSVSxQVdF9f0PhZzeBOosVP/5nWHkXoxPn+jiKOgFDZUQ96VHDFoYHTDaR q/yeb5HPVk5DMLYMzQRolEJopR2uZXuulGNEODCmAGA1gfrRg1If6NYVwSpvwV3+Bnx0 W2Jg== X-Gm-Message-State: AOJu0YwARJBPDBTsCavFOj/PJtt3PI+sHVdRoLAgKiGD4fGdYiC8UKea iD4buIG0w7pwNrK9kTVeTB3rQlXXPtcpp/sXtWZQQaRUPNyDyyGK9nAN6aqb5k6rUNbywPCxzuy jtogPs8Y0GiDNZqJhQiQlof50wDfjEno89+rcRNoLas6d1TvDD5nYrnqSuNBVGQ== X-Gm-Gg: ASbGncv3U7q+4H94rHOePGnae48L/6FO2AQMAk8Kpyq5sTC453kkzizhtjOGGhdamkS HXPqsLjLZjqs/jYMwG10UqbRGEhTBkgkpLkiZl91ZgH8q2JkZSu4W0ebB97OEdHHZvMEYtQSSYb +ugpulXdXwiju3MIbrpA0A0PifMGlZ5AwleHliuBv0XGcAYd/tJuZjUcK7PkpqmA3C0UDIBophQ i+ruNYmxlj6vDpCzFz5lI6HEZVDbha5Le9bBpc1s4K1p5G0dCfca6k5YRsKQYE6ajV46kYvRpMq ntB2UbLOwsJ2POJ/qyQsyX9TgROpn94n X-Google-Smtp-Source: AGHT+IGmr89kouAjO/q7U+vZSd4EGG7WwRHCoOm/KwayhO8VYovy787WxGT5xOzZ1bYzJltEg0JlJA== X-Received: by 2002:a17:907:720d:b0:ab7:bac4:b321 with SMTP id a640c23a62f3a-ab7f33d3571mr156445366b.29.1739345762707; Tue, 11 Feb 2025 23:36:02 -0800 (PST) Received: from localhost.localdomain ([41.66.98.117]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ab7c520a3a2sm525159966b.158.2025.02.11.23.36.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Feb 2025 23:36:02 -0800 (PST) Message-ID: <3fc539fbd75c0634f31ead1d84f383b37ae19a34.camel@cybertec.at> Subject: Re: Security definer function to alter a sequence From: Laurenz Albe To: Sbob , "David G. Johnston" Cc: pgsql-admin@lists.postgresql.org Date: Wed, 12 Feb 2025 08:36:01 +0100 In-Reply-To: <60f17e57-2549-442a-a11d-5e9ec63bd4eb@quadratum-braccas.com> References: <9b25ab25-5c2c-440a-8bc5-ee77105387ff@quadratum-braccas.com> <60f17e57-2549-442a-a11d-5e9ec63bd4eb@quadratum-braccas.com> User-Agent: Evolution 3.54.3 (3.54.3-1.fc41) MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, 2025-02-11 at 15:57 -0700, Sbob wrote: > I thought that DDL calls in a security definer function were blocked. I may be confused I think you are. I am not aware of anything that is forbidden in a SECURITY DEFINER function. On the contrary - people usually use them to perform activities that the calling user is not allowed to do. Don't forget to set a "search_path" on all SECURITY DEFINER functions. Yours, Laurenz Albe -- *E-Mail Disclaimer* Der Inhalt dieser E-Mail ist ausschliesslich fuer den bezeichneten Adressaten bestimmt. Wenn Sie nicht der vorgesehene Adressat dieser E-Mail oder dessen Vertreter sein sollten, so beachten Sie bitte, dass jede Form der Kenntnisnahme, Veroeffentlichung, Vervielfaeltigung oder Weitergabe des Inhalts dieser E-Mail unzulaessig ist. Wir bitten Sie, sich in diesem Fall mit dem Absender der E-Mail in Verbindung zu setzen. *CONFIDENTIALITY NOTICE & DISCLAIMER *This message and any attachment are confidential and may be privileged or otherwise protected from disclosure and solely for the use of the person(s) or entity to whom it is intended. If you have received this message in error and are not the intended recipient, please notify the sender immediately and delete this message and any attachment from your system. If you are not the intended recipient, be advised that any use of this message is prohibited and may be unlawful, and you must not copy this message or attachment or disclose the contents to any other person.