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 1mVDr6-0004nk-LS for pgsql-general@arkaria.postgresql.org; Tue, 28 Sep 2021 14:13:12 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mVDr5-0002rZ-G8 for pgsql-general@arkaria.postgresql.org; Tue, 28 Sep 2021 14:13:11 +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 1mVDr5-0002rQ-7a for pgsql-general@lists.postgresql.org; Tue, 28 Sep 2021 14:13:11 +0000 Received: from mail-pl1-x636.google.com ([2607:f8b0:4864:20::636]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mVDr3-0007kd-5u for pgsql-general@lists.postgresql.org; Tue, 28 Sep 2021 14:13:10 +0000 Received: by mail-pl1-x636.google.com with SMTP id t4so14338739plo.0 for ; Tue, 28 Sep 2021 07:13:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:subject:from:to:date:in-reply-to:references:user-agent :mime-version:content-transfer-encoding; bh=rmhhwgEUfo90RXVDVFvP65cje7g8zw4+j7YbPU9iBQM=; b=CsthPW50QyrBLne5YAoxGJ//rP87tVOYphNF09FaaEu69fht9dYK4YaUMOgQ84r5KW sLoIfT9X0sRlsLl5wDQ/uG3ZnrFf1L/5ALl6A+lp8axy4PDhePqOKBSc5pLu34Df5KaK PGyM73CXlXftFA+MsQD+H14OerYAGeBGWlBWC3KU4g8H64FkBPqd8nYmnjne8O2wKIiq An96XwzbCjo2sW9hES+EQrvN2us03IdeBKa+MTj/BBTwjBVKuyjv4aQN91eVCHBSHz2r B3lApEy0EocVOGb2H6v963VvEOrlgmTaSQnC1mVcASQdy5Y6zZwS0SANkgqAcOgYZaeu y6ww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=rmhhwgEUfo90RXVDVFvP65cje7g8zw4+j7YbPU9iBQM=; b=AgCfo6RuIN4/oB64KzMgCSjQDzrNwbsBKs7GGc+T71Np7AJEF7kW44RAsRDLEhuapO 3b4hGTJeM/d3kdCeTIfpv3kdU4qQxST2Ja2t7WcjwhnWUMNV+CBA3XyAy2yGQpTheHbX 5UFh6Zc6en0AsW3w59OV7vq5rjeWlgRx3fG7D/xLBhWwTwFPVJ6XT1nALb2xnTwe8jFJ goxufbG4habFgevtqaIBkcZXDJk+csTgH4dVGUtMPDuwQ5a79nciSvbo8/idRzRSkR4a 3xZ7beRNQ3rVWHz4iBWRLsyfTXrIH22g6vM5XSHQ7Wea99scW/SBF0ZU98/dNxWGhEHf +/hA== X-Gm-Message-State: AOAM532IgzxUb9KzRt0neJrfcqteH/4C+O/lXD39HlpiK7c5WCVPioeU BlXOdVDvXGSKJBLiQXRGMTs= X-Google-Smtp-Source: ABdhPJyJ+ob6ZjVNRppMizmzwCyvv585FaRTsJeRpUUA5sh6ovdT1mUYDI18viYXW1GLWKKbw7Y54g== X-Received: by 2002:a17:90a:f418:: with SMTP id ch24mr126828pjb.134.1632838387388; Tue, 28 Sep 2021 07:13:07 -0700 (PDT) Received: from 192-168-1-138.tpgi.com.au (14-203-92-17.static.tpgi.com.au. [14.203.92.17]) by smtp.gmail.com with ESMTPSA id l128sm21175794pfd.106.2021.09.28.07.13.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Sep 2021 07:13:06 -0700 (PDT) Message-ID: <0ed7dfc54e499f98eac9904f2cfffbc202722bdb.camel@gmail.com> Subject: Re: Nested Schemata, in a Standard-Compliant Way? From: rob stone To: Raymond Brinzer , pgsql-general@lists.postgresql.org Date: Wed, 29 Sep 2021 00:13:03 +1000 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hello Ray, On Tue, 2021-09-28 at 09:24 -0400, Raymond Brinzer wrote: > Greetings. > > > > I'm wondering whether such a feature could be added, without breaking > either existing code, or compliance with the SQL standard.  For > instance, borrowing :: from languages like Ruby and Perl: > > SELECT * FROM ::projects::contacts::people;  -- Absolute path > cd ::projects;                               -- Session-specific > SELECT * FROM contacts::people;              -- Relative path > Double colons are used for casting. E.g., $1::INET or $1::INTEGER where $1 is a string. What you are after are sub schemas. set schema projects; set subschema contacts; select * from people; I don't know enough about the catalogue tables to know if a tree structure for schemas is possible, the amount of work involved or even if there is a valid use case. My 2 cents.