Re: Postgres doesn't seem to enforce array dimensions

From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: Joseph S <jks(at)selectacast(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Postgres doesn't seem to enforce array dimensions
Date: 2010-04-08 18:02:10
Message-ID: 1270749730.6593.14.camel@monkey-cat.sm.truviso.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, 2010-04-08 at 13:30 -0400, Joseph S wrote:
> What's up with Postgres and array dimensions? The table definition
> doesn't even store how many dimensions the array should be.
>

That's a little strange, but it is documented behavior:

>From http://www.postgresql.org/docs/8.4/static/arrays.html :

"However, the current implementation ignores any supplied array size
limits, i.e., the behavior is the same as for arrays of unspecified
length.

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

Regards,
Jeff Davis

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Oleg Bartunov 2010-04-08 18:15:59 Re: fulltext search stemming/ spelling problems
Previous Message Joseph S 2010-04-08 17:30:27 Postgres doesn't seem to enforce array dimensions