head	1.6;
access;
symbols
	REL7_4_29:1.2.4.1
	REL8_0_25:1.2.8.1
	REL8_1_21:1.3.2.1
	REL8_2_17:1.4.2.1
	REL7_4_28:1.2.4.1
	REL8_0_24:1.2.8.1
	REL8_1_20:1.3.2.1
	REL8_2_16:1.4.2.1
	REL7_4_27:1.2.4.1
	REL8_0_23:1.2.8.1
	REL8_1_19:1.3.2.1
	REL8_2_15:1.4.2.1
	REL7_4_26:1.2.4.1
	REL8_0_22:1.2.8.1
	REL8_1_18:1.3.2.1
	REL8_2_14:1.4.2.1
	REL7_4_25:1.2.4.1
	REL8_0_21:1.2.8.1
	REL8_1_17:1.3.2.1
	REL8_2_13:1.4.2.1
	REL7_4_24:1.2.4.1
	REL8_0_20:1.2.8.1
	REL8_1_16:1.3.2.1
	REL8_2_12:1.4.2.1
	REL7_4_23:1.2.4.1
	REL8_0_19:1.2.8.1
	REL8_1_15:1.3.2.1
	REL8_2_11:1.4.2.1
	REL7_4_22:1.2.4.1
	REL8_0_18:1.2.8.1
	REL8_1_14:1.3.2.1
	REL8_2_10:1.4.2.1
	REL7_4_21:1.2.4.1
	REL8_0_17:1.2.8.1
	REL8_1_13:1.3.2.1
	REL8_2_9:1.4.2.1
	REL7_4_20:1.2.4.1
	REL8_0_16:1.2.8.1
	REL8_1_12:1.3.2.1
	REL8_2_8:1.4.2.1
	REL8_2_7:1.4.2.1
	REL7_3_21:1.1.2.1
	REL7_4_19:1.2.4.1
	REL8_0_15:1.2.8.1
	REL8_1_11:1.3.2.1
	REL8_2_6:1.4.2.1
	REL8_3_BETA2:1.5
	REL8_3_BETA1:1.5
	REL7_3_20:1.1.2.1
	REL7_4_18:1.2.4.1
	REL8_0_14:1.2.8.1
	REL8_1_10:1.3.2.1
	REL8_2_5:1.4.2.1
	REL7_3_19:1.1
	REL7_4_17:1.2
	REL8_0_13:1.2
	REL8_1_9:1.3
	REL8_2_4:1.4
	REL8_0_12:1.2
	REL8_1_8:1.3
	REL8_2_3:1.4
	REL7_3_18:1.1
	REL7_4_16:1.2
	REL8_0_11:1.2
	REL8_1_7:1.3
	REL8_2_2:1.4
	REL8_0_10:1.2
	REL8_1_6:1.3
	REL8_2_1:1.4
	REL7_4_15:1.2
	REL7_3_17:1.1
	REL8_2_STABLE:1.4.0.2
	REL8_2_0:1.4
	REL8_2_RC1:1.4
	REL8_2_BETA3:1.4
	REL8_2_BETA2:1.4
	REL8_1_5:1.3
	REL8_0_9:1.2
	REL7_4_14:1.2
	REL7_3_16:1.1
	REL8_2_BETA1:1.4
	REL7_3_15:1.1
	REL7_4_13:1.2
	REL8_0_8:1.2
	REL8_1_4:1.3
	REL7_3_14:1.1
	REL7_4_12:1.2
	REL8_0_7:1.2
	REL8_1_3:1.3
	REL7_3_13:1.1
	REL7_4_11:1.2
	REL8_0_6:1.2
	REL8_1_2:1.3
	REL7_3_12:1.1
	REL7_4_10:1.2
	REL8_0_5:1.2
	REL8_1_1:1.3
	REL8_1_STABLE:1.3.0.2
	REL8_1_0:1.3
	REL8_1_0RC1:1.3
	REL8_1_0BETA4:1.3
	REL8_1_0BETA3:1.3
	REL7_3_11:1.1
	REL7_4_9:1.2
	REL8_0_4:1.2
	REL8_1_0BETA2:1.3
	REL8_1_0BETA1:1.3
	REL7_3_10:1.1
	REL7_4_8:1.2
	REL8_0_3:1.2
	REL8_0_2:1.2
	REL7_3_9:1.1
	REL7_4_7:1.2
	REL8_0_1:1.2
	REL8_0_STABLE:1.2.0.8
	REL8_0_0:1.2.0.6
	REL8_0_0RC5:1.2
	REL8_0_0RC4:1.2
	REL8_0_0RC3:1.2
	REL8_0_0RC2:1.2
	REL8_0_0RC1:1.2
	REL8_0_0BETA5:1.2
	REL8_0_0BETA4:1.2
	REL7_4_6:1.2
	REL7_3_8:1.1
	REL8_0_0BETA3:1.2
	REL8_0_0BETA2:1.2
	REL7_4_5:1.2
	REL7_3_7:1.1
	REL7_4_4:1.2
	REL8_0_0BETA1:1.2
	REL7_4_3:1.2
	REL7_4_2:1.2
	REL7_3_6:1.1
	REL7_4_1:1.2
	REL7_3_5:1.1
	REL7_4:1.2
	REL7_4_RC2:1.2
	REL7_4_STABLE:1.2.0.4
	REL7_4_RC1:1.2
	REL7_4_BETA5:1.2
	REL7_4_BETA4:1.2
	REL7_4_BETA3:1.2
	REL7_4_BETA2:1.2
	WIN32_DEV:1.2.0.2
	REL7_4_BETA1:1.2
	REL7_3_4:1.1
	REL7_3_2:1.1
	REL7_3_STABLE:1.1.0.2;
locks; strict;
comment	@# @;


1.6
date	2007.11.11.05.13.09;	author momjian;	state dead;
branches;
next	1.5;

1.5
date	2007.07.08.17.12.38;	author joe;	state Exp;
branches;
next	1.4;

1.4
date	2006.03.11.04.38.29;	author momjian;	state Exp;
branches
	1.4.2.1;
next	1.3;

1.3
date	2005.06.21.04.02.28;	author tgl;	state Exp;
branches
	1.3.2.1;
next	1.2;

1.2
date	2003.06.25.01.10.15;	author momjian;	state Exp;
branches
	1.2.4.1
	1.2.8.1;
next	1.1;

1.1
date	2002.09.02.06.32.41;	author momjian;	state Exp;
branches
	1.1.2.1;
next	;

1.1.2.1
date	2007.07.09.01.44.11;	author joe;	state Exp;
branches;
next	;

1.2.4.1
date	2007.07.09.01.43.57;	author joe;	state Exp;
branches;
next	;

1.2.8.1
date	2007.07.09.01.32.58;	author joe;	state Exp;
branches;
next	;

1.3.2.1
date	2007.07.09.01.32.44;	author joe;	state Exp;
branches;
next	;

1.4.2.1
date	2007.07.09.01.32.30;	author joe;	state Exp;
branches;
next	;


desc
@@


1.6
log
@Remove /contrib/dblink/doc directory, now in SGML.
@
text
@$PostgreSQL: pgsql/contrib/dblink/doc/connection,v 1.5 2007/07/08 17:12:38 joe Exp $
==================================================================
Name

dblink_connect -- Opens a persistent connection to a remote database

Synopsis

dblink_connect(text connstr)
dblink_connect(text connname, text connstr)

Inputs

  connname
    if 2 arguments are given, the first is used as a name for a persistent
    connection

  connstr

    standard libpq format connection string, 
    e.g. "hostaddr=127.0.0.1 port=5432 dbname=mydb user=postgres password=mypasswd"

    if only one argument is given, the connection is unnamed; only one unnamed
    connection can exist at a time

Outputs

  Returns status = "OK"

Notes

  Only superusers may use dblink_connect to create non-password
  authenticated connections. If non-superusers need this capability,
  use dblink_connect_u instead.

Example usage

select dblink_connect('dbname=postgres');
 dblink_connect
----------------
 OK
(1 row)

select dblink_connect('myconn','dbname=postgres');
 dblink_connect
----------------
 OK
(1 row)

==================================================================
Name

dblink_connect_u -- Opens a persistent connection to a remote database

Synopsis

dblink_connect_u(text connstr)
dblink_connect_u(text connname, text connstr)

Inputs

  connname
    if 2 arguments are given, the first is used as a name for a persistent
    connection

  connstr

    standard libpq format connection string, 
    e.g. "hostaddr=127.0.0.1 port=5432 dbname=mydb user=postgres password=mypasswd"

    if only one argument is given, the connection is unnamed; only one unnamed
    connection can exist at a time

Outputs

  Returns status = "OK"

Notes

  With dblink_connect_u, a non-superuser may connect to any database server
  using any authentication method. If the authentication method specified
  for a particular user does not require a password, impersonation and
  therefore escalation of privileges may occur. For this reason,
  dblink_connect_u is initially installed with all privileges revoked from
  public. Privilege to these functions should be granted with care.

Example usage


==================================================================
Name

dblink_disconnect -- Closes a persistent connection to a remote database

Synopsis

dblink_disconnect()
dblink_disconnect(text connname)

Inputs

  connname
    if an argument is given, it is used as a name for a persistent
    connection to close; otherwiase the unnamed connection is closed

Outputs

  Returns status = "OK"

Example usage

test=# select dblink_disconnect();
 dblink_disconnect
-------------------
 OK
(1 row)

select dblink_disconnect('myconn');
 dblink_disconnect
-------------------
 OK
(1 row)
@


1.5
log
@Restrict non-superusers to password authenticated connections
to prevent possible escalation of privilege. Provide new SECURITY
DEFINER functions with old behavior, but initially REVOKE ALL
from public for these functions. Per list discussion and design
proposed by Tom Lane. A different approach will be used for
back-branches, committed separately.
@
text
@d1 1
a1 1
$PostgreSQL: pgsql/contrib/dblink/doc/connection,v 1.4 2006/03/11 04:38:29 momjian Exp $
@


1.4
log
@Add CVS tag lines to files that were lacking them.
@
text
@d1 1
a1 1
$PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.314 2006/03/07 02:54:23 momjian Exp $
d30 6
d53 40
@


1.4.2.1
log
@Restrict non-superusers to password authenticated connections
to prevent possible escalation of privilege. Provide new SECURITY
DEFINER functions with old behavior, but initially REVOKE ALL
from public for these functions. Per list discussion and design
proposed by Tom Lane.
@
text
@d1 1
a1 1
$PostgreSQL: pgsql/contrib/dblink/doc/connection,v 1.4 2006/03/11 04:38:29 momjian Exp $
a29 6
Notes

  Only superusers may use dblink_connect to create non-password
  authenticated connections. If non-superusers need this capability,
  use dblink_connect_u instead.

a46 40
dblink_connect_u -- Opens a persistent connection to a remote database

Synopsis

dblink_connect_u(text connstr)
dblink_connect_u(text connname, text connstr)

Inputs

  connname
    if 2 arguments are given, the first is used as a name for a persistent
    connection

  connstr

    standard libpq format connection string, 
    e.g. "hostaddr=127.0.0.1 port=5432 dbname=mydb user=postgres password=mypasswd"

    if only one argument is given, the connection is unnamed; only one unnamed
    connection can exist at a time

Outputs

  Returns status = "OK"

Notes

  With dblink_connect_u, a non-superuser may connect to any database server
  using any authentication method. If the authentication method specified
  for a particular user does not require a password, impersonation and
  therefore escalation of privileges may occur. For this reason,
  dblink_connect_u is initially installed with all privileges revoked from
  public. Privilege to these functions should be granted with care.

Example usage


==================================================================
Name

@


1.3
log
@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.
@
text
@d1 1
@


1.3.2.1
log
@Restrict non-superusers to password authenticated connections
to prevent possible escalation of privilege. Provide new SECURITY
DEFINER functions with old behavior, but initially REVOKE ALL
from public for these functions. Per list discussion and design
proposed by Tom Lane.
@
text
@a28 6
Notes

  Only superusers may use dblink_connect to create non-password
  authenticated connections. If non-superusers need this capability,
  use dblink_connect_u instead.

a45 41
dblink_connect_u -- Opens a persistent connection to a remote database

Synopsis

dblink_connect_u(text connstr)
dblink_connect_u(text connname, text connstr)

Inputs

  connname
    if 2 arguments are given, the first is used as a name for a persistent
    connection

  connstr

    standard libpq format connection string, 
    e.g. "hostaddr=127.0.0.1 port=5432 dbname=mydb user=postgres password=mypasswd"

    if only one argument is given, the connection is unnamed; only one unnamed
    connection can exist at a time

Outputs

  Returns status = "OK"

Notes

  With dblink_connect_u, a non-superuser may connect to any database server
  using any authentication method. If the authentication method specified
  for a particular user does not require a password, impersonation and
  therefore escalation of privileges may occur. For this reason,
  dblink_connect_u is initially installed with all privileges revoked from
  public. Privilege to these functions should be granted with care.

Example usage



==================================================================
Name

@


1.2
log
@Please apply attached patch to contrib/dblink. It adds named persistent
connections to dblink.

Shridhar Daithanka
@
text
@d31 1
a31 1
select dblink_connect('dbname=template1');
d37 1
a37 1
select dblink_connect('myconn','dbname=template1');
@


1.2.4.1
log
@Restrict non-superusers to password authenticated connections
to prevent possible escalation of privilege. Provide new SECURITY
DEFINER functions with old behavior, but initially REVOKE ALL
from public for these functions. Per list discussion and design
proposed by Tom Lane.
@
text
@a28 6
Notes

  Only superusers may use dblink_connect to create non-password
  authenticated connections. If non-superusers need this capability,
  use dblink_connect_u instead.

a45 40
dblink_connect_u -- Opens a persistent connection to a remote database

Synopsis

dblink_connect_u(text connstr)
dblink_connect_u(text connname, text connstr)

Inputs

  connname
    if 2 arguments are given, the first is used as a name for a persistent
    connection

  connstr

    standard libpq format connection string, 
    e.g. "hostaddr=127.0.0.1 port=5432 dbname=mydb user=postgres password=mypasswd"

    if only one argument is given, the connection is unnamed; only one unnamed
    connection can exist at a time

Outputs

  Returns status = "OK"

Notes

  With dblink_connect_u, a non-superuser may connect to any database server
  using any authentication method. If the authentication method specified
  for a particular user does not require a password, impersonation and
  therefore escalation of privileges may occur. For this reason,
  dblink_connect_u is initially installed with all privileges revoked from
  public. Privilege to these functions should be granted with care.

Example usage


==================================================================
Name

@


1.2.8.1
log
@Restrict non-superusers to password authenticated connections
to prevent possible escalation of privilege. Provide new SECURITY
DEFINER functions with old behavior, but initially REVOKE ALL
from public for these functions. Per list discussion and design
proposed by Tom Lane.
@
text
@a28 6
Notes

  Only superusers may use dblink_connect to create non-password
  authenticated connections. If non-superusers need this capability,
  use dblink_connect_u instead.

a45 40
dblink_connect_u -- Opens a persistent connection to a remote database

Synopsis

dblink_connect_u(text connstr)
dblink_connect_u(text connname, text connstr)

Inputs

  connname
    if 2 arguments are given, the first is used as a name for a persistent
    connection

  connstr

    standard libpq format connection string, 
    e.g. "hostaddr=127.0.0.1 port=5432 dbname=mydb user=postgres password=mypasswd"

    if only one argument is given, the connection is unnamed; only one unnamed
    connection can exist at a time

Outputs

  Returns status = "OK"

Notes

  With dblink_connect_u, a non-superuser may connect to any database server
  using any authentication method. If the authentication method specified
  for a particular user does not require a password, impersonation and
  therefore escalation of privileges may occur. For this reason,
  dblink_connect_u is initially installed with all privileges revoked from
  public. Privilege to these functions should be granted with care.

Example usage


==================================================================
Name

@


1.1
log
@Add missing dblink files.
@
text
@d9 1
d13 4
d22 3
d31 7
a37 1
test=# select dblink_connect('dbname=template1');
d46 1
a46 1
dblink_disconnect -- Closes the persistent connection to a remote database
d51 1
d55 3
a57 1
  none
d71 5
@


1.1.2.1
log
@Restrict non-superusers to password authenticated connections
to prevent possible escalation of privilege. Provide new SECURITY
DEFINER functions with old behavior, but initially REVOKE ALL
from public for these functions. Per list discussion and design
proposed by Tom Lane.
@
text
@a20 6
Notes

  Only superusers may use dblink_connect to create non-password
  authenticated connections. If non-superusers need this capability,
  use dblink_connect_u instead.

a31 32
dblink_connect_u -- Opens a persistent connection to a remote database

Synopsis

dblink_connect_u(text connstr)

Inputs

  connstr

    standard libpq format connection string, 
    e.g. "hostaddr=127.0.0.1 port=5432 dbname=mydb user=postgres password=mypasswd"

Outputs

  Returns status = "OK"

Notes

  With dblink_connect_u, a non-superuser may connect to any database server
  using any authentication method. If the authentication method specified
  for a particular user does not require a password, impersonation and
  therefore escalation of privileges may occur. For this reason,
  dblink_connect_u is initially installed with all privileges revoked from
  public. Privilege to these functions should be granted with care.

Example usage


==================================================================
Name

@


