Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id CBE921F32A3B for ; Mon, 6 Feb 2012 04:42:59 -0400 (AST) Received: from adsltrust.ath.forthnet.gr ([194.219.204.174] helo=smadev.internal.net) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1RuKA6-00011c-IM for pgsql-sql@postgresql.org; Mon, 06 Feb 2012 08:43:00 +0000 Received: from smadev.internal.net (localhost [127.0.0.1]) by smadev.internal.net (8.14.4/8.14.4) with ESMTP id q168ghZc000398 for ; Mon, 6 Feb 2012 10:42:43 +0200 (EET) (envelope-from achill@matrix.gatewaynet.com) Received: (from achill@localhost) by smadev.internal.net (8.14.4/8.14.4/Submit) id q168gh4f000397 for pgsql-sql@postgresql.org; Mon, 6 Feb 2012 10:42:43 +0200 (EET) (envelope-from achill@matrix.gatewaynet.com) X-Authentication-Warning: smadev.internal.net: achill set sender to achill@matrix.gatewaynet.com using -f From: Achilleas Mantzios Organization: Dynacom Tankers Mgmt To: pgsql-sql@postgresql.org Subject: Re: array dimensions, pg_catalog.pg_attribute and the \d command Date: Mon, 6 Feb 2012 10:42:43 +0200 User-Agent: KMail/1.13.7 (FreeBSD/8.2-RELEASE-p3; KDE/4.7.3; amd64; ; ) References: <201202031741.59171.achill@matrix.gatewaynet.com> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <201202061042.43350.achill@matrix.gatewaynet.com> X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201202/16 X-Sequence-Number: 36309 On =CE=A0=CE=B1=CF=81 03 =CE=A6=CE=B5=CE=B2 2012 22:21:49 Dmitriy Igrishin = wrote: > Hey Achilleas, >=20 > 2012/2/3 Achilleas Mantzios >=20 > > Hello, > > just a question regarding multidimensional arrays. > > When i create an array, its number of dimensions is recorded in > > pg_catalog.pg_attribute (attndims), but they are not enforced upon > > insertion, > > nor is this presented by \d command. (i didn't see any attndims column > > showing > > up in the logs) > >=20 > > Any reasons why this is so? >=20 > According to the documentation > "The current implementation does not enforce the declared number > of dimensions either. Arrays of a particular element type are all > considered to be of the same type, regardless of size or number > of dimensions. So, declaring the array size or number of dimensions > in CREATE TABLE is simply documentation; it does not affect run-time > behavior." > See > http://www.postgresql.org/docs/9.1/static/arrays.html#ARRAYS-DECLARATION Thanx Dmitry.