Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
026a8510
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,发现更多精彩内容 >>
提交
026a8510
编写于
2月 25, 2005
作者:
B
Bruce Momjian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix HTML markup and add NULL sorting item to existing NULL FAQ item.
Greg Sabino Mullan
上级
d2557833
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
59 addition
and
25 deletion
+59
-25
doc/FAQ
doc/FAQ
+27
-12
doc/src/FAQ/FAQ.html
doc/src/FAQ/FAQ.html
+32
-13
未找到文件。
doc/FAQ
浏览文件 @
026a8510
Frequently Asked Questions (FAQ) for PostgreSQL
Last updated:
Mon Feb 14 23:35:09
EST 2005
Last updated:
Thu Feb 24 19:32:04
EST 2005
Current maintainer: Bruce Momjian (pgman@candle.pha.pa.us)
...
...
@@ -59,7 +59,8 @@
4.8) How do I perform regular expression searches and case-insensitive
regular expression searches? How do I use an index for
case-insensitive searches?
4.9) In a query, how do I detect if a field is NULL?
4.9) In a query, how do I detect if a field is NULL? How can I sort on
whether a field is NULL or not?
4.10) What is the difference between the various character types?
4.11.1) How do I create a serial/auto-incrementing field?
4.11.2) How do I get the value of a SERIAL insert?
...
...
@@ -119,7 +120,8 @@
PostgreSQL Data Base Management System
Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
Portions Copyright (c) 1994-6 Regents of the University of California
Portions Copyright (c) 1994-1996 Regents of the University of
California
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose, without fee, and without a written
...
...
@@ -160,7 +162,8 @@
1.4) Where can I get PostgreSQL?
The primary anonymous ftp site for PostgreSQL is
ftp://ftp.PostgreSQL.org/pub. For mirror sites, see our main web site.
ftp://ftp.PostgreSQL.org/pub/. For mirror sites, see our main web
site.
1.5) Where can I get support?
...
...
@@ -177,14 +180,14 @@
EFNet.
A list of commercial support companies is available at
http://techdocs.postg
resql.org/companies.php.
http://techdocs.postgresql.org/companies.php.
1.6) How do I submit a bug report?
Visit the PostgreSQL bug form at
http://www.postgresql.org/support/submitbug.
Also check out our ftp site ftp://ftp.PostgreSQL.org/pub to see if
Also check out our ftp site ftp://ftp.PostgreSQL.org/pub
/
to see if
there is a more recent PostgreSQL version.
1.7) What is the latest release?
...
...
@@ -318,15 +321,15 @@
For Web integration, PHP (http://www.php.net) is an excellent
interface.
For complex cases, many use the Perl
and
CGI.pm or mod_perl.
For complex cases, many use the Perl
DBD::Pg with
CGI.pm or mod_perl.
2.3) Does PostgreSQL have a graphical user interface?
Yes, there are several graphical interfaces to PostgreSQL available.
These include pgAdmin III (http://www.pgadmin.org, PgAccess
http://www.pgaccess.org), RHDB Admin (http://sources.redhat.com/rhd
b/
), TORA (
http://www.globecom.net/tora/, partly commercial), and Rekall
( http://www.rekallrevealed.org/). There is also PhpPgAdmin (
http://www.pgaccess.org), RHDB Admin (http://sources.redhat.com/rhdb/
), TORA (
http://www.globecom.net/tora/, partly commercial), and
Rekall
( http://www.rekallrevealed.org/). There is also PhpPgAdmin (
http://phppgadmin.sourceforge.net/ ), a web-based interface to
PostgreSQL.
...
...
@@ -634,10 +637,22 @@
expresssion index, it will be used:
CREATE INDEX tabindex ON tab (lower(col));
4.9) In a query, how do I detect if a field is NULL?
4.9) In a query, how do I detect if a field is NULL? How can I sort on
whether a field is NULL or not?
You test the column with IS NULL and IS NOT NULL.
SELECT *
FROM tab
WHERE col IS NULL;
To sort by the NULLIS NULL
and IS NOT NULL modifiers in your WHERE clause. Things that are true
will sort higher than things that are false, so the following will put
NULL entries at the top of the resulting list:
SELECT *
FROM tab
ORDER BY (col IS NOT NULL)
4.10) What is the difference between the various character types?
Type Internal Name Notes
...
...
doc/src/FAQ/FAQ.html
浏览文件 @
026a8510
...
...
@@ -10,7 +10,7 @@
alink=
"#0000ff"
>
<H1>
Frequently Asked Questions (FAQ) for PostgreSQL
</H1>
<P>
Last updated:
Mon Feb 14 23:35:09
EST 2005
</P>
<P>
Last updated:
Thu Feb 24 19:32:04
EST 2005
</P>
<P>
Current maintainer: Bruce Momjian (
<A
href=
"mailto:pgman@candle.pha.pa.us"
>
pgman@candle.pha.pa.us
</A>
)
...
...
@@ -85,7 +85,8 @@
searches and case-insensitive regular expression searches? How do I
use an index for case-insensitive searches?
<BR>
<A
href=
"#4.9"
>
4.9
</A>
) In a query, how do I detect if a field
is
<SMALL>
NULL
</SMALL>
?
<BR>
is
<SMALL>
NULL
</SMALL>
? How can I sort on whether a field is
<SMALL>
NULL
</SMALL>
or not?
<BR>
<A
href=
"#4.10"
>
4.10
</A>
) What is the difference between the
various character types?
<BR>
<A
href=
"#4.11.1"
>
4.11.1
</A>
) How do I create a
...
...
@@ -162,7 +163,7 @@
<P>
PostgreSQL Data Base Management System
</P>
<P>
Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
Portions Copyright (c) 1994-6 Regents of the University of California
</P>
Portions Copyright (c) 1994-
199
6 Regents of the University of California
</P>
<P>
Permission to use, copy, modify, and distribute this software
and its documentation for any purpose, without fee, and without a
...
...
@@ -206,7 +207,7 @@
<H4><A
name=
"1.4"
>
1.4
</A>
) Where can I get PostgreSQL?
</H4>
<P>
The primary anonymous ftp site for PostgreSQL is
<A
href=
"ftp://ftp.PostgreSQL.org/pub
"
>
ftp://ftp.PostgreSQL.org/pub
</A>
.
"ftp://ftp.PostgreSQL.org/pub
/"
>
ftp://ftp.PostgreSQL.org/pub/
</A>
.
For mirror sites, see our main web site.
</P>
<H4><A
name=
"1.5"
>
1.5
</A>
) Where can I get support?
</H4>
...
...
@@ -225,8 +226,8 @@
(
<I>
#postgresqlfr
</I>
). There is also a PostgreSQL channel on EFNet.
<P>
A list of commercial support companies is available at
<A
href=
"http://techdocs.postgresql.org/companies.php"
>
http://techdocs.postg
resql.org/companies.php
</A>
.
</P>
"http://techdocs.postgresql.org/companies.php"
>
http://techdocs.postg
resql.org/companies.php
</A>
.
</P>
<H4><A
name=
"1.6"
>
1.6
</A>
) How do I submit a bug report?
</H4>
...
...
@@ -235,7 +236,7 @@
http://www.postgresql.org/support/submitbug
</A>
.
</P>
<P>
Also check out our ftp site
<A
href=
"ftp://ftp.PostgreSQL.org/pub
"
>
ftp://ftp.PostgreSQL.org/pub
</A>
to
"ftp://ftp.PostgreSQL.org/pub
/"
>
ftp://ftp.PostgreSQL.org/pub/
</A>
to
see if there is a more recent PostgreSQL version.
</P>
<H4><A
name=
"1.7"
>
1.7
</A>
) What is the latest release?
</H4>
...
...
@@ -411,7 +412,8 @@
href=
"http://www.php.net"
>
http://www.php.net
</A>
) is an excellent
interface.
</P>
<P>
For complex cases, many use the Perl and CGI.pm or mod_perl.
</P>
<P>
For complex cases, many use the Perl DBD::Pg with CGI.pm or
mod_perl.
</P>
<H4><A
name=
"2.3"
>
2.3
</A>
) Does PostgreSQL have a graphical user
interface?
</H4>
...
...
@@ -421,10 +423,9 @@
href=
"http://www.pgadmin.org"
>
http://www.pgadmin.org
</a>
, PgAccess
<a
href=
"http://www.pgaccess.org"
>
http://www.pgaccess.org
</a>
),
RHDB Admin (
<a
href=
"http://sources.redhat.com/rhdb/"
>
http://sources.redhat.com/rhd
b/
</a>
), TORA (
<a
href=
"http://www.globecom.net/tora/"
>
http://www.globecom.net/tora/
</a>
,
partly commercial), and Rekall (
<a
href=
"http://sources.redhat.com/rhdb/"
>
http://sources.redhat.com/rhdb/
</a>
), TORA (
<a
href=
"http://www.globecom.net/tora/"
>
http://www.globecom.net/tora/
</a>
, partly commercial), and Rekall (
<a
href=
"http://www.rekallrevealed.org/"
>
http://www.rekallrevealed.org/
</a>
). There is also PhpPgAdmin (
<a
href=
"http://phppgadmin.sourceforge.net/"
>
...
...
@@ -815,11 +816,29 @@ table?</TD><TD>unlimited</TD></TR>
</PRE>
<H4><A
name=
"4.9"
>
4.9
</A>
) In a query, how do I detect if a field
is
<SMALL>
NULL
</SMALL>
?
</H4>
is
<SMALL>
NULL
</SMALL>
? How can I sort on whether a field is
<SMALL>
NULL
</SMALL>
or not?
</H4>
<P>
You test the column with
<SMALL>
IS NULL
</SMALL>
and
<SMALL>
IS
NOT NULL
</SMALL>
.
</P>
<PRE>
SELECT *
FROM tab
WHERE col IS NULL;
</PRE>
<P>
To sort by the
<SMALL>
NULL
</SMALL
status,
use
the
<SMALL
>
IS NULL
</SMALL>
and
<SMALL>
IS NOT NULL
</SMALL>
modifiers in your
<SMALL>
WHERE
</SMALL>
clause.
Things that are
<I>
true
</I>
will sort higher than things that are
<I>
false
</I>
,
so the following will put NULL entries at the top of the resulting list:
</P>
<PRE>
SELECT *
FROM tab
ORDER BY (col IS NOT NULL)
</PRE>
<H4><A
name=
"4.10"
>
4.10
</A>
) What is the difference between the
various character types?
</H4>
<BLOCKQUOTE>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录