Re: Number of dimensions of an array parameter

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: Number of dimensions of an array parameter
Дата
Msg-id 20060508180540.GB20672@svana.org
обсуждение исходный текст
Ответ на Re: Number of dimensions of an array parameter  (Thomas Hallgren <thomas@tada.se>)
Ответы Re: Number of dimensions of an array parameter
Список 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 по дате отправления:

Предыдущее
От: Rod Taylor
Дата:
Сообщение: Re: Number of dimensions of an array parameter
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: XLOG_BLCKSZ vs. wal_buffers table