Re: Change type

From: Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>
To: "Vladimir S(dot) Petukhov" <vladimir(at)sycore(dot)org>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Change type
Date: 2005-01-18 18:25:34
Message-ID: Pine.GSO.4.61.0501182124510.12633@ra.sai.msu.su
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

This message is in MIME format. The first part should be readable text,
while the remaining parts are likely unreadable without MIME-aware tools.

---559023410-538851280-1106072734=:12633
Content-Type: TEXT/PLAIN; charset=koi8-r; format=flowed
Content-Transfer-Encoding: 8BIT

On Tue, 18 Jan 2005, Vladimir S. Petukhov wrote:

> Hi!
> Sorry for my English..
> I want to dinamcly change type of column. If possible, of course.Trivial idia - create new temporary column, try to write value from old columt to temporarity (if type conersion ok - this made using select/update command and type conversion checks on client's side), then delete old column, and rename temporary column.. But this decision looked quite ill...
> Do you have better idea?

hmm,

you may use generic type like 'varchar' to store your data

> -- Я доcтаю из шиpоких штанин,В котоpых гpажданка одета,Воcемь ноpмальных. И двадцать одинЗапpещенных к ношенью пpедмета!
> Now playing: 03 - Lara And Reyes - Exotico.mp3 AutoGenerated by fortune & xmms...
> ---------------------------(end of broadcast)---------------------------TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match
>

Regards,
Oleg
_____________________________________________________________
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: oleg(at)sai(dot)msu(dot)su, http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83
---559023410-538851280-1106072734=:12633--

In response to

  • Change type at 2005-01-18 19:01:45 from Vladimir S. Petukhov

Browse pgsql-general by date

  From Date Subject
Next Message Chris 2005-01-18 18:38:24 DBD::Pg behavior for large queries
Previous Message Adam Witney 2005-01-18 18:23:23 Backup strategy