pg.ddx.io pgsql-sql@postgresql.org mailing list archivehelp / color / mirror / Atom feed
Change size of a field 4+ messages / 2 participants [nested] [flat]
* Change size of a field @ 2002-07-26 11:42 ROUWEZ Stephane <stephane.rouwez@ecolo.be> 2002-07-26 12:49 ` Re: Change size of a field Achilleus Mantzios <achill@matrix.gatewaynet.com> 0 siblings, 1 reply; 4+ messages in thread From: ROUWEZ Stephane @ 2002-07-26 11:42 UTC (permalink / raw) To: pgsql-sql; +Cc: LESNE Philippe <philippe.lesne@ecolo.be> 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 ? Tanks ------------------------------ http://www.ecolo.be ^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Change size of a field 2002-07-26 11:42 Change size of a field ROUWEZ Stephane <stephane.rouwez@ecolo.be> @ 2002-07-26 12:49 ` Achilleus Mantzios <achill@matrix.gatewaynet.com> 2002-07-26 13:20 ` Re: Change size of a field Achilleus Mantzios <achill@matrix.gatewaynet.com> 0 siblings, 1 reply; 4+ messages in thread From: Achilleus Mantzios @ 2002-07-26 12:49 UTC (permalink / raw) To: ROUWEZ Stephane <stephane.rouwez@ecolo.be>; +Cc: pgsql-sql; LESNE Philippe <philippe.lesne@ecolo.be> 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@matrix.gatewaynet.com mantzios@softlab.ece.ntua.gr ^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Change size of a field 2002-07-26 11:42 Change size of a field ROUWEZ Stephane <stephane.rouwez@ecolo.be> 2002-07-26 12:49 ` Re: Change size of a field Achilleus Mantzios <achill@matrix.gatewaynet.com> @ 2002-07-26 13:20 ` Achilleus Mantzios <achill@matrix.gatewaynet.com> 0 siblings, 0 replies; 4+ messages in thread From: Achilleus Mantzios @ 2002-07-26 13:20 UTC (permalink / raw) To: ROUWEZ Stephane <stephane.rouwez@ecolo.be>; +Cc: pgsql-sql; LESNE Philippe <philippe.lesne@ecolo.be> On Fri, 26 Jul 2002, Achilleus Mantzios wrote: I forgot! > 1) % pg_dump -t <tablename> <dbname> > <tablename>-DUMP.sql > 2) % psql > # drop sequence <tablename>_id_seq; ==>> # drop table <tablename>; > 3) vi <tablename>-DUMP.sql > change your varchar(50) to varchar(80) > 4) psql > #\i <tablename>-DUMP.sql -- 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@matrix.gatewaynet.com mantzios@softlab.ece.ntua.gr ^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Change size of a field @ 2002-07-30 08:07 ROUWEZ Stephane <stephane.rouwez@ecolo.be> 0 siblings, 0 replies; 4+ messages in thread From: ROUWEZ Stephane @ 2002-07-30 08:07 UTC (permalink / raw) To: Achilleus Mantzios <achill@matrix.gatewaynet.com>; +Cc: pgsql-sql; LESNE Philippe <philippe.lesne@ecolo.be> 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@matrix.gatewaynet.com] Envoye : vendredi 26 juillet 2002 14:50 A : ROUWEZ Stephane Cc : 'pgsql-sql@postgresql.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@matrix.gatewaynet.com mantzios@softlab.ece.ntua.gr ------------------------------ http://www.ecolo.be ^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2002-07-30 08:07 UTC | newest] Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2002-07-26 11:42 Change size of a field ROUWEZ Stephane <stephane.rouwez@ecolo.be> 2002-07-26 12:49 ` Achilleus Mantzios <achill@matrix.gatewaynet.com> 2002-07-26 13:20 ` Achilleus Mantzios <achill@matrix.gatewaynet.com> 2002-07-30 08:07 Re: Change size of a field ROUWEZ Stephane <stephane.rouwez@ecolo.be>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox