~ubuntu-branches/ubuntu/oneiric/postgresql-9.1/oneiric-security

« back to all changes in this revision

Viewing changes to doc/src/sgml/man3/dblink_send_query.3

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2011-05-11 10:41:53 UTC
  • Revision ID: james.westby@ubuntu.com-20110511104153-psbh2o58553fv1m0
Tags: upstream-9.1~beta1
ImportĀ upstreamĀ versionĀ 9.1~beta1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
'\" t
 
2
.\"     Title: dblink_send_query
 
3
.\"    Author: The PostgreSQL Global Development Group
 
4
.\" Generator: DocBook XSL Stylesheets v1.75.1 <http://docbook.sf.net/>
 
5
.\"      Date: 2011-04-27
 
6
.\"    Manual: PostgreSQL 9.1beta1 Documentation
 
7
.\"    Source: PostgreSQL 9.1beta1
 
8
.\"  Language: English
 
9
.\"
 
10
.TH "DBLINK_SEND_QUERY" "3" "2011-04-27" "PostgreSQL 9.1beta1" "PostgreSQL 9.1beta1 Documentation"
 
11
.\" -----------------------------------------------------------------
 
12
.\" * set default formatting
 
13
.\" -----------------------------------------------------------------
 
14
.\" disable hyphenation
 
15
.nh
 
16
.\" disable justification (adjust text to left margin only)
 
17
.ad l
 
18
.\" -----------------------------------------------------------------
 
19
.\" * MAIN CONTENT STARTS HERE *
 
20
.\" -----------------------------------------------------------------
 
21
.SH "NAME"
 
22
dblink_send_query \- sends an async query to a remote database
 
23
.SH "SYNOPSIS"
 
24
.sp
 
25
.nf
 
26
dblink_send_query(text connname, text sql) returns int
 
27
.fi
 
28
.SH "DESCRIPTION"
 
29
.PP
 
30
\fBdblink_send_query\fR
 
31
sends a query to be executed asynchronously, that is, without immediately waiting for the result\&. There must not be an async query already in progress on the connection\&.
 
32
.PP
 
33
After successfully dispatching an async query, completion status can be checked with
 
34
\fBdblink_is_busy\fR, and the results are ultimately collected with
 
35
\fBdblink_get_result\fR\&. It is also possible to attempt to cancel an active async query using
 
36
\fBdblink_cancel_query\fR\&.
 
37
.SH "ARGUMENTS"
 
38
.PP
 
39
\fIconname\fR
 
40
.RS 4
 
41
Name of the connection to use\&.
 
42
.RE
 
43
.PP
 
44
\fIsql\fR
 
45
.RS 4
 
46
The SQL statement that you wish to execute in the remote database, for example
 
47
select * from pg_class\&.
 
48
.RE
 
49
.SH "RETURN VALUE"
 
50
.PP
 
51
Returns 1 if the query was successfully dispatched, 0 otherwise\&.
 
52
.SH "EXAMPLE"
 
53
.sp
 
54
.if n \{\
 
55
.RS 4
 
56
.\}
 
57
.nf
 
58
SELECT dblink_send_query(\(aqdtest1\(aq, \(aqSELECT * FROM foo WHERE f1 < 3\(aq);
 
59
.fi
 
60
.if n \{\
 
61
.RE
 
62
.\}