Re: Ok, how do I debug THIS?

From: Larry Rosenman <ler(at)lerctr(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>, josh(at)agliodbs(dot)com, pgsql-sql(at)postgresql(dot)org
Subject: Re: Ok, how do I debug THIS?
Date: 2003-05-13 20:31:13
Message-ID: 312680000.1052857873@lerlaptop.iadfw.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

--On Tuesday, May 13, 2003 16:21:39 -0400 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
wrote:

> Larry Rosenman <ler(at)lerctr(dot)org> 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(at)lerctr(dot)org
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Randall Lucas 2003-05-13 21:01:34 Testing castability of text to numeric
Previous Message Tom Lane 2003-05-13 20:21:39 Re: Ok, how do I debug THIS?