Re: changing column size and type.

Поиск
Список
Период
Сортировка
От Rudi Starcevic
Тема Re: changing column size and type.
Дата
Msg-id 3E9CF0DB.60509@oasis.net.au
обсуждение исходный текст
Ответ на Re: changing column size and type.  (pginfo <pginfo@t1.unisoftbg.com>)
Список pgsql-sql
Ivan,<br /><br /> This link show's how to do it online.<br /><br /><a class="moz-txt-link-freetext"
href="http://www.edoceo.com/liberum/default.php?doc=postgresql-tricks">http://www.edoceo.com/liberum/default.php?doc=postgresql-tricks</a><br
/><br/> There are other links around too.<br /><br /> Cheers<br /> Rudi<br /><br /><br /> pginfo wrote:<br
/><blockquotecite="mid3E9CDF76.C2B2D50@t1.unisoftbg.com" type="cite"><pre wrap="">Hi George,
 

It is possible to do it so, but I wanted some better solution.
For example with oracle I can do it "online".

regards,
ivan.

George Weaver wrote:
 </pre><blockquote type="cite"><pre wrap="">Hi Ivan,

I don't know if this is a recommended practice or not, but you can try the
following.

Use PgDump to back up the entire database as a text file.  Edit the backup
text file and change the CREATE TABLE statement for the table you want to
change, changing the column width to the new width desired.  Restore the
database.  The database will be restored with the new width for the column
in the table.

The ability to do this depends on the size of the database, whether it can
be taken off line, etc. etc.

HTH
George

----- Original Message -----
From: "pginfo" <a class="moz-txt-link-rfc2396E"
href="mailto:pginfo@t1.unisoftbg.com"><pginfo@t1.unisoftbg.com></a>
To: <a class="moz-txt-link-rfc2396E" href="mailto:pgsql-sql@postgresql.org"><pgsql-sql@postgresql.org></a>
Sent: Tuesday, April 15, 2003 9:21 AM
Subject: [SQL] changing column size and type.
   </pre><blockquote type="cite"><pre wrap="">Hi,

I am using pg 7.3.2.

Is it possible to change:
- column size ot existing table.
- columnt size ( it is varchar basicaly).

The problem is that the table have many freferences from and to it.

many thanks,
ivan.


---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

<a class="moz-txt-link-freetext"
href="http://www.postgresql.org/docs/faqs/FAQ.html">http://www.postgresql.org/docs/faqs/FAQ.html</a>
     </pre></blockquote></blockquote><pre wrap="">

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

<a class="moz-txt-link-freetext"
href="http://www.postgresql.org/docs/faqs/FAQ.html">http://www.postgresql.org/docs/faqs/FAQ.html</a>
 </pre></blockquote><br />

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

Предыдущее
От: pginfo
Дата:
Сообщение: Re: changing column size and type.
Следующее
От: friedrich nietzsche
Дата:
Сообщение: Re: connecting to a differnt DB in PL/pgSQL