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 1nI1nJ-0002CK-4I for pgsql-general@arkaria.postgresql.org; Thu, 10 Feb 2022 05:15:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nI1nH-0000bA-Je for pgsql-general@arkaria.postgresql.org; Thu, 10 Feb 2022 05:14:59 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nI1nH-0000b1-6J for pgsql-general@lists.postgresql.org; Thu, 10 Feb 2022 05:14:59 +0000 Received: from mail-pf1-x42b.google.com ([2607:f8b0:4864:20::42b]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nI1nE-00088h-2L for pgsql-general@postgresql.org; Thu, 10 Feb 2022 05:14:58 +0000 Received: by mail-pf1-x42b.google.com with SMTP id l19so2419434pfu.2 for ; Wed, 09 Feb 2022 21:14:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:mime-version:subject:date:references:to:in-reply-to:message-id; bh=OJQn0L3trwDeYnvRYDGzaO7xHhn83ZyaFjaJe1E5o/0=; b=gz/rKr/mqbkSA54ThE440LDtero7mDDxptQbia4RnpZ5pcCJ7UgGZBoIIaWHP9VkcX dndaQYOapiaX3sjBcWKGARuZA9LZ3yGnvMZvIhT2ktCWept94yIyuTkxx3iCmEjQ7WKV DI6A+Of+nTLue14O+Lqm9OcpXSoriNCRcTcaxkTTC/wy3eh3tYvB1715KTUtlmd1/1Yk /isJH+pFQkdV6G4puk2BK5glnw7+c+3ShSR1Q+3oBTk/pbO+xXxrJGwuy2n/JncsYhtj KHmTpwgQUyxfkpOesZOycUb2JHIXsQJchTsR14ZVXlwr+gV2EP6ZHhQBSm219skXI6vu 8q+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:mime-version:subject:date:references:to :in-reply-to:message-id; bh=OJQn0L3trwDeYnvRYDGzaO7xHhn83ZyaFjaJe1E5o/0=; b=e2wWeB0tuYbEcLcHzB5yCldJTpKTMt4frPZT3d6J9Zx9lp5R0rYUX2jP3KcSZMszMt +is+vVClaQ+vtHTJkGKp0s2gpd/ebLXlEojo9lbhSZ/jzbaL/5uT0krV+QMH+t/dy0Jg LtrTMWCebk4UJ9Hli6MxnNobMsuvptdsGbRIEEdIQSRI5o6RH/s/2iuhp+NzxShEe8nX KdVRlhxJxmP5qLogcFOG+Izt0zVFIiv0nKecgEO4yLSqP9K/2+ks4U4tiArebFlseCh4 zw5KkgELiiRShg6oLaTTkBVlyMQptJ1TR+OhRq2t1Ve51QyBjp8uXUqBpiQZ1LOLvn6T jXCA== X-Gm-Message-State: AOAM530AXBcyIe2JdxT7orZYD2PvViZhe1/8zRRmfPEpW+k4zUxQZmE/ GM3dQj+i3Be63E2wz9vR/gx/mhjcMUEs4A== X-Google-Smtp-Source: ABdhPJwIofz6ijRGQUpKP8l1i0KB7Dk4n5e6ATN9sjuZjPmdtU/sHC3Hq5uG9Xd0gEdDlDWCus1jVg== X-Received: by 2002:aa7:92cd:: with SMTP id k13mr5825151pfa.46.1644470093387; Wed, 09 Feb 2022 21:14:53 -0800 (PST) Received: from smtpclient.apple ([2600:8801:8800:2::c]) by smtp.gmail.com with ESMTPSA id i8sm10369506pgf.94.2022.02.09.21.14.52 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 09 Feb 2022 21:14:52 -0800 (PST) From: Guyren Howe X-Mailbutler-Message-Id: 4B6F3662-4F09-4FC1-A5D6-BF4095492547 Content-Type: multipart/alternative; boundary="Apple-Mail=_26807E30-45CA-4C5F-A62D-EB6F7CA2079C" Mime-Version: 1.0 (Mac OS X Mail 15.0 \(3693.60.0.1.1\)) Subject: Can we go beyond the standard to make Postgres radically better? Date: Wed, 9 Feb 2022 21:14:39 -0800 References: <7117322c-185c-4283-990d-6646d8476409@Spark> To: PG-General Mailing List In-Reply-To: <7117322c-185c-4283-990d-6646d8476409@Spark> Message-Id: X-Mailer: Apple Mail (2.3693.60.0.1.1) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --Apple-Mail=_26807E30-45CA-4C5F-A62D-EB6F7CA2079C Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Postgres has since the outset gone beyond the SQL standard in many ways = : types, inheritance, programmability, generality are all well beyond = what SQL used to mandate and still well beyond the current standard. There are huge developer benefits available to focusing more on making a = great relational programming environment, well outside the SQL standard. Examples of small things Postgres could have: SELECT * - b.a_id from a natural join b let me describe a select list by removing fields from a relation. In the = example, I get all fields in the join of a and b other than the shared = key, which I only get once. note how this simplifies maintaining views wrt changes in tables Let me put the FROM clause first if I can write FROM a join b SELECT a.height, a.name, b.email then an = editor can give me autocomplete when I=E2=80=99m writing the select = clause. Hierarchical schemas Examples of larger things Postgres might have: First-class functions. A global-only namespace is dumb. Schemas are only slightly less dumb. = The obvious way to store and call functions is as values of fields. Let = me organize them how I choose Also let me pass around functions as values, let me make new ones and so = on. Postgres is the best relational programming environment already = because it has a decent type system and more general features. Let=E2=80=99= s expand and also simplify that. Also nested function definitions, so top-level functions can be built = out of local auxiliary functions. Other languages Tutorial D, Datalog, Quell, let=E2=80=99s open this puppy up! SQL is a terrible, no good, very bad language A portable, low-level API An alternative to SQLite that provides CRUD operations on a Postgres = database. I adore Postgres, but this is despite rather than because of SQL. By all = means, let=E2=80=99s have a close-to-standard subset of features, but = let=E2=80=99s fearlessly go beyond them when it would be obviously much = better. --Apple-Mail=_26807E30-45CA-4C5F-A62D-EB6F7CA2079C Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8
Postgres has since the outset gone beyond = the SQL standard in many ways : types, inheritance, programmability, = generality are all well beyond what SQL used to mandate and still well = beyond the current standard.

There are huge developer benefits available to focusing more on making a = great relational programming environment, well outside the SQL = standard.

Examples of small things Postgres could have:
  • SELECT * - b.a_id from a natural join = b
    • let me describe a select list by removing = fields from a relation. In the example, I get all fields in the join = of  a  and b other than the shared key, which I only = get once.
    • note how this simplifies maintaining views = wrt  changes in tables
  • Let me put the FROM clause first
    • if I can write FROM a join b SELECT = a.height, a.name, b.email then an editor can give me autocomplete when = I=E2=80=99m writing the select clause.
  • Hierarchical schemas
Examples of = larger things Postgres might have:
  • First-class functions.
    • A global-only namespace is dumb. Schemas = are only slightly less dumb. The obvious way to store and call functions = is as values of fields. Let me organize them how I choose
    • Also let me pass around functions as = values, let me make new ones and so on. Postgres is the best relational = programming environment already because it has a decent type system and = more general features. Let=E2=80=99s expand and also simplify = that.
    • Also nested function = definitions, so top-level functions can be built out of local auxiliary = functions.
  • Other languages
    • Tutorial D, Datalog, Quell, let=E2=80=99s = open this puppy up!
    • SQL is a terrible, no good, very bad = language
  • A portable, low-level API
    • An alternative to SQLite that provides = CRUD operations on a Postgres database.

I adore Postgres, but this is despite = rather than because of SQL. By all means, let=E2=80=99s have a = close-to-standard subset of features, but let=E2=80=99s fearlessly go = beyond them when it would be obviously much better.
3D""= --Apple-Mail=_26807E30-45CA-4C5F-A62D-EB6F7CA2079C--