Re: Number of dimensions of an array parameter - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Number of dimensions of an array parameter
Date
Msg-id 28536.1147112394@sss.pgh.pa.us
Whole thread Raw
In response to Re: Number of dimensions of an array parameter  (Thomas Hallgren <thomas@tada.se>)
Responses Re: Number of dimensions of an array parameter
List pgsql-hackers
Thomas Hallgren <thomas@tada.se> writes:
> Would it be hard to enforce a real check? The implementation could use 
> GUC settings like 'enforce_array_dimensions' and 'enforce_array_lengths' 
> that could be set to false for the legacy implementations that rely on 
> the current behavior.

The fact that it doesn't exactly match Java semantics does not make it
"legacy behavior".  I don't agree that it's a bug; I think it's a
feature, precisely because many functions can work on arrays of
different dimensions.  Why should we change to make PL/Java happier,
when it will move us further away from the semantics of, say, PL/R?

I think reasonable choices for PL/Java would be to reject
multidimensional array arguments, or to silently ignore the
dimensionality and treat the data as 1-D in storage order
(as I think plperl for instance already does).
        regards, tom lane


pgsql-hackers by date:

Previous
From: elein
Date:
Subject: Re: bug? non working casts for domain
Next
From: Tom Lane
Date:
Subject: Re: Pragma linking?