RE: Scripting a ALTER PROCEDURE or FUNCTION to Change OWNER

Поиск
Список
Период
Сортировка
От
Тема RE: Scripting a ALTER PROCEDURE or FUNCTION to Change OWNER
Дата
Msg-id 001401dac1b9$edd4aea0$c97e0be0$@incisivetechgroup.com
обсуждение исходный текст
Ответ на RE: Scripting a ALTER PROCEDURE or FUNCTION to Change OWNER  (PABLO ANDRES IBARRA DUPRAT <Pablo.Ibarra@itau.cl>)
Ответы Re: Scripting a ALTER PROCEDURE or FUNCTION to Change OWNER
Список pgsql-admin

 

Following scripts will take care to change schema owner

 

Mk_altr_proc_owner.sql  ( copy past this SQL statement)

SELECT ' alter procedure '||rtrim(nspname)||'.'||ltrim( proname )||' owner to targetschema;'

FROM    pg_catalog.pg_namespace 

JOIN    pg_catalog.pg_proc 

ON      pronamespace = pg_namespace.oid

WHERE   nspname = 'yourschemaname

ORDER BY Proname  ;

 

Psql -h hostname -U ursename -d dbname -t -A -f mk_altr_proc_owner.sql -o altr_proc_owner.sql

 

Psql -h hostname -U username -d dbname -f altr_proc_woner.sql -o alter_proc_owner.log

 

 

--Raju

 

From: PABLO ANDRES IBARRA DUPRAT <Pablo.Ibarra@itau.cl>
Sent: Tuesday, June 18, 2024 3:47 PM
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: pgsql-admin@lists.postgresql.org
Subject: RE: Scripting a ALTER PROCEDURE or FUNCTION to Change OWNER

 

                                    Hi David,

 

                                               Why do you say that reassined operation don’t work for me?

                                               This operation is for assign an account for execute all modifications required over the environment.

 

                                    Greetings

 

 

De: David G. Johnston <david.g.johnston@gmail.com>
Enviado el: martes, 18 de junio de 2024 15:39
Para: PABLO ANDRES IBARRA DUPRAT <Pablo.Ibarra@itau.cl>
CC: pgsql-admin@lists.postgresql.org
Asunto: Re: Scripting a ALTER PROCEDURE or FUNCTION to Change OWNER

 

On Tuesday, June 18, 2024, PABLO ANDRES IBARRA DUPRAT <Pablo.Ibarra@itau.cl> wrote:

                                    Hi Dear Community.

 

                                               I need your help with advices about the way to script a SQL command to generate a list of ALTER PROCEDURE and change owner of a big number of procedures.

                                               As you know to identify the procedure or function is neccesary to add to the name of routine and  list of parameters with their data type in each case.

                                               Please any advice Will be appreciate.

 

                                        

 

Have you determined that “reassigned owned” won’t work for you?

 

David J.

 

ADVERTENCIA: E-Mail externo, favor verifique remitente, no descargue archivos adjuntos de remitentes desconocidos, no haga Clic en enlaces. Ante sospechas reporte a Seguridad de Información Itau seguridadinformacion@itau.cl

Para asegurar la adecuada lectura en todo tipo de correos electronicos, se han omitido intencionalmente los signos y acentos diacriticos del idioma castellano. La informacion contenida en este mensaje y cualquier archivo adjunto es confidencial y no puede ser usada por mas personas que sus destinatarios. El uso no autorizado de esta informacion puede ser sancionado de conformidad con el Codigo Penal chileno. Si ha recibido este correo por error, por favor notifique al remitente respondiendo este mismo mensaje y elimine el mensaje y todos los archivos adjuntos. Internet no puede garantizar la integridad de este mensaje, por lo que el Banco no se hace responsable si el contenido del mismo ha sido alterado.

Вложения

В списке pgsql-admin по дате отправления:

Предыдущее
От: PABLO ANDRES IBARRA DUPRAT
Дата:
Сообщение: RE: Scripting a ALTER PROCEDURE or FUNCTION to Change OWNER
Следующее
От: Ron Johnson
Дата:
Сообщение: Re: Scripting a ALTER PROCEDURE or FUNCTION to Change OWNER