head	1.6;
access;
symbols
	REL7_4_29:1.1
	REL8_0_25:1.1
	REL8_1_21:1.2
	REL8_2_17:1.4
	REL7_4_28:1.1
	REL8_0_24:1.1
	REL8_1_20:1.2
	REL8_2_16:1.4
	REL7_4_27:1.1
	REL8_0_23:1.1
	REL8_1_19:1.2
	REL8_2_15:1.4
	REL7_4_26:1.1
	REL8_0_22:1.1
	REL8_1_18:1.2
	REL8_2_14:1.4
	REL7_4_25:1.1
	REL8_0_21:1.1
	REL8_1_17:1.2
	REL8_2_13:1.4
	REL7_4_24:1.1
	REL8_0_20:1.1
	REL8_1_16:1.2
	REL8_2_12:1.4
	REL7_4_23:1.1
	REL8_0_19:1.1
	REL8_1_15:1.2
	REL8_2_11:1.4
	REL7_4_22:1.1
	REL8_0_18:1.1
	REL8_1_14:1.2
	REL8_2_10:1.4
	REL7_4_21:1.1
	REL8_0_17:1.1
	REL8_1_13:1.2
	REL8_2_9:1.4
	REL7_4_20:1.1
	REL8_0_16:1.1
	REL8_1_12:1.2
	REL8_2_8:1.4
	REL8_2_7:1.4
	REL7_3_21:1.1
	REL7_4_19:1.1
	REL8_0_15:1.1
	REL8_1_11:1.2
	REL8_2_6:1.4
	REL8_3_BETA2:1.4
	REL8_3_BETA1:1.4
	REL7_3_20:1.1
	REL7_4_18:1.1
	REL8_0_14:1.1
	REL8_1_10:1.2
	REL8_2_5:1.4
	REL7_3_19:1.1
	REL7_4_17:1.1
	REL8_0_13:1.1
	REL8_1_9:1.2
	REL8_2_4:1.4
	REL8_0_12:1.1
	REL8_1_8:1.2
	REL8_2_3:1.4
	REL7_3_18:1.1
	REL7_4_16:1.1
	REL8_0_11:1.1
	REL8_1_7:1.2
	REL8_2_2:1.4
	REL8_0_10:1.1
	REL8_1_6:1.2
	REL8_2_1:1.4
	REL7_4_15:1.1
	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.2
	REL8_0_9:1.1
	REL7_4_14:1.1
	REL7_3_16:1.1
	REL8_2_BETA1:1.4
	REL7_3_15:1.1
	REL7_4_13:1.1
	REL8_0_8:1.1
	REL8_1_4:1.2
	REL7_3_14:1.1
	REL7_4_12:1.1
	REL8_0_7:1.1
	REL8_1_3:1.2
	REL7_3_13:1.1
	REL7_4_11:1.1
	REL8_0_6:1.1
	REL8_1_2:1.2
	REL7_3_12:1.1
	REL7_4_10:1.1
	REL8_0_5:1.1
	REL8_1_1:1.2
	REL8_1_STABLE:1.2.0.2
	REL8_1_0:1.2
	REL8_1_0RC1:1.2
	REL8_1_0BETA4:1.2
	REL8_1_0BETA3:1.2
	REL7_3_11:1.1
	REL7_4_9:1.1
	REL8_0_4:1.1
	REL8_1_0BETA2:1.2
	REL8_1_0BETA1:1.2
	REL7_3_10:1.1
	REL7_4_8:1.1
	REL8_0_3:1.1
	REL8_0_2:1.1
	REL7_3_9:1.1
	REL7_4_7:1.1
	REL8_0_1:1.1
	REL8_0_STABLE:1.1.0.10
	REL8_0_0:1.1.0.8
	REL8_0_0RC5:1.1
	REL8_0_0RC4:1.1
	REL8_0_0RC3:1.1
	REL8_0_0RC2:1.1
	REL8_0_0RC1:1.1
	REL8_0_0BETA5:1.1
	REL8_0_0BETA4:1.1
	REL7_4_6:1.1
	REL7_3_8:1.1
	REL8_0_0BETA3:1.1
	REL8_0_0BETA2:1.1
	REL7_4_5:1.1
	REL7_3_7:1.1
	REL7_4_4:1.1
	REL8_0_0BETA1:1.1
	REL7_4_3:1.1
	REL7_4_2:1.1
	REL7_3_6:1.1
	REL7_4_1:1.1
	REL7_3_5:1.1
	REL7_4:1.1
	REL7_4_RC2:1.1
	REL7_4_STABLE:1.1.0.6
	REL7_4_RC1:1.1
	REL7_4_BETA5:1.1
	REL7_4_BETA4:1.1
	REL7_4_BETA3:1.1
	REL7_4_BETA2:1.1
	WIN32_DEV:1.1.0.4
	REL7_4_BETA1:1.1
	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.11.07.12.24.23;	author petere;	state Exp;
branches;
next	1.4;

1.4
date	2006.09.02.21.11.15;	author joe;	state Exp;
branches;
next	1.3;

1.3
date	2006.03.11.04.38.29;	author momjian;	state Exp;
branches;
next	1.2;

1.2
date	2005.06.21.04.02.28;	author tgl;	state Exp;
branches;
next	1.1;

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


desc
@@


1.6
log
@Remove /contrib/dblink/doc directory, now in SGML.
@
text
@$PostgreSQL: pgsql/contrib/dblink/doc/misc,v 1.5 2007/11/07 12:24:23 petere Exp $
==================================================================
Name

dblink_current_query -- returns the current query string

Synopsis

dblink_current_query () RETURNS text

Inputs

  None

Outputs

  Returns text -- a copy of the currently executing query

Example usage

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=postgres','select oid, proname from pg_proc where proname = ''byteacat''') as f1) as t1;
(1 row)

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

dblink_get_pkey -- returns the position and field names of a relation's
                   primary key fields

Synopsis

dblink_get_pkey(text relname) RETURNS setof dblink_pkey_results

Inputs

  relname

    any relation name;
    e.g. 'foobar'

Outputs

  Returns setof dblink_pkey_results -- one row for each primary key field,
    in order of position in the key. dblink_pkey_results is defined as follows:
       CREATE TYPE dblink_pkey_results AS (position int4, colname text);

Example usage

test=# select * from dblink_get_pkey('foobar');
 position | colname
----------+---------
        1 | f1
        2 | f2
        3 | f3
        4 | f4
        5 | f5

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

dblink_build_sql_insert -- builds an insert statement using a local
                           tuple, replacing the selection key field
                           values with alternative supplied values
dblink_build_sql_delete -- builds a delete statement using supplied
                           values for selection key field values
dblink_build_sql_update -- builds an update statement using a local
                           tuple, replacing the selection key field
                           values with alternative supplied values


Synopsis

dblink_build_sql_insert(text relname
                         ,int2vector primary_key_attnums
                         ,int2 num_primary_key_atts
                         ,_text src_pk_att_vals_array
                         ,_text tgt_pk_att_vals_array) RETURNS text
dblink_build_sql_delete(text relname
                         ,int2vector primary_key_attnums
                         ,int2 num_primary_key_atts
                         ,_text tgt_pk_att_vals_array) RETURNS text
dblink_build_sql_update(text relname
                         ,int2vector primary_key_attnums
                         ,int2 num_primary_key_atts
                         ,_text src_pk_att_vals_array
                         ,_text tgt_pk_att_vals_array) RETURNS text

Inputs

  relname

    any relation name;
    e.g. 'foobar'

  primary_key_attnums

    vector of primary key attnums (1 based, see pg_index.indkey);
    e.g. '1 2'

  num_primary_key_atts

    number of primary key attnums in the vector; e.g. 2

  src_pk_att_vals_array

    array of primary key values, used to look up the local matching
    tuple, the values of which are then used to construct the SQL
    statement

  tgt_pk_att_vals_array

    array of primary key values, used to replace the local tuple
    values in the SQL statement

Outputs

  Returns text -- requested SQL statement

Example usage

test=# select dblink_build_sql_insert('foo','1 2',2,'{"1", "a"}','{"1", "b''a"}');
             dblink_build_sql_insert
--------------------------------------------------
 INSERT INTO foo(f1,f2,f3) VALUES('1','b''a','1')
(1 row)

test=# select dblink_build_sql_delete('MyFoo','1 2',2,'{"1", "b"}');
           dblink_build_sql_delete
---------------------------------------------
 DELETE FROM "MyFoo" WHERE f1='1' AND f2='b'
(1 row)

test=# select dblink_build_sql_update('foo','1 2',2,'{"1", "a"}','{"1", "b"}');
                   dblink_build_sql_update
-------------------------------------------------------------
 UPDATE foo SET f1='1',f2='b',f3='1' WHERE f1='1' AND f2='b'
(1 row)


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

dblink_get_connections -- returns a text array of all active named
                          dblink connections

Synopsis

dblink_get_connections() RETURNS text[]

Inputs

  none

Outputs

  Returns text array of all active named dblink connections

Example usage

  SELECT dblink_get_connections();

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

dblink_is_busy -- checks to see if named connection is busy
                  with an async query

Synopsis

dblink_is_busy(text connname) RETURNS int

Inputs

  connname
    The specific connection name to use.

Outputs

  Returns 1 if connection is busy, 0 if it is not busy.
  If this function returns 0, it is guaranteed that dblink_get_result
  will not block.

Example usage

  SELECT dblink_is_busy('dtest1');

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

dblink_cancel_query -- cancels any active query on the named connection

Synopsis

dblink_cancel_query(text connname) RETURNS text

Inputs

  connname
    The specific connection name to use.

Outputs

  Returns "OK" on success, or an error message on failure.

Example usage

  SELECT dblink_cancel_query('dtest1');

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

dblink_error_message -- gets last error message on the named connection

Synopsis

dblink_error_message(text connname) RETURNS text

Inputs

  connname
    The specific connection name to use.

Outputs

  Returns last error message.

Example usage

  SELECT dblink_error_message('dtest1');
@


1.5
log
@Use "alternative" instead of "alternate" where it is clearer.
@
text
@d1 1
a1 1
$PostgreSQL: pgsql/contrib/dblink/doc/misc,v 1.4 2006/09/02 21:11:15 joe Exp $
@


1.4
log
@Added async query capability. Original patch by
Kai Londenberg, modified by Joe Conway
@
text
@d1 1
a1 1
$PostgreSQL: pgsql/contrib/dblink/doc/misc,v 1.3 2006/03/11 04:38:29 momjian Exp $
d66 1
a66 1
                           values with alternate supplied values
d71 1
a71 1
                           values with alternate supplied values
@


1.3
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 $
d142 91
@


1.2
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.1
log
@Add missing dblink files.
@
text
@d20 1
a20 1
test=# select dblink_current_query() from (select dblink('dbname=template1','select oid, proname from pg_proc where proname = ''byteacat''') as f1) as t1;
d23 1
a23 1
 select dblink_current_query() from (select dblink('dbname=template1','select oid, proname from pg_proc where proname = ''byteacat''') as f1) as t1;
@

