summaryrefslogtreecommitdiff
path: root/contrib/dblink
diff options
context:
space:
mode:
authorTom Lane2005-06-21 04:02:34 +0000
committerTom Lane2005-06-21 04:02:34 +0000
commit6f7fc0badef55b376f408bd318a8065fd2edf266 (patch)
treeb86da563c6c8de5c930f00e8f2a7d5a994ba2d18 /contrib/dblink
parentec3a1af0a89a169c100f7157f7c6932234ae5988 (diff)
Cause initdb to create a third standard database "postgres", which
unlike template0 and template1 does not have any special status in terms of backend functionality. However, all external utilities such as createuser and createdb now connect to "postgres" instead of template1, and the documentation is changed to encourage people to use "postgres" instead of template1 as a play area. This should fix some longstanding gotchas involving unexpected propagation of database objects by createdb (when you used template1 without understanding the implications), as well as ameliorating the problem that CREATE DATABASE is unhappy if anyone else is connected to template1. Patch by Dave Page, minor editing by Tom Lane. All per recent pghackers discussions.
Diffstat (limited to 'contrib/dblink')
-rw-r--r--contrib/dblink/doc/connection4
-rw-r--r--contrib/dblink/doc/cursor6
-rw-r--r--contrib/dblink/doc/misc4
-rw-r--r--contrib/dblink/doc/query6
4 files changed, 10 insertions, 10 deletions
diff --git a/contrib/dblink/doc/connection b/contrib/dblink/doc/connection
index 251bd939618..c3ce776fbcc 100644
--- a/contrib/dblink/doc/connection
+++ b/contrib/dblink/doc/connection
@@ -28,13 +28,13 @@ Outputs
Example usage
-select dblink_connect('dbname=template1');
+select dblink_connect('dbname=postgres');
dblink_connect
----------------
OK
(1 row)
-select dblink_connect('myconn','dbname=template1');
+select dblink_connect('myconn','dbname=postgres');
dblink_connect
----------------
OK
diff --git a/contrib/dblink/doc/cursor b/contrib/dblink/doc/cursor
index 23a3ce89ba5..b989fcb69cc 100644
--- a/contrib/dblink/doc/cursor
+++ b/contrib/dblink/doc/cursor
@@ -44,7 +44,7 @@ Note
Example usage
-test=# select dblink_connect('dbname=template1');
+test=# select dblink_connect('dbname=postgres');
dblink_connect
----------------
OK
@@ -94,7 +94,7 @@ Outputs
Example usage
-test=# select dblink_connect('dbname=template1');
+test=# select dblink_connect('dbname=postgres');
dblink_connect
----------------
OK
@@ -175,7 +175,7 @@ Note
Example usage
-test=# select dblink_connect('dbname=template1');
+test=# select dblink_connect('dbname=postgres');
dblink_connect
----------------
OK
diff --git a/contrib/dblink/doc/misc b/contrib/dblink/doc/misc
index 21d241d61ba..596c9ecdcff 100644
--- a/contrib/dblink/doc/misc
+++ b/contrib/dblink/doc/misc
@@ -17,10 +17,10 @@ Outputs
Example usage
-test=# select dblink_current_query() from (select dblink('dbname=template1','select oid, proname from pg_proc where proname = ''byteacat''') as f1) as t1;
+test=# select dblink_current_query() from (select dblink('dbname=postgres','select oid, proname from pg_proc where proname = ''byteacat''') as f1) as t1;
dblink_current_query
-----------------------------------------------------------------------------------------------------------------------------------------------------
- select dblink_current_query() from (select dblink('dbname=template1','select oid, proname from pg_proc where proname = ''byteacat''') as f1) as t1;
+ select dblink_current_query() from (select dblink('dbname=postgres','select oid, proname from pg_proc where proname = ''byteacat''') as f1) as t1;
(1 row)
==================================================================
diff --git a/contrib/dblink/doc/query b/contrib/dblink/doc/query
index d232f80dbd9..cd58a361422 100644
--- a/contrib/dblink/doc/query
+++ b/contrib/dblink/doc/query
@@ -37,7 +37,7 @@ Outputs
Example usage
-select * from dblink('dbname=template1','select proname, prosrc from pg_proc')
+select * from dblink('dbname=postgres','select proname, prosrc from pg_proc')
as t1(proname name, prosrc text) where proname like 'bytea%';
proname | prosrc
------------+------------
@@ -55,7 +55,7 @@ select * from dblink('dbname=template1','select proname, prosrc from pg_proc')
byteaout | byteaout
(12 rows)
-select dblink_connect('dbname=template1');
+select dblink_connect('dbname=postgres');
dblink_connect
----------------
OK
@@ -111,7 +111,7 @@ A more convenient way to use dblink may be to create a view:
create view myremote_pg_proc as
select *
- from dblink('dbname=template1','select proname, prosrc from pg_proc')
+ from dblink('dbname=postgres','select proname, prosrc from pg_proc')
as t1(proname name, prosrc text);
Then you can simply write: