Re: Timestamp output

Поиск
Список
Период
Сортировка
От Christopher Kings-Lynne
Тема Re: Timestamp output
Дата
Msg-id GNELIHDDFBOCMGBFGEFOOEJBCBAA.chriskl@familyhealth.com.au
обсуждение исходный текст
Ответ на Re: Timestamp output  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Timestamp output  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-sql
> Christopher Kings-Lynne <chriskl@familyhealth.com.au> writes:
> > Although I know of this problem, I would also be interested in the fix.
> > I know that you can declare a column of type timestamp(0) to get the old
> > format, but how do you change an existing column?
>
> Officially, it's not supported.  Unofficially, you can always hack
> pg_attribute.atttypmod, which is where precision info is stored.
> Observe the following example:
>
> regression=# create table foo (f1 timestamp, f2 timestamp(0));
> CREATE
> regression=# \d foo
>                    Table "foo"
>  Column |            Type             | Modifiers
> --------+-----------------------------+-----------
>  f1     | timestamp with time zone    |
>  f2     | timestamp(0) with time zone |

Hmmm...it seems to me that an easier way is to edit the pg_dump from the
previous version to add (0) in everywhere.  Why don't we put that in the
'please be aware of these incompatibilites' section of HISTORY?

Chris



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

Предыдущее
От: Stephan Szabo
Дата:
Сообщение: Re: About referential integrity.
Следующее
От: Edward Murray
Дата:
Сообщение: Left Outer Join Question