Tuesday, November 8, 2011

Postgresql - Renaming a database

As simple as that:
ALTER DATABASE name RENAME TO newname Of course there's a lot of other attributes you can change with the "ALTER DATABASE" instruction.

ALTER DATABASE



Name


ALTER DATABASE -- change a database




Synopsis


ALTER DATABASE name [ [ WITH ] option [ ... ] ]

where option can be:

CONNECTION LIMIT connlimit

ALTER DATABASE name SET parameter { TO | = } { value | DEFAULT }
ALTER DATABASE name RESET parameter
ALTER DATABASE name RENAME TO newname
ALTER DATABASE name OWNER TO new_owner



I didn't know that "CONNECTION LIMIT" parameter! So you can specify in a database basis how many  connections are allowed!. And all this for free! The more I study oracle the more I love postgresql =-).  http://www.postgresql.org/docs/9.0/static/sql-alterdatabase.html

No comments:

Post a Comment