pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Sbob <sbob@quadratum-braccas.com>
To: Pgsql-admin <pgsql-admin@lists.postgresql.org>
Subject: Re: PL/pgSQL function to run DDL on a remote server/cluster?
Date: Thu, 23 Mar 2023 19:52:02 +0100
Message-ID: <ad07bcffd3ab3adc3a98dffa068e0e213d87e006.camel@cybertec.at> (raw)
In-Reply-To: <f793707b-78a6-8c8a-367a-09a4a2a787b6@quadratum-braccas.com>
References: <f793707b-78a6-8c8a-367a-09a4a2a787b6@quadratum-braccas.com>

On Thu, 2023-03-23 at 12:03 -0600, Sbob wrote:
> Is it possible to execute DDL on a remote server/cluster from a PL/pgSQL 
> function?
> If so can someone point me to docs or an example?

You cannot do that with the built-in tools.
You'd have to write an extension that can do that.

Yours,
Laurenz Albe





view thread (5+ messages)  latest in thread

Message-ID: <ad07bcffd3ab3adc3a98dffa068e0e213d87e006.camel@cybertec.at>
Permalink:  ../ad07bcffd3ab3adc3a98dffa068e0e213d87e006.camel@cybertec.at/
Also on:    postgresql.org/message-id/ad07bcffd3ab3adc3a98dffa068e0e213d87e006.camel@cybertec.at

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: laurenz.albe@cybertec.at, sbob@quadratum-braccas.com, pgsql-admin@lists.postgresql.org
  Subject: Re: PL/pgSQL function to run DDL on a remote server/cluster?
  In-Reply-To: <ad07bcffd3ab3adc3a98dffa068e0e213d87e006.camel@cybertec.at>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox