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

From Martijn van Oosterhout
Subject Re: Number of dimensions of an array parameter
Date
Msg-id 20060508180540.GB20672@svana.org
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
On Mon, May 08, 2006 at 07:31:14PM +0200, Thomas Hallgren wrote:
> 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. I know Tom added the ability to have NULL values
> in the arrays. Perhaps now is the time to improve the type semantics as
> well?

The big probem is where do you store the number of declared dimensions?
It's not stored anywhere, so there's nowhere to check against either.
If we can fix that first we might get to the checking part.

test=# create function foo(int[][]) returns int4 as 'select 1' language sql;
CREATE FUNCTION
test=# \df foo                  List of functionsResult data type | Schema | Name | Argument data types
------------------+--------+------+---------------------integer          | public | foo  | integer[]
(1 row)

Have a ncie day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

pgsql-hackers by date:

Previous
From: Rod Taylor
Date:
Subject: Re: Number of dimensions of an array parameter
Next
From: Simon Riggs
Date:
Subject: Re: XLOG_BLCKSZ vs. wal_buffers table