| От | Tom Lane |
|---|---|
| Тема | Re: CREATE TYPE with array |
| Дата | |
| Msg-id | 13054.1058971953@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: CREATE TYPE with array (Wolfgang Drotschmann <drotschm@fgan.de>) |
| Список | pgsql-novice |
Wolfgang Drotschmann <drotschm@fgan.de> writes:
> create table xs ( a char(5), l int4array[]);
> CREATE TABLE
> insert into xs values('abcde', '{1,2,3,4}');
> ERROR: array_in: Need to specify dimension
int4array is already an array; I don't think you want to make an array
of arrays. It might work if you wrote the value as something like
'{''{1,2,3}'',''{4,5,6}''}'
(not sure that I have the quoting quite right here) but that sure seems
like the hard way compared to using a multidimensional array.
In short, declare l as int4array not int4array[].
regards, tom lane
В списке pgsql-novice по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера