positive bigint arrays - Mailing list pgsql-novice

From SpinDFazor
Subject positive bigint arrays
Date
Msg-id 1377526968938-5768576.post@n5.nabble.com
Whole thread Raw
Responses Re: positive bigint arrays
List pgsql-novice
Hello,
Newbie to pgsql here. I would like to
ADD COLUMN "Scan resolution" bigint[]
This works. However, how can I add a constraint that will check each member
of the bigint array for being positive ?
Any syntax I could think off for CONSTRAINT is raising an error due to type
mismatch between my array and zero;
ALTER TABLE "MRI_data" ADD COLUMN MatrixDims bigint[] CONSTRAINT
positive_dims CHECK (MatrixDims > 0);

in other words, how can I specify "any" member of the array ? I tried
without success
MatrixDims{:} > 0
MatrixDims[:] > 0
MatrixDims{} >0
MatrixDims[] > 0
MatrixDims > 0

Any help greatly appreciated. Surprisingly I could find tons on validation
but nothing on validation of arrays.





--
View this message in context: http://postgresql.1045698.n5.nabble.com/positive-bigint-arrays-tp5768576.html
Sent from the PostgreSQL - novice mailing list archive at Nabble.com.


pgsql-novice by date:

Previous
From: Luca Ferrari
Date:
Subject: Re: Linux group access to ..../psql/data & subdirectories
Next
From: "Miguel Beltran R."
Date:
Subject: Re: positive bigint arrays