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

From: jwieck(at)debis(dot)com (Jan Wieck)
To: lockhart(at)alumni(dot)caltech(dot)edu (Thomas G(dot) Lockhart)
Cc: maillist(at)candle(dot)pha(dot)pa(dot)us, jwieck(at)debis(dot)com, darcy(at)druid(dot)net, taral(at)mail(dot)utexas(dot)edu, 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-04 10:41:24
Message-ID: m0zb0NR-000EBVC@orion.SAPserv.Hamburg.dsh.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>
> > * redesign the function call interface to handle NULLs better
>
> I was planning on looking at this for v6.5, at least in the context of
> trying to solve the problem of returning NULL for pass-by-value types.
>
> We should have some discussion of pass-by-value vs. pass-by-reference
> and whether it is worth having both mechanisms for common data types. As
> it is, functions which return int2 or int4 cannot return NULL because
> there is no way to represent that with these types. I was thinking of
> implementing true smallint/integer pass-by-reference types to clean this
> up.

Actually they can - but only if they take exactly one
argument. fmgr_c() calls those ones with an additional
isNull bool pointer.

The mess is, that we have different entry points to call a
function, some of them pass information about NULL and some
not. What I had in mind was to finally have one single entry
point that handles NULL for any argument and for the return
value.

Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#======================================== jwieck(at)debis(dot)com (Jan Wieck) #

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jose' Soares 1998-11-04 11:20:53 PL/pgSQL a great procedural language for PostgreSQL
Previous Message Michael Meskes 1998-11-04 09:41:54 problem with latest snapshot