Re: changing a definition in a dump file?

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: postgresql <pgsql(at)symcom(dot)com>
Cc: PgSQL-SQL <pgsql-sql(at)postgresql(dot)org>
Subject: Re: changing a definition in a dump file?
Date: 2002-01-18 16:59:48
Message-ID: 20020118085623.J63900-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Glenn MacGregor 2002-01-18 19:14:10 pqFlush problem
Previous Message postgresql 2002-01-18 16:42:31 changing a definition in a dump file?