pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
changing a definition in a dump file?
2+ messages / 2 participants
[nested] [flat]

* changing a definition in a dump file?
@ 2002-01-18 16:42  postgresql <pgsql@symcom.com>
  0 siblings, 1 reply; 2+ messages in thread

From: postgresql @ 2002-01-18 16:42 UTC (permalink / raw)
  To: pgsql-sql

Hi all,
I think I inadvertently sent this to pg-admin...

Is it possible to change the definitions in the dump file to alter a 
table.

this is from my  pgdump file:

CREATE TABLE "fc_client_info" (
   "acode" character varying(12),
   "cname" character varying(32)
);

If I change the file to read:

CREATE TABLE "fc_client_info" (
   "acode" character varying(12),
   "cname" character varying(128)
);

Can I drop the database and read in the altered pgdump file to effect the 
change?

Thanks for your time.

Ted





^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: changing a definition in a dump file?
@ 2002-01-18 16:59  Stephan Szabo <sszabo@megazone23.bigpanda.com>
  parent: postgresql <pgsql@symcom.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Stephan Szabo @ 2002-01-18 16:59 UTC (permalink / raw)
  To: postgresql <pgsql@symcom.com>; +Cc: pgsql-sql

On Fri, 18 Jan 2002, postgresql wrote:

> Hi all,
> I think I inadvertently sent this to pg-admin...
>
> Is it possible to change the definitions in the dump file to alter a
> table.
>
> this is from my  pgdump file:
>
> CREATE TABLE "fc_client_info" (
>    "acode" character varying(12),
>    "cname" character varying(32)
> );
>
> If I change the file to read:
>
> CREATE TABLE "fc_client_info" (
>    "acode" character varying(12),
>    "cname" character varying(128)
> );
>
> Can I drop the database and read in the altered pgdump file to effect the
> change?

A dropdb, createdb, read pgdump should do what you want in this case.
In general you need to be sure that the data works for the changes
you're making but lengthening a varchar should be fine.





^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2002-01-18 16:59 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-01-18 16:42 changing a definition in a dump file? postgresql <pgsql@symcom.com>
2002-01-18 16:59 ` Stephan Szabo <sszabo@megazone23.bigpanda.com>

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