Search Postgresql Archives

Re: Advice request : simultaneous function/data updates on many databases

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Mar 4, 2020 at 3:48 PM Rory Campbell-Lange <rory@xxxxxxxxxxxxxxxxxx> wrote:
Any thoughts on how to wrap pl/pgsql function dropping and recreation code
within a wrapper pl/pgsql function?

Not endorsing this but dynamic SQL works just fine (though can get hard to read).  Use format() and EXECUTE ... USING liberally.

CREATE FUNCTION perform_update()...
AS $outer$
BEGIN

drop_sql := $inner$ DROP FUNCTION ...; $inner$
EXECUTE drop_sql;

END;
$outer$;

David J.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux