public inbox for [email protected]
help / color / mirror / Atom feedRe: postgresql FDW vs dblink for DDL
2+ messages / 2 participants
[nested] [flat]
* Re: postgresql FDW vs dblink for DDL
@ 2024-09-09 10:24 Achilleas Mantzios - cloud <[email protected]>
0 siblings, 1 reply; 2+ messages in thread
From: Achilleas Mantzios - cloud @ 2024-09-09 10:24 UTC (permalink / raw)
To: Adrian Klaver <[email protected]>; [email protected] <[email protected]>
On 9/8/24 23:46, Adrian Klaver wrote:
> On 9/8/24 13:04, Achilleas Mantzios wrote:
>> Hi
>>
>> for remote DDL execution (such as CREATE TABLE) is dblink my only
>> option?
>
> You will need to define in what context you are considering options.
>
> For instance you can do remote DDL operations by passing a command or
> script via psql.
Thank you Adrian,
I was thinking of wrapping the DDL around a FUNCTION that will handle
both the local and the (possibly various logical subscriptions), so that
my programmers don't need to write extra scripts.
And the thing is that this creation via DDL is inside our design.
Certain users create some backup tables of the public data in their own
schema (via our app), then do some manipulations on the public data,
then restore to the public or merge with the backups. When done, those
backup tables are dropped. So the DDL is inside the app. And the
question was if dblink is my only option, in the sense of doing this in
a somewhat elegant manner. (and not resort to scripts, etc)
>
>>
>> thanks
>>
>>
>>
>>
>
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: postgresql FDW vs dblink for DDL
@ 2024-09-09 15:31 Adrian Klaver <[email protected]>
parent: Achilleas Mantzios - cloud <[email protected]>
0 siblings, 0 replies; 2+ messages in thread
From: Adrian Klaver @ 2024-09-09 15:31 UTC (permalink / raw)
To: Achilleas Mantzios - cloud <[email protected]>; [email protected] <[email protected]>
On 9/9/24 03:24, Achilleas Mantzios - cloud wrote:
>
> On 9/8/24 23:46, Adrian Klaver wrote:
>> On 9/8/24 13:04, Achilleas Mantzios wrote:
>>> Hi
>>>
>>> for remote DDL execution (such as CREATE TABLE) is dblink my only
>>> option?
>>
>> You will need to define in what context you are considering options.
>>
>> For instance you can do remote DDL operations by passing a command or
>> script via psql.
>
> Thank you Adrian,
>
> I was thinking of wrapping the DDL around a FUNCTION that will handle
> both the local and the (possibly various logical subscriptions), so that
> my programmers don't need to write extra scripts.
>
> And the thing is that this creation via DDL is inside our design.
> Certain users create some backup tables of the public data in their own
> schema (via our app), then do some manipulations on the public data,
> then restore to the public or merge with the backups. When done, those
> backup tables are dropped. So the DDL is inside the app. And the
> question was if dblink is my only option, in the sense of doing this in
> a somewhat elegant manner. (and not resort to scripts, etc)
My sense is yes, if you want to encapsulate all of this within the
database/app you will need to use dblink.
>
>>
>>>
>>> thanks
>>>
>>>
>>>
>>>
>>
--
Adrian Klaver
[email protected]
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2024-09-09 15:31 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-09-09 10:24 Re: postgresql FDW vs dblink for DDL Achilleas Mantzios - cloud <[email protected]>
2024-09-09 15:31 ` Adrian Klaver <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox