In 7.4 ensure you have DEFAULT now () with no spaces

Поиск
Список
Период
Сортировка
От David B
Тема In 7.4 ensure you have DEFAULT now () with no spaces
Дата
Msg-id GOEGKICPFOPNLIEIHGFJEEMMCNAA.postgresql@thegatelys.com
обсуждение исходный текст
Ответы Re: In 7.4 ensure you have DEFAULT now () with no spaces
Список pgsql-sql
Just a heads up folks...

In converting from 7.3 to 7.4 one got-ya we had was...

We had been testing 7.4 for a few days and just noticed that some tables had
created_timestamp rows with a date/time of the date the DB was created...not
the date/time the insert was done.

Looking at those tables the create DDL's for those few tables contained now
()
as in:

created_timestamp  timestamp DEFAULT now ()   -- note the space between now
and ()

Most had correctly been defined without the space - as in now()


Simple matter of doing ALTER TABLE x ALTER COLUMN y SET DEFAULT now() while
still in 7.3 to fix.

7.4 Migration documentation does mentions this but it can easily slip by as
it did with us...


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.704 / Virus Database: 460 - Release Date: 6/12/2004



В списке pgsql-sql по дате отправления:

Предыдущее
От: "Jie Liang"
Дата:
Сообщение: Re: [JDBC] Prepare Statement
Следующее
От: "Jaime Casanova"
Дата:
Сообщение: case stement when null