From: | ROUWEZ Stephane <stephane(dot)rouwez(at)ecolo(dot)be> |
---|---|
To: | 'Achilleus Mantzios' <achill(at)matrix(dot)gatewaynet(dot)com> |
Cc: | "'pgsql-sql(at)postgresql(dot)org'" <pgsql-sql(at)postgresql(dot)org>, LESNE Philippe <philippe(dot)lesne(at)ecolo(dot)be> |
Subject: | Re: Change size of a field |
Date: | 2002-07-30 08:07:24 |
Message-ID: | 8126A160E6D1D1119AFF00A0CC5C8B0F01228E83@FEDERAL |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Hi,
Thank you, it works but I loose my foreign keys and the privileges for
groups and users.
Is there a solution ?
Stef
-----Message d'origine-----
De : Achilleus Mantzios [mailto:achill(at)matrix(dot)gatewaynet(dot)com]
Envoye : vendredi 26 juillet 2002 14:50
A : ROUWEZ Stephane
Cc : 'pgsql-sql(at)postgresql(dot)org'; LESNE Philippe
Objet : Re: [SQL] Change size of a field
On Fri, 26 Jul 2002, ROUWEZ Stephane wrote:
> Hi,
>
> Is it possible to change the size of a field ?
> Actually, I have a field called 'nom' in varchar(50) and I want this field
> in varchar(80).
> I can't do it with PgAdmin. Is it normal ?
Pretty normal!
just
1) % pg_dump -t <tablename> <dbname> > <tablename>-DUMP.sql
2) % psql
# drop sequence <tablename>_id_seq;
3) vi <tablename>-DUMP.sql
change your varchar(50) to varchar(80)
4) psql
#\i <tablename>-DUMP.sql
There you go
>
> Tanks
>
>
> ------------------------------
> http://www.ecolo.be
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>
--
Achilleus Mantzios
S/W Engineer
IT dept
Dynacom Tankers Mngmt
Nikis 4, Glyfada
Athens 16610
Greece
tel: +30-10-8981112
fax: +30-10-8981877
email: achill(at)matrix(dot)gatewaynet(dot)com
mantzios(at)softlab(dot)ece(dot)ntua(dot)gr
------------------------------
http://www.ecolo.be
From | Date | Subject | |
---|---|---|---|
Next Message | cnliou | 2002-07-30 08:46:22 | Group And Sort After Union |
Previous Message | Bhuvan A | 2002-07-30 06:51:50 | contrib/dblink suggestion |