Re: [HACKERS] A small problem with the new inet and cidr types

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: darcy(at)druid(dot)net (D'Arcy J(dot)M(dot) Cain)
Cc: tgl(at)sss(dot)pgh(dot)pa(dot)us, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] A small problem with the new inet and cidr types
Date: 1998-11-02 18:35:43
Message-ID: 199811021835.NAA17944@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> Thus spake Tom Lane
> > My guess is that maybe this should not be fixed in the individual
> > datatypes at all; instead the generic function and operator code should
> > be modified so that if any input value is NULL, then NULL is returned as
> > the result without ever calling the datatype-specific code.
>
> Could it be tied to the return type? IOW, functions or operators
> that return bool return FALSE, text return "", etc.
>
> > There might be specific operators for which this is not the right
> > behavior (although none spring to mind immediately). In that case,
> > I think the best bet would be to have a per-operator flag, defaulting
> > to OFF, which could be turned on for those specific operators that are
> > prepared to cope with null inputs.
>
> Obviously that will have to wait for 6.5 since it requires an initdb
> to add the field. Do we want to wait that long?

The only thing I can add here is to look at the other functions, and do
what they do.

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Constantin Teodorescu 1998-11-02 18:45:15 Small bugs in PostgreSQL 6.4 beta5
Previous Message Taral 1998-11-02 18:31:23 RE: [HACKERS] A small problem with the new inet and cidr types