Re: Validity check in to_date?
От | Alexander M. Pravking |
---|---|
Тема | Re: Validity check in to_date? |
Дата | |
Msg-id | 20031202105506.GI87728@dyatel.antar.bryansk.ru обсуждение исходный текст |
Ответ на | Re: Validity check in to_date? ("Iain" <iain@mst.co.jp>) |
Ответы |
Re: Validity check in to_date?
|
Список | pgsql-sql |
On Tue, Dec 02, 2003 at 07:44:54PM +0900, Iain wrote: > T've been following this thread with interest because I have a related > problem. Basically we are storing dates in CHAR fields with al the > associated problems. I'd like to do it, but changing everything to date > fields isn't practical for now, so as a stopgap solution, I want to provide > some validation at the database level. > > I tried: > > create domain ymdtest2 as char(10) constraint valid_date check > (VALUE::DATE); There's no conversion function from char(n) to date, but there's one from text to date. Try using check (VALUE::text::date). -- Fduch M. Pravking
В списке pgsql-sql по дате отправления: