Database properties not being duplicated

Started by Ben Trewernalmost 21 years ago3 messageshackers
Jump to latest
#1Ben Trewern
ben.trewern@_nospam_mowlem.com

If I have one database say db1 and then do:

ALTER DATABASE db1 SET DateStyle=iso, dmy;

Then do

CREATE DATABASE db2 TEMPLATE db1;

the DateStyle does not get carried accross to the new database. Is this a
bug? It seems not to matter which properties I set ie search_path, TimeZone
etc. none of them get carried accross.

Regards,

Ben

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Ben Trewern (#1)
Re: Database properties not being duplicated

"Ben Trewern" <ben.trewern@_nospam_mowlem.com> writes:

If I have one database say db1 and then do:
ALTER DATABASE db1 SET DateStyle=iso, dmy;
Then do
CREATE DATABASE db2 TEMPLATE db1;
the DateStyle does not get carried accross to the new database. Is this a
bug?

No, not in my view. We don't propagate any of the other pg_database
columns (eg, name, owner, permissions) either.

regards, tom lane

#3Ben Trewern
ben.trewern@_nospam_mowlem.com
In reply to: Ben Trewern (#1)
Re: Database properties not being duplicated

OK. It just doesn't seem obvious why.

Regards,

Ben
"Tom Lane" <tgl@sss.pgh.pa.us> wrote in message
news:14998.1115394461@sss.pgh.pa.us...

Show quoted text

"Ben Trewern" <ben.trewern@_nospam_mowlem.com> writes:

If I have one database say db1 and then do:
ALTER DATABASE db1 SET DateStyle=iso, dmy;
Then do
CREATE DATABASE db2 TEMPLATE db1;
the DateStyle does not get carried accross to the new database. Is this
a
bug?

No, not in my view. We don't propagate any of the other pg_database
columns (eg, name, owner, permissions) either.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq