Re: Overloading functions that are used by operators.

From: "Dave Page" <dpage(at)vale-housing(dot)co(dot)uk>
To: "Donald Fraser" <demolish(at)cwgsy(dot)net>
Cc: "[ADMIN]" <pgsql-admin(at)postgresql(dot)org>, "[pgADMIN]" <pgadmin-support(at)postgresql(dot)org>
Subject: Re: Overloading functions that are used by operators.
Date: 2003-07-08 20:49:05
Message-ID: 03AF4E498C591348A42FC93DEA9661B83AF16D@mail.vale-housing.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support pgsql-admin

Ahh, thanks. Was just looking at that.

Well I always thought you could overload functions in this way, however
with your example below, although it creates it OK, PostgreSQL (not
pgAdmin) gives the error 'ERROR: There is more than one function named
textcat'.

As I said, I'm pretty sure that you can overload functions (in fact I
know you can - there's one of mine in PostgreSQL 7.3!). I wonder if in
this case the system knows that it can implicitly cast the arguments of
one function to the other and hence the error is given?

Would this be the case for your citext datatype?

Regards, Dave.

-----Original Message-----
From: Donald Fraser [mailto:demolish(at)cwgsy(dot)net]
Sent: 08 July 2003 21:27
To: Dave Page
Subject: Re: [pgadmin-support] Overloading functions that are
used by operators.


Hi Dave,
if you want an easy way to reproduce it do the following:

CREATE FUNCTION pg_catalog.textcat(varchar, text) RETURNS text
AS 'textcat' LANGUAGE 'internal' IMMUTABLE STRICT;
This wouldn't normally be necessary as we have type casting that
will handle it and or operators but anyway that's beside the point...

Either the above statement is illegal or you have to find a
different method for locating the function name associated with an
operator.
That's the crux of the matter.

Regards
Donald Fraser.

----- Original Message -----
From: Dave Page <mailto:dpage(at)vale-housing(dot)co(dot)uk>
To: Donald Fraser <mailto:demolish(at)cwgsy(dot)net> ; [ADMIN]
<mailto:pgsql-admin(at)postgresql(dot)org>
Cc: [pgADMIN] <mailto:pgadmin-support(at)postgresql(dot)org>
Sent: Tuesday, July 08, 2003 9:12 PM
Subject: RE: [pgadmin-support] Overloading functions
that are used by operators.

-----Original Message-----
From: Donald Fraser [mailto:demolish(at)cwgsy(dot)net]
Sent: 08 July 2003 21:00
To: [ADMIN]
Cc: [pgADMIN]
Subject: [pgadmin-support] Overloading functions
that are used by operators.


I have a question regarding operators which are
causing problems with the new pgAdmin III software being developed and
my database.
The problem has been discussed in depth with the
pgAdmin III development team and they have not been able to resolve the
issue and suggested that I have either done something that I shouldn't
have of or that there is a possible bug with postgresql.

Where was it discussed in depth? The last I heard was
that Andreas was going to look into it.

I will see if I can reproduce the problem myself.

Regards, Dave.

Responses

Browse pgadmin-support by date

  From Date Subject
Next Message Andreas Pflug 2003-07-08 21:05:20 Re: Overloading functions that are used by operators.
Previous Message Donald Fraser 2003-07-08 20:33:55 Fw: Overloading functions that are used by operators.

Browse pgsql-admin by date

  From Date Subject
Next Message Andreas Pflug 2003-07-08 21:05:20 Re: Overloading functions that are used by operators.
Previous Message Donald Fraser 2003-07-08 20:19:45 Re: Overloading functions that are used by operators.