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

From: Hannu Krosing <hannu(at)trust(dot)ee>
To: Jan Wieck <jwieck(at)debis(dot)com>
Cc: "D'Arcy J(dot)M(dot) Cain" <darcy(at)druid(dot)net>, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] A small problem with the new inet and cidr types
Date: 1998-11-03 11:07:44
Message-ID: 363EE400.E20CF87D@trust.ee
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Jan Wieck wrote:
>
> Not calling a function if one of it's arguments is NULL?
> Isn't NULL a legal value?
>
> I know that the function manager interface is damned stupid
> in the case of NULL's. Some of the interface functions pass
> isNull as in/out value and some do not. And the in value only
> tells if any of the arguments are NULL, not which of them. It
> hit me when building PL/pgSQL and PL/Tcl.
>
> Let's redesign the function call interface and define that
> any function has to handle NULL arguments properly. Yes, I
> know what that means :-).

An easier way would be _not_ to call a function with NULL arguments,
_unless_ it declares that it can handle them.

It would probably do the right thing in many (most?) places.

But we do need to redesign not only the function _call_ interface, but
most likely also the function _definition_ mechanisms as well.

On the whole I would like the functions to be more object-like,
meaning that they should have methods (metadata) that could tell
things about them. In addition to an method that tells if the
function can take NULL as an argument and in what positions,
I envision we could also use a method that would tell the max print
length and other "field" attribute of the function return value given
the attributes of function arguments. For example we would be able to
determine that the max length of concatenating varchar(5) and varchar(7)
is varchar(12) and not a varchar of infinite length as we have to
assume now.

Is'nt PostgreSQL supposed to be somewhat OO DBMS ?

----------
Hannu

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Memphisto 1998-11-03 11:35:59 Re: [GENERAL] float8 to text converter
Previous Message Jose' Soares 1998-11-03 09:30:51 Re: [GENERAL] float8 to text converter