Re: Postgres doesn't seem to enforce array dimensions

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Jeff Davis <pgsql(at)j-davis(dot)com>
Cc: Joseph S <jks(at)selectacast(dot)net>, pgsql-general(at)postgresql(dot)org
Subject: Re: Postgres doesn't seem to enforce array dimensions
Date: 2010-04-08 23:36:11
Message-ID: 1270769771.8305.999.camel@ebony
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Diego Schulz 2010-04-09 00:10:01 Re: when i logged in mydb,any sql command used to list all the tables in this mydb?
Previous Message sunpeng 2010-04-08 21:34:56 how to debug the codes in the PostgresMain() from the begining of this function to the "for (;;)" loop that handles the connection?