Lost a function overloading capability?

From: "Thomas G(dot) Lockhart" <lockhart(at)alumni(dot)caltech(dot)edu>
To: Postgres Hackers List <hackers(at)postgresql(dot)org>
Subject: Lost a function overloading capability?
Date: 1998-02-18 07:49:33
Message-ID: 34EA928D.1F1F10B5@alumni.caltech.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I was updating some utilities in config/ the other day and noticed that
we have apparently lost a capability for function overloading on
built-in functions:

CREATE FUNCTION abstime_datetime(int4)
RETURNS datetime AS '-' LANGUAGE 'internal';

used to allow me to overload the built-in function abstime_datetime() to
convert Unix system times stored as integers into a datetime type. I can
still define it, but it never gets a good input value. For example,
after defining this function I should be able to say:

SELECT abstime_datetime(0);
abstime_datetime
----------------------------
Tue Apr 23 13:51:12 1974 GMT
(1 row)

should give me 'Thu Jan 01 00:00:00 1970 GMT' instead. Input values
which should be passed by reference are also affected.

Does this ring a bell with anyone? Could something have changed with the
inclusion of the PL interface (just speculating here)? It would be nice
to get this capability back, and if not then to remove my contrib code
which no longer works :(

- Tom

Another possibility is that I am not remembering the right way to do
this, _and_ didn't remember correctly _and_ didn't test anything back
when I make the unixdate.sql contrib file. I don't _think_ I would have
missed all of these steps, but...

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Meskes 1998-02-18 08:12:47 Re: [HACKERS] ecpg stuff
Previous Message Maurice Gittens 1998-02-18 07:07:36 Re: [HACKERS] Memory leaks for large objects