Re: Ok, how do I debug THIS?
От | Larry Rosenman |
---|---|
Тема | Re: Ok, how do I debug THIS? |
Дата | |
Msg-id | 312680000.1052857873@lerlaptop.iadfw.net обсуждение исходный текст |
Ответ на | Re: Ok, how do I debug THIS? (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Testing castability of text to numeric
|
Список | pgsql-sql |
--On Tuesday, May 13, 2003 16:21:39 -0400 Tom Lane <tgl@sss.pgh.pa.us> wrote: > Larry Rosenman <ler@lerctr.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@lerctr.org US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749
В списке pgsql-sql по дате отправления: