dbTalk Databases Forums  

[SQL] array dimensions, pg_catalog.pg_attribute and the \d command

mailing.database.pgsql-sql mailing.database.pgsql-sql


Discuss [SQL] array dimensions, pg_catalog.pg_attribute and the \d command in the mailing.database.pgsql-sql forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Achilleas Mantzios
 
Posts: n/a

Default [SQL] array dimensions, pg_catalog.pg_attribute and the \d command - 02-03-2012 , 09:41 AM






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?

--
Sent via pgsql-sql mailing list (pgsql-sql (AT) postgresql (DOT) org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql

Reply With Quote
  #2  
Old   
Dmitriy Igrishin
 
Posts: n/a

Default Re: [SQL] array dimensions, pg_catalog.pg_attribute and the \d command - 02-03-2012 , 02:21 PM






Hey Achilleas,

2012/2/3 Achilleas Mantzios <achill (AT) matrix (DOT) gatewaynet.com>

Quote:
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/s...YS-DECLARATION

--
// Dmitriy.

Reply With Quote
  #3  
Old   
Achilleas Mantzios
 
Posts: n/a

Default Re: [SQL] array dimensions, pg_catalog.pg_attribute and the \d command - 02-06-2012 , 02:42 AM



On *αρ 03 Φεβ 2012 22:21:49 Dmitriy Igrishin wrote:
Quote:
Hey Achilleas,

2012/2/3 Achilleas Mantzios <achill (AT) matrix (DOT) 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/s...YS-DECLARATION
Thanx Dmitry.

--
Sent via pgsql-sql mailing list (pgsql-sql (AT) postgresql (DOT) org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.