casting TEXT to CIDR (or to INET) has to be possible

Поиск
Список
Период
Сортировка
Искать
От
Paul Vixie
Тема
casting TEXT to CIDR (or to INET) has to be possible
Дата
Msg-id
20011220183848.8454B28EE9@as.vix.com
Список
Дерево обсуждения
casting TEXT to CIDR (or to INET) has to be possible Paul Vixie <paul@vix.com>
Re: casting TEXT to CIDR (or to INET) has to be possible Tom Lane <tgl@sss.pgh.pa.us>
============================================================================
                        POSTGRESQL BUG REPORT TEMPLATE
============================================================================


Your name		:	Paul Vixie
Your email address	:	paul@vix.com


System Configuration
---------------------
  Architecture (example: Intel Pentium)  	:	Intel Dual Pentium

  Operating System (example: Linux 2.0.26 ELF) 	:	Freebsd 4.3

  PostgreSQL version (example: PostgreSQL-7.1.1):   PostgreSQL-7.2devel

  Compiler used (example:  gcc 2.95.2)		:	gcc version 2.95.3


Please enter a FULL description of your problem:
------------------------------------------------

I know there's code in the server to convert presentation-format INET or CIDR
into internal format.  To get the effect of C's "inet_netof()" I need to be
able to do this conversion from TEXT rather than from interpreter literals.


Please describe a way to repeat the problem.   Please try to provide a
concise reproducible example, if at all possible: 
----------------------------------------------------------------------

lartomatic=# select (host(relay)||'/18')::cidr from spam limit 5;
ERROR:  Cannot cast type 'text' to 'cidr'
lartomatic=# select (host(relay)||'/18')::inet from spam limit 5;
ERROR:  Cannot cast type 'text' to 'inet'



If you know how this problem might be fixed, list the solution below:
---------------------------------------------------------------------

Nope, this is beyond my abilities.
В списке pgsql-bugs по дате отправления
От: Andrew Hill
Дата:
Сообщение: Strange pg_oid problem.
От: Tony Nicol
Дата:
FAQ