quirk of array type processing

From: Greg Stark <gsstark(at)mit(dot)edu>
To: pgsql-hackers(at)postgresql(dot)org
Subject: quirk of array type processing
Date: 2003-09-10 18:46:05
Message-ID: 87fzj41nyq.fsf@stark.dyndns.tv
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


I'm not sure if this should be considered a bug or not. At least in my case it
doesn't cause a problem. I think it could always be worked around with
explicit casts in any case, it just seems... wrong:

db=> create or replace function array_length(integer[]) returns integer
as 'SELECT array_upper($1)-array_lower($1)+1'
language sql
strict immutable;

ERROR: function array_upper(integer[]) does not exist
HINT: No function matches the given name and argument types. You may need to add explicit typecasts.

db=> create or replace function array_length(anyarray) returns integer
as 'SELECT array_upper($1)-array_lower($1)+1'
language sql
strict immutable;

CREATE FUNCTION

--
greg

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Stark 2003-09-10 18:48:55 Re: quirk of array type processing
Previous Message Bruno Wolff III 2003-09-10 18:42:18 Re: Stats Collector Error 7.4beta1 and 7.4beta2