Re: [Feature Request] Schema Aliases and Versioned Schemas

From: AbdelAziz Sharaf <mickelpower75(at)gmail(dot)com>
To: Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [Feature Request] Schema Aliases and Versioned Schemas
Date: 2024-12-17 15:09:06
Message-ID: CAObAeFiXE=GwqewzPFGxka57_Qv1g6FtkuNZcUQb038vaSgZSw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

it' my first time to know about updatable view and may really serve
I really would appreciate if you discuss my approach also even if not in
first priority
thanks for your time and solution, I really appreciate it
best regards

On Tue, Dec 17, 2024 at 8:16 AM Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>
wrote:

> On Tue, Dec 17, 2024 at 10:01 AM AbdelAziz Sharaf
> <mickelpower75(at)gmail(dot)com> wrote:
> >
> > No
> > when specifying search_path, we build another schema, where each
> duplicate data must be inside
> > what I suggested is to have versions/aliases for schemas and any
> duplicate table/view/... could be inherited if duplicate with all data
> inside and when any version/alias is dropped and another version/alias has
> the same table it's preserved, with data inside
> > that's different behavior where tables attach to schema and if inherited
> from version/table it may create/reuse it with/without data inside
> > and this behavior is resource lightweight for migrations
> > it also could introduce shared tables between schemas
> >
> > Hope this helps
> >
> > > Note : sorry for repeating the msg, I realized the replay was only to
> Ashutouh, not the messaging list, think that's why I didn't have any
> replay, it may be lost
> >
> Hi AbdelAziz,
> IIUC, what you want to do is this
> 1. Create a schema for every version of data
> 2. The tables which do not change across versions are shared by the
> corresponding schemas
> 3. The tables which change with version are created and copied to the
> corresponding schema from (older?) schema
>
> If that's correct, it might be possible to implement it with updatable
> views - one view per schema pointing to the underlying shared table.
> The view might be able to accommodate some changes to table schema
> without actually creating a new table.
> --
> Best Wishes,
> Ashutosh Bapat
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Nikita Malakhov 2024-12-17 15:11:02 SQL/JSON json_table plan clause
Previous Message Tomas Vondra 2024-12-17 14:11:25 Re: Maybe we should reduce SKIP_PAGES_THRESHOLD a bit?