Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hLBo3-0002m1-JS for pgsql-hackers@arkaria.postgresql.org; Mon, 29 Apr 2019 19:19:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hLBo2-0006j0-8O for pgsql-hackers@arkaria.postgresql.org; Mon, 29 Apr 2019 19:19:14 +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_SHA1:256) (Exim 4.89) (envelope-from ) id 1hLBo1-0006ch-J9 for pgsql-hackers@lists.postgresql.org; Mon, 29 Apr 2019 19:19:13 +0000 Received: from anastigmatix.net ([68.171.219.55]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hLBny-0007ao-E6 for pgsql-hackers@postgresql.org; Mon, 29 Apr 2019 19:19:13 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=anastigmatix.net; s=default; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=SZVWJSQ0xtsjUj5YHfzrBcSBOMHNwnXa/5SKjKOuEfI=; b=OiZFcZeDvYXTRAF62GCV4K4cvm cLg3WV9Xixh2r/6hEbYt+5Kq7taGnnZaj/g5Kuixlo+K9kIq55kAg/JHKnYAQq5esvxTCQ+M9tosB rcK0LquOBuC797sfj2/ihHXH2xPiamt0wiAmb530HAPM6snHPJXyp7LgACFsjmFP5uNgUucYq0r94 BLJoWBqPWmQ3KuwlrBPfSIHVwhbJwzjStlKW56hvAnX4ZZ0X4tb/SeZbmbmSGrFtlYbdancUz8Fkq Wz6TFtT58GdehuhE/uuTiBCn+MXF8XlIeoplIcoNSUAr3pLe5D8LnSIH+CWQX3F5Gd4xRU3sMyNm8 F2W1sXQQ==; Received: from cos-128-210-107-27.science.purdue.edu ([128.210.107.27]:45142 helo=gibbs.math.purdue.edu) by bay.acenet.us with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.91) (envelope-from ) id 1hLBnq-00F8EP-Nc; Mon, 29 Apr 2019 15:19:07 -0400 Subject: Re: generate documentation keywords table automatically To: Peter Eisentraut , Tom Lane Cc: pgsql-hackers References: <07daeadd-8c82-0d95-5e19-e350502cb749@2ndquadrant.com> <21977.1556378722@sss.pgh.pa.us> From: Chapman Flack Message-ID: Date: Mon, 29 Apr 2019 15:19:02 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-OutGoing-Spam-Status: No, score=-95.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bay.acenet.us X-AntiAbuse: Original Domain - postgresql.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - anastigmatix.net X-Get-Message-Sender-Via: bay.acenet.us: authenticated_id: chap@anastigmatix.net X-Authenticated-Sender: bay.acenet.us: chap@anastigmatix.net X-Source: X-Source-Args: X-Source-Dir: X-From-Rewrite: unmodified, already matched List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 4/29/19 2:45 PM, Peter Eisentraut wrote: >> A policy issue, independent of this mechanism, is how many different >> SQL spec versions we want to show in the table. > > We had previously established that we want to show 92 and the latest > two. I don't propose to change that. An annoying API requirement imposed by the JDBC spec applies to its method DatabaseMetaData.getSQLKeywords(): It is required to return a list of the keywords supported by the DBMS that are NOT also SQL:2003 keywords. [1] Why? I have no idea. Were the JDBC spec authors afraid of infringing ISO copyright if they specified a method that just returns all the keywords? So instead they implicitly require every JDBC developer to know just what all the SQL:2003 keywords are, to make any practical use of the JDBC method that returns only the keywords that aren't those. To make it even goofier, the requirement in the JDBC spec has changed (once, that I know of). It has been /all the keywords not in SQL:2003/ since JDBC 4 / Java SE 6 [2], but before that, it (the same method!) was spec'd to return /all the keywords not in SQL92/. [3] So the ideal JDBC developer will know (a) exactly what keywords are SQL92, (b) exactly what keywords are SQL:2003, and (c) which JDBC version the driver in use is implementing (though, mercifully, drivers from pre-4.0 should be rare by now). If the reorganization happening in this thread were to make possible run-time-enumerable keyword lists that could be filtered for SQL92ness or SQL:2003ness, that might relieve an implementation headache that, at present, both PgJDBC and PL/Java have to deal with. Regards, -Chap [1] https://docs.oracle.com/en/java/javase/12/docs/api/java.sql/java/sql/DatabaseMetaData.html#getSQLKeywords() [2] https://docs.oracle.com/javase/6/docs/api/index.html?overview-summary.html [3] https://docs.oracle.com/javase/1.5.0/docs/api/index.html?overview-summary.html