Re: pg_get_triggerdef in pg_dump

Поиск
Список
Период
Сортировка
От Andreas Pflug
Тема Re: pg_get_triggerdef in pg_dump
Дата
Msg-id 3EF08BF5.4070801@web.de
обсуждение исходный текст
Ответ на Re: pg_get_triggerdef in pg_dump  (Alvaro Herrera <alvherre@dcc.uchile.cl>)
Ответы Re: pg_get_triggerdef in pg_dump  (Rod Taylor <rbt@rbt.ca>)
Re: pg_get_triggerdef in pg_dump  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Alvaro Herrera wrote:

>On Wed, Jun 18, 2003 at 12:59:36PM +0200, Andreas Pflug wrote:
>
>  
>
>>What I need again and again, is changing the size of a column (rarely 
>>the type). For pgsql, I'd have to drop the column, and need to recreate 
>>all views. For MSSQL, it won't matter if the column is dropped/recreated 
>>or just resized, the view won't notice until it's used again.
>>    
>>
>
>If that's what you need you can always change the system catalogs
>manually.  For CHAR(n) and VARCHAR(n) you change pg_attribute.atttypmod
>to (n+4).  For NUMERIC(n,m) it's something like (n<<16) + m + 4 or maybe
>(m<<16) + n + 4, don't remember right now.
>
>Be sure to check that your data is in a safe place before you do this,
>and double check before you commit the transaction if you do it
>manually.
>
>  
>
Hm, you're right, 'thou I wouldn't recommend this to the average user, 
and wonder if this will be possible for all future pgsql versions too. 
I'm considering adding safe support for this type of column change to 
pgAdmin3.
There might be other cases of legal direct change of system catalog 
entries, e,g. varchar to text, if they all are only names for internally 
identical data structures. Can you tell which datatypes may be legally 
interchanged?

Regards,
Andreas





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

Предыдущее
От: Rod Taylor
Дата:
Сообщение: Re: lots of configure failures on freebsd/alpha
Следующее
От: "Merlin Moncure"
Дата:
Сообщение: Re: information Windows - PostgreSQL