Re: [HACKERS] Re: inet/cidr/bind

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: [HACKERS] Re: inet/cidr/bind
Дата
Msg-id 199810200300.XAA27911@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: [HACKERS] Re: inet/cidr/bind  (darcy@druid.net (D'Arcy J.M. Cain))
Ответы Re: [HACKERS] Re: inet/cidr/bind
Список pgsql-hackers
> Thus spake Taral
> > Can't we just use a CONSTRAINT where a host address is expected? That sounds
> > easier than setting up two different types to me...
> 
> The constraint would be pretty complicated and it doesn't handle the
> different output rules.
> 
> Don't worry.  After things settle down we'll fold things together so
> that there is two input wrapper functions and everything else will be
> handled by the same functions so you won't hardly know the difference.
> I too originally thought there should be one type but Paul has convinced
> me otherwise.
> 

If you define a fuction that can take inet or cidr type, I recommend you
define a typedef called something like "inet_or_cidr" that is the same
as inet, and use that in functions that can take either type.

You can then clearly see what functions can take either type.  Also, you
will not know at the time you are called what type is really being
passed, but it may not matter, or you may be able to figure out what to
do based on the data inside the type.

Also, D'Arcy, the pressure is on.  There will not be a lot of time for
debugging and redesign.  I am here if you need help.

--  Bruce Momjian                        |  http://www.op.net/~candle maillist@candle.pha.pa.us            |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


В списке pgsql-hackers по дате отправления:

Предыдущее
От: darcy@druid.net (D'Arcy J.M. Cain)
Дата:
Сообщение: Re: [HACKERS] Re: inet/cidr/bind
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] Re: inet/cidr/bind