Documentation updated to mention dimmensions are not enforced.
---
Stefan Kaltenbrunner wrote:
Thomas Hallgren wrote:
I can create a function that takes a two dimension int array:
CREATE FUNCTION twodims(int[][])
Bruce Momjian pgman@candle.pha.pa.us writes:
Documentation updated to mention dimmensions are not enforced.
This patch seems entirely pointless, since the point is already made
(with correct spelling even) in the very next line.
regards, tom lane
Tom Lane wrote:
Bruce Momjian pgman@candle.pha.pa.us writes:
Documentation updated to mention dimmensions are not enforced.
This patch seems entirely pointless, since the point is already made
(with correct spelling even) in the very next line.
Thanks, reverted.
--
Bruce Momjian
I can create a function that takes a two dimension int array:
CREATE FUNCTION twodims(int[][]) RETURNS void AS ...
but there's nothing stopping me from calling this function with an
arbitrary number of dimensions on the array.
I'd like to map a parameter like the one above to a
Thomas Hallgren [EMAIL PROTECTED] writes:
Only allow arrays with one dimension unless the parameter is of a domain
type (domains are apparently stored with the actual number of
dimensions).
No, they don't enforce dimensionality any more than ordinary array
columns do. typndims and attndims
Stefan Kaltenbrunner wrote:
while it would be nice to improve that - it is actually documented quite
clearly.
http://www.postgresql.org/docs/current/static/arrays.html has:
However, the current implementation does not enforce the array size
limits — the behavior is the same as for arrays of
Thomas Hallgren wrote:
I can create a function that takes a two dimension int array:
CREATE FUNCTION twodims(int[][]) RETURNS void AS ...
but there's nothing stopping me from calling this function with an
arbitrary number of dimensions on the array.
I'd like to map a parameter like the
thhal=# CREATE DOMAIN twodims as int[][];
CREATE DOMAIN
While still not perfect, you can use a CHECK constraint on the domain to
enforce dimension.
It's not perfect because domain constraints are not enforced in all
locations in versions earlier than 8.2. Adding extra explicit casts can
often
On Mon, May 08, 2006 at 07:31:14PM +0200, Thomas Hallgren wrote:
Would it be hard to enforce a real check? The implementation could use
GUC settings like 'enforce_array_dimensions' and 'enforce_array_lengths'
that could be set to false for the legacy implementations that rely on
the current
Thomas Hallgren [EMAIL PROTECTED] writes:
Would it be hard to enforce a real check? The implementation could use
GUC settings like 'enforce_array_dimensions' and 'enforce_array_lengths'
that could be set to false for the legacy implementations that rely on
the current behavior.
The fact
Tom Lane wrote:
Thomas Hallgren [EMAIL PROTECTED] writes:
Would it be hard to enforce a real check? The implementation could use
GUC settings like 'enforce_array_dimensions' and 'enforce_array_lengths'
that could be set to false for the legacy implementations that rely on
the current
Martijn van Oosterhout wrote:
On Mon, May 08, 2006 at 07:31:14PM +0200, Thomas Hallgren wrote:
Would it be hard to enforce a real check? The implementation could use
GUC settings like 'enforce_array_dimensions' and 'enforce_array_lengths'
that could be set to false for the legacy
12 matches
Mail list logo