Skip to content

scotje/PostgreSQL_Scripts

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

change_ownership.sh

Script will change all objects ownership from x to y in a particular schema.

Step 1

Before running script you need to set environment variables so that Pg-dump/psql client used in script will connect using these variables.

export PGHOST=localhost PGUSER=postgres PGDATABASE=postgres PGPORT=5432

Step 2

You need to pass two mandatory arguments like NEW USER name ( -n ) and SCHEMA NAME ( -S ).

sh change_owner.sh -n user1 -S xml

Summary: Tables/Sequences/Views : 1 Functions : 0 Aggregates : 0 Type : 0

Any corrections or comments can be sent to [email protected].

Thank you.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%