Emi Lu wrote:
PostgreSQL 8.0.15.
Is there a way that I can easily alter column type from varchar(32) to
varchar(255) but do not have to worry about views dependent on it?
You should test it carefully and it is considered a bad practice -
I'll probably get sued for recommending this :-), but yo
PostgreSQL 8.0.15.
Is there a way that I can easily alter column type from varchar(32) to
varchar(255) but do not have to worry about views dependent on it?
You should test it carefully and it is considered a bad practice -
I'll probably get sued for recommending this :-), but you may try:
SEL
On Tue, Feb 24, 2009 at 4:27 PM, Emi Lu wrote:
> Good morning,
>
> I am using PostgreSQL 8.0.15.
>
> Is there a way that I can easily alter column type from varchar(32) to
> varchar(255) but do not have to worry about views dependent on it?
You should test it carefully and it is considered a bad
Good morning,
I am using PostgreSQL 8.0.15.
Is there a way that I can easily alter column type from varchar(32) to
varchar(255) but do not have to worry about views dependent on it?
If Psql could support column alter without views' dependencies, that
will be great!
Thanks a lot,
-
Lu Ying
"Andrew Hammond" <[EMAIL PROTECTED]> writes:
> Alternatively, you already have the USING clause to tell you how to
> alter the data. How about using it to alter the default as well?
The reasons not to do that are already set forth in the ALTER TABLE
man page.
regards, tom
Tom Lane wrote:
> Rod Taylor <[EMAIL PROTECTED]> writes:
> > On Wed, 2006-08-02 at 09:19 -0400, Tom Lane wrote:
> >> Hmm ... the way I would have expected to work is
> >>
> >> alter table posts
> >> alter column deleted drop default,
> >> alter column deleted type char(1)
> >> using (case when dele
Rod Taylor <[EMAIL PROTECTED]> writes:
> On Wed, 2006-08-02 at 09:19 -0400, Tom Lane wrote:
>> Hmm ... the way I would have expected to work is
>>
>> alter table posts
>> alter column deleted drop default,
>> alter column deleted type char(1)
>> using (case when deleted then 't' else 'f' end),
>>
On Wed, 2006-08-02 at 09:19 -0400, Tom Lane wrote:
> "Markus Bertheau" <[EMAIL PROTECTED]> writes:
> > I basically want to change a boolean column to char. The boolean
> > column has a default of true. The char column should have 'f' for
> > false and 't' for true. I think that an SQL statement lik
"Markus Bertheau" <[EMAIL PROTECTED]> writes:
> I basically want to change a boolean column to char. The boolean
> column has a default of true. The char column should have 'f' for
> false and 't' for true. I think that an SQL statement like the
> following should work, but it doesn't:
Hmm ... the
Hi,
I basically want to change a boolean column to char. The boolean
column has a default of true. The char column should have 'f' for
false and 't' for true. I think that an SQL statement like the
following should work, but it doesn't:
blog=> select version();
At 10:38 AM 5/27/03, Eric Anderson Vianet SAO wrote:
>how can I alter the column width
http://techdocs.postgresql.org/techdocs/updatingcolumns.php
fbax=# create table tablename (columnname text);
CREATE
fbax=# \d tablename
Table "tablename"
Attribute | Type | Modifier
+--+-
Hi,
I wonder if I can alter the type of a column to a "supertype" of the
original column type? Afaik, this was impossible in 7.1.3. However, I
use 7.2.1. If yes, what would be the correct syntax?
Cheers,
Thiemo
--
Thiemo Kellner
Tösstalstrasse 146
CH-8400 Winterthur
http://jermt.sourceforge
12 matches
Mail list logo