Re: Resize varchar column
От | scott.marlowe |
---|---|
Тема | Re: Resize varchar column |
Дата | |
Msg-id | Pine.LNX.4.33.0402040946560.28468-100000@css120.ihs.com обсуждение исходный текст |
Ответ на | Re: Resize varchar column ("John Sidney-Woollett" <johnsw@wardbrook.com>) |
Список | pgsql-general |
On Wed, 4 Feb 2004, John Sidney-Woollett wrote: > Bruno Wolff III said: > > In general (in 7.4.x) you can change data types using add, drop, rename > > and a query to copy/translate the data. This will have the side effect of > > making the updated column the last column when using * to refer to the > > table's columns. > > I'll take a look at the system catalogs - thanks for the tip. > > > It is possible to change the size of varchar data by updating the system > > catalogs. I don't know the exact details of what to do, but the > > instructions should be in the archives (multiple times). > > I was hoping to avoid a column drop and recreate. > > Thanks for the info. There is a way to do it. I don't recall it off my head, it has to do with tweaking the system catalogs directly. That said, I would practice on a test database, backup the live database, and cross my fingers and use a chicken foot to make sure you don't scram your database, as playing with system catalogs by hand is not something that's guaranteed to be a nice happy safe thing. But as messing with the system catalogs go, this is one of the easier things to do. It should be in the list archives somewhere, and should probably be an admin faq by now.
В списке pgsql-general по дате отправления: