Re: Number of dimensions of an array parameter

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Thomas Hallgren <thomas(at)tada(dot)se>
Cc: Stefan Kaltenbrunner <stefan(at)kaltenbrunner(dot)cc>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Number of dimensions of an array parameter
Date: 2006-05-08 18:19:54
Message-ID: 28536.1147112394@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Thomas Hallgren <thomas(at)tada(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2006-05-08 18:24:52 Re: Pragma linking?
Previous Message elein 2006-05-08 18:15:04 Re: bug? non working casts for domain