I come from a long background with C and isam. Moving into php and
postgresql is therefore not all that strange, but I suffer with the
comparative lack of structure at times.
I deal with a lot of psych scoring and am establishing tables which will
contain the response patterns for each individual test within a battery.
In defining this, I plan on something like: ans CHAR(1) ARRAY
But I learned that PostgreSQL does not 'enforce' this. I would rather
have an '?' placed in each of the 192 array elements (and thereby
constrain with NOT NULL) to indicate lack of a response (the default)
when the test records are first established for the client.
Because the client does not need to complete a test at one sitting, but
must do so before tackling another test in his or her battery, I need to
'see' where things stand test by test at each login.
I can certainly write php script to fill the array as each record is
established - clumsy the first time around, but pretty efficient after
that - just an include function. There is apparently no other way of
defining (inserting) a default value for array elements.
Am I correct in my approach to this?
Thanks for any insight .....
pgsql-novice by date
|Next:||From: Rodrigo De León||Date: 2007-11-14 21:16:49|
|Subject: Re: array indizes in SQL|
|Previous:||From: Michael Glaesemann||Date: 2007-11-14 12:28:07|
|Subject: Re: Precision of time types|