Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
39740d75
G
Gpdb
项目概览
Greenplum
/
Gpdb
通知
7
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
Gpdb
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
39740d75
编写于
4月 04, 1998
作者:
T
Thomas G. Lockhart
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Clean up formatting.
Add more URL links for GiST information.
上级
e47e0e69
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
151 addition
and
20 deletion
+151
-20
doc/src/sgml/gist.sgml
doc/src/sgml/gist.sgml
+11
-0
doc/src/sgml/libpq.sgml
doc/src/sgml/libpq.sgml
+140
-20
未找到文件。
doc/src/sgml/gist.sgml
浏览文件 @
39740d75
...
...
@@ -10,6 +10,17 @@
</DocInfo>
<Title>GiST Indices</Title>
<Para>
The information about GIST is at
<ULink url="http://GiST.CS.Berkeley.EDU:8000/gist/">http://GiST.CS.Berkeley.EDU:8000/gist/</ULink>
with more on different indexing and sorting schemes at
<ULink url="http://s2k-ftp.CS.Berkeley.EDU:8000/personal/jmh/">http://s2k-ftp.CS.Berkeley.EDU:8000/personal/jmh/</ULink>
And there is more interesting reading at the Berkely database site at
<ULink url="http://epoch.cs.berkeley.edu:8000/">http://epoch.cs.berkeley.edu:8000/</ULink>.
<Para>
<Note>
<Title>Author</Title>
...
...
doc/src/sgml/libpq.sgml
浏览文件 @
39740d75
...
...
@@ -13,9 +13,9 @@
following directories:
<ProgramListing>
../src/test/regress
../src/test/examples
../src/bin/psql
../src/test/regress
../src/test/examples
../src/bin/psql
</ProgramListing>
<Para>
...
...
@@ -82,19 +82,21 @@
<ItemizedList>
<ListItem>
<Para>
<Function>PQsetdb</Function>
<Function>PQsetdb
Login
</Function>
Makes a new connection to a backend.
<ProgramListing>
PGconn *PQsetdb(char *pghost,
char *pgport,
char *pgoptions,
char *pgtty,
char *dbName);
PGconn *PQsetdbLogin(const char *pghost,
const char *pgport,
const char *pgoptions,
const char *pgtty,
const char *dbName,
const char *login,
const char *pwd);
</ProgramListing>
If any argument is NULL, then the corresponding
environment variable is checked. If the environment variable is also not set, then hardwired
defaults are used.
PQsetdb always returns a valid PGconn pointer.
PQsetdb
Login
always returns a valid PGconn pointer.
The PQstatus (see below) command should be called
to ensure that a connection was properly made
before queries are sent via the connection. <FileName>libpq</FileName>
...
...
@@ -107,6 +109,51 @@ PGconn *PQsetdb(char *pghost,
</Para>
</ListItem>
<ListItem>
<Para>
<Function>PQsetdb</Function>
Makes a new connection to a backend.
<ProgramListing>
PGconn *PQsetdb(char *pghost,
char *pgport,
char *pgoptions,
char *pgtty,
char *dbName);
</ProgramListing>
This is a macro that calls PQsetdbLogin() with null pointers
for the login and pwd parameters.
</Para>
</ListItem>
<ListItem>
<Para>
<Function>PQconndefaults</Function>
Returns the database name of the connection.
<ProgramListing>
PQconninfoOption *PQconndefaults(void)
struct PQconninfoOption
{
char *keyword; /* The keyword of the option */
char *environ; /* Fallback environment variable name */
char *compiled; /* Fallback compiled in default value */
char *val; /* Options value */
char *label; /* Label for field in connect dialog */
char *dispchar; /* Character to display for this field
in a connect dialog. Values are:
"" Display entered value as is
"*" Password field - hide value
"D" Debug options - don't
create a field by default */
int dispsize; /* Field size in characters for dialog */
};
</ProgramListing>
Returns the address of the connection options structure. This may
be used to determine all possible options and their current values.
</Para>
</ListItem>
<ListItem>
<Para>
<Function>PQdb</Function>
...
...
@@ -345,7 +392,7 @@ Oid PQftype(PGresult *res,
field. Field indices start at 0.
<ProgramListing>
int2 PQfsize(PGresult *res,
int field_index);
int field_index);
</ProgramListing>
</Para>
</ListItem>
...
...
@@ -374,6 +421,20 @@ char* PQgetvalue(PGresult *res,
</Para>
</ListItem>
<ListItem>
<Para>
<Function>PQgetisnull</Function>
Tests a field for a NULL entry.
<ProgramListing>
int PQgetisnull(PGresult *res,
int tup_num,
int field_num);
</ProgramListing>
This function returns 1 if the field contains a NULL, 0 if
it contains a known value..
</Para>
</ListItem>
<ListItem>
<Para>
<Function>PQgetlength</Function>
...
...
@@ -384,8 +445,8 @@ char* PQgetvalue(PGresult *res,
less.
<ProgramListing>
int PQgetlength(PGresult *res,
int tup_num,
int field_num);
int tup_num,
int field_num);
</ProgramListing>
</Para>
</ListItem>
...
...
@@ -401,6 +462,19 @@ char *PQcmdStatus(PGresult *res);
</Para>
</ListItem>
<ListItem>
<Para>
<Function>PQcmdTuples</Function>
Returns the number of rows affected by the last command.
<ProgramListing>
const char *PQcmdTuples(PGresult *res);
</ProgramListing>
If the last command was INSERT, UPDATE or DELETE, this returns
a string containing the number of rows affected. If the last
command was anything else, it returns the empty string.
</Para>
</ListItem>
<ListItem>
<Para>
<Function>PQoidStatus</Function>
...
...
@@ -413,6 +487,35 @@ char* PQoidStatus(PGresult *res);
</Para>
</ListItem>
<ListItem>
<Para>
<Function>PQprint</Function>
Prints out all the tuples and, optionally, the
attribute names to the specified output stream.
<ProgramListing>
void PQprint(FILE* fout, /* output stream */
PGresult* res,
PQprintOpt* po);
struct _PQprintOpt
{
pqbool header; /* print output field headings and row count */
pqbool align; /* fill align the fields */
pqbool standard; /* old brain dead format */
pqbool html3; /* output html tables */
pqbool expanded; /* expand tables */
pqbool pager; /* use pager for output if needed */
char *fieldSep; /* field separator */
char *tableOpt; /* insert to HTML <table ...> */
char *caption; /* HTML <caption> */
char **fieldName; /* null terminated array of replacement field names */
};
</ProgramListing>
This funtion is intended to replace PQprintTuples(), which is
now obsolete.
</Para>
</ListItem>
<ListItem>
<Para>
<Function>PQprintTuples</Function>
...
...
@@ -420,14 +523,31 @@ char* PQoidStatus(PGresult *res);
attribute names to the specified output stream.
The programs psql and monitor both use PQprintTuples for output.
<ProgramListing>
void PQprintTuples(
void PQprintTuples(PGresult* res,
FILE* fout, /* output stream */
int printAttName,/* print attribute names or not*/
int terseOutput, /* delimiter bars or not?*/
int width); /* width of column, variable width if 0*/
</ProgramListing>
</Para>
</ListItem>
<ListItem>
<Para>
<Function>PQdisplayTuples</Function>
Prints out all the tuples and, optionally, the
attribute names to the specified output stream.
<ProgramListing>
void PQdisplayTuples(
PGresult* res,
FILE* fout, /* output stream */
int
printAttName,/* print attribute names or not
*/
int terseOutput, /* delimiter bars or not?
*/
int width /* width of column, variable width if 0
*/
);
FILE* fout,
/* output stream */
int
fillAlign, /* space fill to align columns
*/
const char *fieldSep, /* field separator
*/
int printHeader, /* display headers?
*/
int quiet); /* suppress print of row count at end */
</ProgramListing>
PQdisplayTuples() was intended to supersede PQprintTuples(), and
is in turn superseded by PQprint().
</Para>
</ListItem>
<ListItem>
...
...
@@ -479,7 +599,7 @@ typedef struct {
int isint;
union {
int *ptr;
int integer;
int integer;
} u;
} PQArgBlock;
</ProgramListing>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录