Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aguI3-0007Xu-P7 for pgsql-sql@arkaria.postgresql.org; Fri, 18 Mar 2016 13:18:07 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1aguI3-0004Vy-Bh for pgsql-sql@arkaria.postgresql.org; Fri, 18 Mar 2016 13:18:07 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1aguH3-0002Ub-UA for pgsql-sql@postgresql.org; Fri, 18 Mar 2016 13:17:05 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1aguH1-0002Kt-Dt for pgsql-sql@postgresql.org; Fri, 18 Mar 2016 13:17:05 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id u2IDH0un015321; Fri, 18 Mar 2016 09:17:00 -0400 From: Tom Lane To: Andrew Smith cc: pgsql-sql@postgresql.org Subject: Re: Enhancement to SQL query capabilities In-reply-to: References: Comments: In-reply-to Andrew Smith message dated "Fri, 18 Mar 2016 16:04:55 +1100" Date: Fri, 18 Mar 2016 09:17:00 -0400 Message-ID: <15320.1458307020@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-sql Precedence: bulk Sender: pgsql-sql-owner@postgresql.org Andrew Smith writes: > Looking to migrate a software product to postgres coming from a home-grown > DBMS. Whilst the majority of features in postgres are a gazillion times > better than what our own DBMS has, one feature that I find I am missing is > the ability to dereference foreign key fields in queries without having to > join a bunch of tables together. Aside from the other solutions that have been mentioned, have you considered querying a view that contains the desired join? There's no substitute for fixing that nonstandard syntax, in any case. Even if you could persuade pgsql-hackers that the concept was good (which I really doubt), they'd not go for using : as a selector. regards, tom lane -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql