X-Original-To: pgsql-sql@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 92A8F476348 for ; Tue, 13 May 2003 16:31:21 -0400 (EDT) Received: from lerami.lerctr.org (lerami.lerctr.org [207.158.72.11]) by postgresql.org (Postfix) with ESMTP id 8B87B475AA9 for ; Tue, 13 May 2003 16:31:20 -0400 (EDT) Received: from lerlaptop.iadfw.net (lerlaptop.iadfw.net [206.66.13.21]) (authenticated bits=0) by lerami.lerctr.org (8.12.9/8.12.9/20030225) with ESMTP id h4DKVDKK024468; Tue, 13 May 2003 15:31:14 -0500 (CDT) Date: Tue, 13 May 2003 15:31:13 -0500 From: Larry Rosenman To: Tom Lane Cc: Stephan Szabo , josh@agliodbs.com, pgsql-sql@postgresql.org Subject: Re: Ok, how do I debug THIS? Message-ID: <312680000.1052857873@lerlaptop.iadfw.net> In-Reply-To: <28980.1052857299@sss.pgh.pa.us> References: <20030513130508.Q30384-100000@megazone23.bigpanda.com> <295850000.1052856801@lerlaptop.iadfw.net> <28980.1052857299@sss.pgh.pa.us> X-Mailer: Mulberry/3.0.3 (Linux/x86) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Scanned: by amavisd-milter (http://amavis.org/) X-Spam-Status: No, hits=-25.8 required=5.0 tests=BAYES_10,IN_REP_TO,QUOTED_EMAIL_TEXT,QUOTE_TWICE_1, REFERENCES,REPLY_WITH_QUOTES autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200305/249 X-Sequence-Number: 13414 --On Tuesday, May 13, 2003 16:21:39 -0400 Tom Lane wrote: > Larry Rosenman writes: >>> Ugh. cidr doesn't appear to cast to text. You may be able to go >>> through inet, but I'm not really sure because I haven't really used >>> those types. > >> looks like I can, **BUT** is this the RIGHT thing? I suspect it SHOULD >> cast to text. IMNSHO. > > Probably. We have an inet->text cast, and the same function would work > for cidr->text. I think it's just an oversight that there's no such > entry in pg_cast. You could add one by hand ... How would I do that? Also, this is what I wound up with for that line, which seems ugly, because it couldn't find a quote_literal(inet) without the ::text on it: quote_literal(NEW.netblock::inet::text) ; Is that right? > > regards, tom lane -- Larry Rosenman http://www.lerctr.org/~ler Phone: +1 972-414-9812 E-Mail: ler@lerctr.org US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749