X-Original-To: pgsql-patches-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 2FF36D1C94B for ; Thu, 4 Mar 2004 08:40:29 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 66487-09 for ; Thu, 4 Mar 2004 04:40:12 -0400 (AST) Received: from cri.ensmp.fr (orgenoy.ensmp.fr [193.48.171.195]) by svr1.postgresql.org (Postfix) with ESMTP id 50932D1BA8F for ; Thu, 4 Mar 2004 04:40:09 -0400 (AST) Received: from sablons.cri.ensmp.fr (sablons.cri.ensmp.fr [10.2.14.143]) by cri.ensmp.fr (8.11.2/8.11.2/mx-cri-CRI) with ESMTP id i248e4I19622; Thu, 4 Mar 2004 09:40:05 +0100 (MET) Date: Thu, 4 Mar 2004 09:40:04 +0100 (CET) From: Fabien COELHO Reply-To: Fabien COELHO To: Bruce Momjian Cc: PostgreSQL Patches Subject: Re: "ALSO" keyword to "CREATE RULE" patch In-Reply-To: <200403031903.i23J3Fx14760@candle.pha.pa.us> Message-ID: References: <200403031903.i23J3Fx14760@candle.pha.pa.us> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200403/37 X-Sequence-Number: 9968 Dear Bruce, > Is ALSO part of the SQL standard? I can't imagine it is because there > is no rule mention. As RULE is not in the SQL standard, ALSO is sure no part of it. > I guess if we were coding from scratch, we could make the syntax INSTEAD > or ALSO, but at this point, I don't see adding ALSO as a useful change. It depends on what you mean by "useful". It is certainly non essential. I just think it is "user-friendly". It took me some time to understand that rules were appended by default. With the "ALSO" keyword it would have been instantaneous. When I first looked at the syntax with the "INSTEAD" which is optionnal and without alternative, I thought that it was one of those useless keywords that are allowed so as to make SQL more English-like, as the "COLUMN" keyword in the ALTER TABLE syntax. You may argue that I did not read the documentation in depth, but I'm not sure I'm the only one;-) The change is very small (2 lines added, 2 lines changed), and upward compatible, provided that the user has not used ALSO as an object name, what seems rather unlikely IMVVHO. Most of the patch deals with the documentation, which is rather ugly because it keeps telling about "INSTEAD" vs "non-INSTEAD" rules, as there is no name for the default behavior. I think "ALSO" fixes this issue as it clarifies the explanations. Have a nice day, -- Fabien.