dbTalk Databases Forums  

pg_restore: Ignore ALTER .. OWNER TO ...

comp.databases.postgresql comp.databases.postgresql


Discuss pg_restore: Ignore ALTER .. OWNER TO ... in the comp.databases.postgresql forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Thomas Guettler
 
Posts: n/a

Default pg_restore: Ignore ALTER .. OWNER TO ... - 04-29-2008 , 10:18 AM






Hi,

is it possible to restore a dump and ignore all ALTER .. OWNER TO ...
statements?

I try to run pg_restore -1 ... (single transaction) to be sure all there are no errors (except this one).

The dump was created with -Fc

Thomas

--
Thomas Guettler, http://www.thomas-guettler.de/
E-Mail: guettli (*) thomas-guettler + de

Reply With Quote
  #2  
Old   
Laurenz Albe
 
Posts: n/a

Default Re: pg_restore: Ignore ALTER .. OWNER TO ... - 04-30-2008 , 02:30 AM






Thomas Guettler <hv (AT) tbz-pariv (DOT) de> wrote:
Quote:
is it possible to restore a dump and ignore all ALTER .. OWNER TO ...
statements?

I try to run pg_restore -1 ... (single transaction) to be sure all there
are no errors (except this one).

The dump was created with -Fc
I think the --no-owner flag of pg_restore is what you need.

This will cause all created objects to belong to the user used for
the database connection (flag --username).

Yours,
Laurenz Albe


Reply With Quote
  #3  
Old   
Laurenz Albe
 
Posts: n/a

Default Re: pg_restore: Ignore ALTER .. OWNER TO ... - 04-30-2008 , 02:30 AM



Thomas Guettler <hv (AT) tbz-pariv (DOT) de> wrote:
Quote:
is it possible to restore a dump and ignore all ALTER .. OWNER TO ...
statements?

I try to run pg_restore -1 ... (single transaction) to be sure all there
are no errors (except this one).

The dump was created with -Fc
I think the --no-owner flag of pg_restore is what you need.

This will cause all created objects to belong to the user used for
the database connection (flag --username).

Yours,
Laurenz Albe


Reply With Quote
  #4  
Old   
Laurenz Albe
 
Posts: n/a

Default Re: pg_restore: Ignore ALTER .. OWNER TO ... - 04-30-2008 , 02:30 AM



Thomas Guettler <hv (AT) tbz-pariv (DOT) de> wrote:
Quote:
is it possible to restore a dump and ignore all ALTER .. OWNER TO ...
statements?

I try to run pg_restore -1 ... (single transaction) to be sure all there
are no errors (except this one).

The dump was created with -Fc
I think the --no-owner flag of pg_restore is what you need.

This will cause all created objects to belong to the user used for
the database connection (flag --username).

Yours,
Laurenz Albe


Reply With Quote
  #5  
Old   
Laurenz Albe
 
Posts: n/a

Default Re: pg_restore: Ignore ALTER .. OWNER TO ... - 04-30-2008 , 02:30 AM



Thomas Guettler <hv (AT) tbz-pariv (DOT) de> wrote:
Quote:
is it possible to restore a dump and ignore all ALTER .. OWNER TO ...
statements?

I try to run pg_restore -1 ... (single transaction) to be sure all there
are no errors (except this one).

The dump was created with -Fc
I think the --no-owner flag of pg_restore is what you need.

This will cause all created objects to belong to the user used for
the database connection (flag --username).

Yours,
Laurenz Albe


Reply With Quote
  #6  
Old   
Laurenz Albe
 
Posts: n/a

Default Re: pg_restore: Ignore ALTER .. OWNER TO ... - 04-30-2008 , 02:30 AM



Thomas Guettler <hv (AT) tbz-pariv (DOT) de> wrote:
Quote:
is it possible to restore a dump and ignore all ALTER .. OWNER TO ...
statements?

I try to run pg_restore -1 ... (single transaction) to be sure all there
are no errors (except this one).

The dump was created with -Fc
I think the --no-owner flag of pg_restore is what you need.

This will cause all created objects to belong to the user used for
the database connection (flag --username).

Yours,
Laurenz Albe


Reply With Quote
  #7  
Old   
Laurenz Albe
 
Posts: n/a

Default Re: pg_restore: Ignore ALTER .. OWNER TO ... - 04-30-2008 , 02:30 AM



Thomas Guettler <hv (AT) tbz-pariv (DOT) de> wrote:
Quote:
is it possible to restore a dump and ignore all ALTER .. OWNER TO ...
statements?

I try to run pg_restore -1 ... (single transaction) to be sure all there
are no errors (except this one).

The dump was created with -Fc
I think the --no-owner flag of pg_restore is what you need.

This will cause all created objects to belong to the user used for
the database connection (flag --username).

Yours,
Laurenz Albe


Reply With Quote
  #8  
Old   
Laurenz Albe
 
Posts: n/a

Default Re: pg_restore: Ignore ALTER .. OWNER TO ... - 04-30-2008 , 02:30 AM



Thomas Guettler <hv (AT) tbz-pariv (DOT) de> wrote:
Quote:
is it possible to restore a dump and ignore all ALTER .. OWNER TO ...
statements?

I try to run pg_restore -1 ... (single transaction) to be sure all there
are no errors (except this one).

The dump was created with -Fc
I think the --no-owner flag of pg_restore is what you need.

This will cause all created objects to belong to the user used for
the database connection (flag --username).

Yours,
Laurenz Albe


Reply With Quote
  #9  
Old   
Laurenz Albe
 
Posts: n/a

Default Re: pg_restore: Ignore ALTER .. OWNER TO ... - 04-30-2008 , 02:30 AM



Thomas Guettler <hv (AT) tbz-pariv (DOT) de> wrote:
Quote:
is it possible to restore a dump and ignore all ALTER .. OWNER TO ...
statements?

I try to run pg_restore -1 ... (single transaction) to be sure all there
are no errors (except this one).

The dump was created with -Fc
I think the --no-owner flag of pg_restore is what you need.

This will cause all created objects to belong to the user used for
the database connection (flag --username).

Yours,
Laurenz Albe


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.