pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedarray dimensions, pg_catalog.pg_attribute and the \d command
3+ messages / 2 participants
[nested] [flat]
* array dimensions, pg_catalog.pg_attribute and the \d command
@ 2012-02-03 15:41 Achilleas Mantzios <achill@matrix.gatewaynet.com>
0 siblings, 1 reply; 3+ messages in thread
From: Achilleas Mantzios @ 2012-02-03 15:41 UTC (permalink / raw)
To: pgsql-sql
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)
Any reasons why this is so?
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: array dimensions, pg_catalog.pg_attribute and the \d command
@ 2012-02-03 20:21 Dmitriy Igrishin <dmitigr@gmail.com>
parent: Achilleas Mantzios <achill@matrix.gatewaynet.com>
0 siblings, 1 reply; 3+ messages in thread
From: Dmitriy Igrishin @ 2012-02-03 20:21 UTC (permalink / raw)
To: Achilleas Mantzios <achill@matrix.gatewaynet.com>; +Cc: pgsql-sql
Hey Achilleas,
2012/2/3 Achilleas Mantzios <achill@matrix.gatewaynet.com>
> 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)
>
> Any reasons why this is so?
>
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
--
// Dmitriy.
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: array dimensions, pg_catalog.pg_attribute and the \d command
@ 2012-02-06 08:42 Achilleas Mantzios <achill@matrix.gatewaynet.com>
parent: Dmitriy Igrishin <dmitigr@gmail.com>
0 siblings, 0 replies; 3+ messages in thread
From: Achilleas Mantzios @ 2012-02-06 08:42 UTC (permalink / raw)
To: pgsql-sql
On Παρ 03 Φεβ 2012 22:21:49 Dmitriy Igrishin wrote:
> Hey Achilleas,
>
> 2012/2/3 Achilleas Mantzios <achill@matrix.gatewaynet.com>
>
> > 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)
> >
> > Any reasons why this is so?
>
> 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.
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2012-02-06 08:42 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2012-02-03 15:41 array dimensions, pg_catalog.pg_attribute and the \d command Achilleas Mantzios <achill@matrix.gatewaynet.com>
2012-02-03 20:21 ` Dmitriy Igrishin <dmitigr@gmail.com>
2012-02-06 08:42 ` Achilleas Mantzios <achill@matrix.gatewaynet.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox