what is wrong with data type 'array' ?

Started by Jack Dullabout 23 years ago2 messagesgeneral
Jump to latest
#1Jack Dull
jack_dull@sina.com

hi, all: When I tried the example from PostgreSQL guide as follows:CREATE
TABLE sal_emp (
name text,
pay_by_quarter integer[],
schedule text[][]
); To my surprised, the table created actually isCREATE TABLE sal_emp (
name text,
pay_by_quarter integer[],
schedule text[]
); I was wondering if PostgreSQL really supports multidimensional array
with more than tow dimensions? jack_dull

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Jack Dull (#1)
Re: what is wrong with data type 'array' ?

"Jack Dull" <jack_dull@sina.com> writes:

); I was wondering if PostgreSQL really supports multidimensional array
with more than tow dimensions?

It does, but they aren't considered a fundamentally different datatype
from single-dimensional arrays. Writing extra '[]' pairs in the CREATE
TABLE is just syntactic sugar.

regards, tom lane