PostgreSQL/Array/array dims — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
Admin (обсуждение | вклад) м (1 версия) |
(нет различий)
|
Текущая версия на 13:14, 26 мая 2010
Using array_dims()
<source lang="sql">
postgres=# CREATE TABLE book (id integer,titles text[]); CREATE TABLE postgres=# postgres=# INSERT INTO book VALUES (102, "{"AAA\"s VVVV"}"); INSERT 0 1 postgres=# INSERT INTO book VALUES (103, "{"AAA", "VVVV"}"); INSERT 0 1 postgres=# postgres=# -- Using array_dims(?) postgres=# SELECT array_dims(titles) FROM book;
array_dims
[1:1] [1:2]
(2 rows) postgres=# drop table book; DROP TABLE postgres=#
</source>