On Wed, 2007-05-02 at 16:26 +1000, Christiaan Kortekaas wrote:
> Thanks for letting me know postgresql won't accept this. I had a feeling it
> wouldn't as it's more stringent than mysql. Well I guess I reinstate my
> request that MODS has date granularity as an attribute :)
This is something you should address in your database schema, not in
MODS. Actually MODS has all the information you need. If a MODS date
says "2007-04" then you know the granularity is "YYYY-MM" and you can
insert this into a "date_granularity" field in the database, can't you?
If the postgres date type is unsuitable, then use a string type
BTW, if you are dealing with dates with different granularities then you
should consider separately storing a "begin" and "end" date (as strings)
in your database.