Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pfQ2i-0002su-Re for pgsql-admin@arkaria.postgresql.org; Thu, 23 Mar 2023 18:52:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pfQ2h-0002jP-NT for pgsql-admin@arkaria.postgresql.org; Thu, 23 Mar 2023 18:52:07 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pfQ2h-0002jE-CZ for pgsql-admin@lists.postgresql.org; Thu, 23 Mar 2023 18:52:07 +0000 Received: from mail-ed1-x52c.google.com ([2a00:1450:4864:20::52c]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pfQ2e-0002CM-Vw for pgsql-admin@lists.postgresql.org; Thu, 23 Mar 2023 18:52:06 +0000 Received: by mail-ed1-x52c.google.com with SMTP id ek18so90936752edb.6 for ; Thu, 23 Mar 2023 11:52:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20210112.gappssmtp.com; s=20210112; t=1679597523; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:from:to:cc:subject:date :message-id:reply-to; bh=GtHnG3vgNTSO06Zc+3g31rSDyJ/PwZKBsVmvKCAaUMY=; b=aU0mVIOGMy7ZSX64I19xez/YeoqDBbxZ97gW/y1U57eBxp0NOwNxJx1CpHWBUPRSjZ aB+RkgNIfrV8bln5pk7yDBEyf1m6z5X+doNywqqJ88F5gyunvHPg2uJd5H3ljGyj6geu 9P69bjlWw11EyZxjI0SvExGZA7uvtELxc91iTRwdDaXEniBW4qaImr5c64lqqheAXZW2 AIcX4YMQeO4Isz4l439osMAfc9prv3uRknukkCi4/KvvT8x8SUJ0SnkwzzeU8mA9kkBP g19Akrpvx3aYKZRno/W9Dkr8+lRwW/U0tTVZu3rc656/m5CBBSbb7tFKKJswsmG5oXGp evvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679597523; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=GtHnG3vgNTSO06Zc+3g31rSDyJ/PwZKBsVmvKCAaUMY=; b=bTM+t5uszyTmLnQNfIuEYl2O3r0BVXozAdScDbzl6n+jrxOLgaSKAWM8ac4g35C58g 5Nt4cAxZTodwnmZfyfrr9bUnpGfGNdLiei84UK/PccmvwYjdU0R1yVM135duMlya8QPy t87XWrSKMDov3PatCO0mA8nViZe7VE4t8T3XZtv2sPTzsEVJ9jmxq7Zh1AtXLp9C1nep dN+nv2nctJ+VvvUKtzXulyMqY7r8rZ37QJJkaprchJa9aIZgdBdplO6Qo7FSo1kXfsPR ZM4ml+EblrlwZqsAbRX7aqBE+BYYhjRW51NDd77wfDVT6Jma47dx2kSkwj1xGnHkAum4 IRGg== X-Gm-Message-State: AO0yUKUYRZGcP0prO9VzkCMfwj4M7y90Q39sYzum9o50CvKbneuD/0tW rluevHWNtmG/v39hmTADS7o7ARtRgz1gCtwlPLU= X-Google-Smtp-Source: AK7set8zfYp3nHi6UYN61I0U7c7h+VVRLeV8u6DDA84R82yGviFW+V5Z28LP4enYFp3iJrRybhm9kQ== X-Received: by 2002:a17:906:3710:b0:923:812c:a5d3 with SMTP id d16-20020a170906371000b00923812ca5d3mr6770356ejc.25.1679597523533; Thu, 23 Mar 2023 11:52:03 -0700 (PDT) Received: from localhost.localdomain (178-190-170-115.adsl.highway.telekom.at. [178.190.170.115]) by smtp.gmail.com with ESMTPSA id p9-20020a1709060e8900b0093313f4fc3csm7855552ejf.70.2023.03.23.11.52.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Mar 2023 11:52:03 -0700 (PDT) Message-ID: Subject: Re: PL/pgSQL function to run DDL on a remote server/cluster? From: Laurenz Albe To: Sbob , Pgsql-admin Date: Thu, 23 Mar 2023 19:52:02 +0100 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.4 (3.46.4-1.fc37) MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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= =20 > 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