Re: Postgres doesn't seem to enforce array dimensions - Mailing list pgsql-general

From Simon Riggs
Subject Re: Postgres doesn't seem to enforce array dimensions
Date
Msg-id 1270769771.8305.999.camel@ebony
Whole thread Raw
In response to Re: Postgres doesn't seem to enforce array dimensions  (Jeff Davis <pgsql@j-davis.com>)
List pgsql-general
On Thu, 2010-04-08 at 11:02 -0700, Jeff Davis wrote:

> 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.

And if you don't like that, use a CHECK constraint to enforce whatever
rule you think appropriate. All, some or none: your choice. Cool.

--
 Simon Riggs           www.2ndQuadrant.com


pgsql-general by date:

Previous
From: sunpeng
Date:
Subject: when i logged in mydb,any sql command used to list all the tables in this mydb?
Next
From: Diego Schulz
Date:
Subject: Re: when i logged in mydb,any sql command used to list all the tables in this mydb?