Re: How to add month.year column validation - Mailing list pgsql-general

From Scott Marlowe
Subject Re: How to add month.year column validation
Date
Msg-id dcc563d10912241659g5349c706ne5019d551c688638@mail.gmail.com
Whole thread Raw
In response to Re: How to add month.year column validation  ("Andrus" <kobruleht2@hot.ee>)
List pgsql-general
On Thu, Dec 24, 2009 at 4:47 PM, Andrus <kobruleht2@hot.ee> wrote:
> Scott,
>
>> You can use the regex I posted to get rid of the data easily, then go
>> back to the substr one for  a check constraint after that.
>
> regex is non-standard.
> How to implement this in standard SQL ?

I take it you need a way to scrub your data in various databases, not
just pgsql?  I'm not sure there is a simple SQL standard way.  It's
likely that this one time job might require various non-standard ways
of scrubbing your data this one time.    You're gonna have to figure
out how to make databases other than pgsql happy without me, the only
one I'm even a little familiar with is Oracle, and my oracle-fu is
rather rusty after a three year or so lay off from it.

pgsql-general by date:

Previous
From: Scott Marlowe
Date:
Subject: Re: date_trunc on date is immutable?
Next
From: Greg Stark
Date:
Subject: Re: date_trunc on date is immutable?