Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tGJl2-002CcM-8M for pgsql-hackers@arkaria.postgresql.org; Wed, 27 Nov 2024 15:15:12 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tGJl0-00Fajk-G2 for pgsql-hackers@arkaria.postgresql.org; Wed, 27 Nov 2024 15:15:10 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tESoC-008EUE-IZ for pgsql-hackers@lists.postgresql.org; Fri, 22 Nov 2024 12:30:48 +0000 Received: from mail-lf1-x135.google.com ([2a00:1450:4864:20::135]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1tESo9-003DKA-UA for pgsql-hackers@postgresql.org; Fri, 22 Nov 2024 12:30:47 +0000 Received: by mail-lf1-x135.google.com with SMTP id 2adb3069b0e04-53dd8a528feso362990e87.3 for ; Fri, 22 Nov 2024 04:30:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1732278643; x=1732883443; darn=postgresql.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=xM70pXTOvgDjoUyJsXr6GFLLqSv+xRgzpVdbFrgnkuk=; b=VGH8p6Wp/YGxqS5mQq0qbUy+JCIzzTqthkZxCchAIjb9qwRI9evdC9Es+IoJDEZpzx 8woEtRRFD5ui1Ivb1tMPbT6mOdfXoQU9ix+1GTw1Y3TsBjBo1iCY/WA6qvMJHIbb8vXN wyIUB23gJEr69IQ3+ZP7CThLwcGbgr7+rtyFkdRyhonUVRzlJmxxyZhQVnMH/0QB9P9M haSksEr+Nkqhkd5P96fK8tO101WdFQQy1S+T+QCMuvuqQvCOIfdAlRrjEnKyCbGYXCs/ dA7iAqp/DspL3Ea52THj/zIkHoOn9iI1ROOL0EmCSSTgqgon2VqFO9s9+epzgbX/01cE WgRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732278643; x=1732883443; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=xM70pXTOvgDjoUyJsXr6GFLLqSv+xRgzpVdbFrgnkuk=; b=cu6OAOtzX1a+gPix17QUr1MoqZUhCHgXqWy2MmJtX9FsDTYxU7LGh029uS0eTWJCKL Dr2nhorq/aXMU6fG5OXDdK0gHR1bjVquw2F+Hbq5EF7ceLrJiPSlWwnaVuqjYyU89hvK vM42/r9ABHXtRlNBsfGIWxOvLbGnnwvdC2TRC17aTWxBK6Kny0oRl0ct/iZrwvmzuZSc sYqeCi6BzHwwnXfpfVv9N+2J5/Z5u5wm3iGuD+S/OkE9blab9h04BPd96+LoIgFO9ZcB 2wxbykcclcNE8duf/19P97Jhe7RYgP9Sw3OvRuWwhg2Zp4/WsFKIELvS30/xkHKN3UQY kS9w== X-Gm-Message-State: AOJu0Ywp1P6M0ybnxCpYKayqP+jwA1EMqBrLD2rGHWIfxU608L9joRVv WzPcIm/S9/e/umrx3Xhqcxm4rTOv/R9dS/piZObypnIccpyJ3Us4AoK4ExP6tN8ir4Qp2nnJSDe VpUU77qA3QJ4Cvz8E2FshWoBgn84s9VKH X-Gm-Gg: ASbGncvoX6uvAaycIhYu7jUCCfPyMMVXha+HyBID9suC/BOjPQ1iUhVVp8l3kQaPRzY 6R6nxFksDsj9JOc36bLFHgKQXuV35/gb8 X-Google-Smtp-Source: AGHT+IGrdT7F6sTJQbnVYO0cEAS+7BCLJVa9Wv+gq0FUArTiyQW/7k0Buhqx317GnXSz4myJEYpp712g2MPatBKpcpQ= X-Received: by 2002:a05:6512:b93:b0:539:fd10:f07b with SMTP id 2adb3069b0e04-53dd3aafefemr1510511e87.55.1732278643080; Fri, 22 Nov 2024 04:30:43 -0800 (PST) MIME-Version: 1.0 From: AbdelAziz Sharaf Date: Fri, 22 Nov 2024 14:30:32 +0200 Message-ID: Subject: [Feature Request] Schema Aliases and Versioned Schemas To: pgsql-hackers@postgresql.org Content-Type: multipart/alternative; boundary="0000000000002c4dd606277f8d3f" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000002c4dd606277f8d3f Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Dear PostgreSQL Development Team, I=E2=80=99d like to propose a new feature for consideration: schema aliases= and versions **Problem Statement:** For migrating old db to new one, one must use an external tool or define a dedicated migration script where all possible issues could arise **Proposed Solution:** there is two ways I may think about - versioned schemas : where every version act as a separate schema and the `latest` one or the one the program request is the one in use and each new schema could inherit a table, index, view, ... without additional data - aliases : where every new schema is defined and migrated separately then an alias is set for the one in use **Benefits:** - migration process for under dev projects will be more easier - App env stability, where no data need to be changed in the app other than the logic of newly modified schema, not the connection nor the schema or db name - no need for external tools or servers to migrate or rollback - minimal downtime between migrations and rollback **why I post here** it's addition to core pgsql >> if it's not the right place : I could contact the mailing list you know it's supposed to take feature requests Thank you for considering this feature request. I look forward to feedback or further discussion on this idea. Best regards, Abdelaziz sharaf --0000000000002c4dd606277f8d3f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Dear PostgreSQL Development Team,

I=E2=80=99d like = to propose a new feature for consideration: schema aliases and versions
=
**Problem Statement:**
For migrating=C2=A0old db to new one, one mus= t use an external tool or define a dedicated migration=C2=A0script where al= l possible issues could arise

**Proposed Solution:**
there is two= ways I may think about
- versioned schemas : where=C2=A0every version = act as a separate schema and the `latest` one or the one the program reques= t is the one in use and each new schema could inherit a table, index, view,= ... without additional data
- aliases : where every new schema is defin= ed and migrated=C2=A0separately then an alias=C2=A0is set for the one in us= e

**Benefits:**
- migration process for under dev projects will b= e more easier
- App env stability, where no data need to be chang= ed in the app other than the logic of newly modified schema, not the connec= tion nor the schema or db name
- no need for external tools or se= rvers to migrate or rollback
- minimal downtime between migration= s and rollback

**why I post here**
it's addition to core pgsq= l
>> if it's not the right place : I could contact the mailing= list you know it's supposed to take feature requests

Thank you = for considering this feature request.
I look forward to feedback = or further discussion on this idea.

Best regards,
Abdelaziz shara= f
--0000000000002c4dd606277f8d3f--