Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit026a851

Browse files
committed
Fix HTML markup and add NULL sorting item to existing NULL FAQ item.
Greg Sabino Mullan
1 parentd255783 commit026a851

File tree

2 files changed

+59
-25
lines changed

2 files changed

+59
-25
lines changed

‎doc/FAQ

Lines changed: 27 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Frequently Asked Questions (FAQ) for PostgreSQL
33

4-
Last updated:Mon Feb14 23:35:09 EST 2005
4+
Last updated:Thu Feb24 19:32:04 EST 2005
55

66
Current maintainer: Bruce Momjian (pgman@candle.pha.pa.us)
77

@@ -59,7 +59,8 @@
5959
4.8) How do I perform regular expression searches and case-insensitive
6060
regular expression searches? How do I use an index for
6161
case-insensitive searches?
62-
4.9) In a query, how do I detect if a field is NULL?
62+
4.9) In a query, how do I detect if a field is NULL? How can I sort on
63+
whether a field is NULL or not?
6364
4.10) What is the difference between the various character types?
6465
4.11.1) How do I create a serial/auto-incrementing field?
6566
4.11.2) How do I get the value of a SERIAL insert?
@@ -119,7 +120,8 @@
119120
PostgreSQL Data Base Management System
120121

121122
Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
122-
Portions Copyright (c) 1994-6 Regents of the University of California
123+
Portions Copyright (c) 1994-1996 Regents of the University of
124+
California
123125

124126
Permission to use, copy, modify, and distribute this software and its
125127
documentation for any purpose, without fee, and without a written
@@ -160,7 +162,8 @@
160162
1.4) Where can I get PostgreSQL?
161163

162164
The primary anonymous ftp site for PostgreSQL is
163-
ftp://ftp.PostgreSQL.org/pub. For mirror sites, see our main web site.
165+
ftp://ftp.PostgreSQL.org/pub/. For mirror sites, see our main web
166+
site.
164167

165168
1.5) Where can I get support?
166169

@@ -177,14 +180,14 @@
177180
EFNet.
178181

179182
A list of commercial support companies is available at
180-
http://techdocs.postg resql.org/companies.php.
183+
http://techdocs.postgresql.org/companies.php.
181184

182185
1.6) How do I submit a bug report?
183186

184187
Visit the PostgreSQL bug form at
185188
http://www.postgresql.org/support/submitbug.
186189

187-
Also check out our ftp site ftp://ftp.PostgreSQL.org/pub to see if
190+
Also check out our ftp site ftp://ftp.PostgreSQL.org/pub/ to see if
188191
there is a more recent PostgreSQL version.
189192

190193
1.7) What is the latest release?
@@ -318,15 +321,15 @@
318321
For Web integration, PHP (http://www.php.net) is an excellent
319322
interface.
320323

321-
For complex cases, many use the Perland CGI.pm or mod_perl.
324+
For complex cases, many use the PerlDBD::Pg with CGI.pm or mod_perl.
322325

323326
2.3) Does PostgreSQL have a graphical user interface?
324327

325328
Yes, there are several graphical interfaces to PostgreSQL available.
326329
These include pgAdmin III (http://www.pgadmin.org, PgAccess
327-
http://www.pgaccess.org), RHDB Admin (http://sources.redhat.com/rhd b/
328-
), TORA (http://www.globecom.net/tora/, partly commercial), and Rekall
329-
( http://www.rekallrevealed.org/). There is also PhpPgAdmin (
330+
http://www.pgaccess.org), RHDB Admin (http://sources.redhat.com/rhdb/
331+
), TORA (http://www.globecom.net/tora/, partly commercial), and
332+
Rekall( http://www.rekallrevealed.org/). There is also PhpPgAdmin (
330333
http://phppgadmin.sourceforge.net/ ), a web-based interface to
331334
PostgreSQL.
332335

@@ -634,10 +637,22 @@
634637
expresssion index, it will be used:
635638
CREATE INDEX tabindex ON tab (lower(col));
636639

637-
4.9) In a query, how do I detect if a field is NULL?
640+
4.9) In a query, how do I detect if a field is NULL? How can I sort on
641+
whether a field is NULL or not?
638642

639643
You test the column with IS NULL and IS NOT NULL.
640-
644+
SELECT *
645+
FROM tab
646+
WHERE col IS NULL;
647+
648+
To sort by the NULLIS NULL
649+
and IS NOT NULL modifiers in your WHERE clause. Things that are true
650+
will sort higher than things that are false, so the following will put
651+
NULL entries at the top of the resulting list:
652+
SELECT *
653+
FROM tab
654+
ORDER BY (col IS NOT NULL)
655+
641656
4.10) What is the difference between the various character types?
642657

643658
Type Internal Name Notes

‎doc/src/FAQ/FAQ.html

Lines changed: 32 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
alink="#0000ff">
1111
<H1>Frequently Asked Questions (FAQ) for PostgreSQL</H1>
1212

13-
<P>Last updated:Mon Feb14 23:35:09 EST 2005</P>
13+
<P>Last updated:Thu Feb24 19:32:04 EST 2005</P>
1414

1515
<P>Current maintainer: Bruce Momjian (<Ahref=
1616
"mailto:pgman@candle.pha.pa.us">pgman@candle.pha.pa.us</A>)
@@ -85,7 +85,8 @@ <H2 align="center">Operational Questions</H2>
8585
searches and case-insensitive regular expression searches? How do I
8686
use an index for case-insensitive searches?<BR>
8787
<Ahref="#4.9">4.9</A>) In a query, how do I detect if a field
88-
is<SMALL>NULL</SMALL>?<BR>
88+
is<SMALL>NULL</SMALL>? How can I sort on whether a field is<SMALL>
89+
NULL</SMALL> or not?<BR>
8990
<Ahref="#4.10">4.10</A>) What is the difference between the
9091
various character types?<BR>
9192
<Ahref="#4.11.1">4.11.1</A>) How do I create a
@@ -162,7 +163,7 @@ <H4><A name="1.2">1.2</A>) What is the copyright of
162163
<P>PostgreSQL Data Base Management System</P>
163164

164165
<P>Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
165-
Portions Copyright (c) 1994-6 Regents of the University of California</P>
166+
Portions Copyright (c) 1994-1996 Regents of the University of California</P>
166167

167168
<P>Permission to use, copy, modify, and distribute this software
168169
and its documentation for any purpose, without fee, and without a
@@ -206,7 +207,7 @@ <H4><A name="1.3">1.3</A>) What platforms does PostgreSQL support?</H4>
206207
<H4><Aname="1.4">1.4</A>) Where can I get PostgreSQL?</H4>
207208

208209
<P>The primary anonymous ftp site for PostgreSQL is<Ahref=
209-
"ftp://ftp.PostgreSQL.org/pub">ftp://ftp.PostgreSQL.org/pub</A>.
210+
"ftp://ftp.PostgreSQL.org/pub/">ftp://ftp.PostgreSQL.org/pub/</A>.
210211
For mirror sites, see our main web site.</P>
211212

212213
<H4><Aname="1.5">1.5</A>) Where can I get support?</H4>
@@ -225,8 +226,8 @@ <H4><A name="1.5">1.5</A>) Where can I get support?</H4>
225226
(<I>#postgresqlfr</I>). There is also a PostgreSQL channel on EFNet.
226227

227228
<P>A list of commercial support companies is available at<Ahref=
228-
"http://techdocs.postgresql.org/companies.php">http://techdocs.postg
229-
resql.org/companies.php</A>.</P>
229+
"http://techdocs.postgresql.org/companies.php">
230+
http://techdocs.postgresql.org/companies.php</A>.</P>
230231

231232
<H4><Aname="1.6">1.6</A>) How do I submit a bug report?</H4>
232233

@@ -235,7 +236,7 @@ <H4><A name="1.6">1.6</A>) How do I submit a bug report?</H4>
235236
http://www.postgresql.org/support/submitbug</A>.</P>
236237

237238
<P>Also check out our ftp site<Ahref=
238-
"ftp://ftp.PostgreSQL.org/pub">ftp://ftp.PostgreSQL.org/pub</A> to
239+
"ftp://ftp.PostgreSQL.org/pub/">ftp://ftp.PostgreSQL.org/pub/</A> to
239240
see if there is a more recent PostgreSQL version.</P>
240241

241242
<H4><Aname="1.7">1.7</A>) What is the latest release?</H4>
@@ -411,7 +412,8 @@ <H4><A name="2.2">2.2</A>) What tools are available for using
411412
href="http://www.php.net">http://www.php.net</A>) is an excellent
412413
interface.</P>
413414

414-
<P>For complex cases, many use the Perl and CGI.pm or mod_perl.</P>
415+
<P>For complex cases, many use the Perl DBD::Pg with CGI.pm or
416+
mod_perl.</P>
415417

416418
<H4><Aname="2.3">2.3</A>) Does PostgreSQL have a graphical user
417419
interface?</H4>
@@ -421,10 +423,9 @@ <H4><A name="2.3">2.3</A>) Does PostgreSQL have a graphical user
421423
href="http://www.pgadmin.org">http://www.pgadmin.org</a>, PgAccess
422424
<ahref="http://www.pgaccess.org"> http://www.pgaccess.org</a>),
423425
RHDB Admin (<a
424-
href="http://sources.redhat.com/rhdb/">http://sources.redhat.com/rhd
425-
b/</a>), TORA (<a
426-
href="http://www.globecom.net/tora/">http://www.globecom.net/tora/</a>,
427-
partly commercial), and Rekall (<a
426+
href="http://sources.redhat.com/rhdb/">http://sources.redhat.com/rhdb/
427+
</a>), TORA (<ahref="http://www.globecom.net/tora/">
428+
http://www.globecom.net/tora/</a>, partly commercial), and Rekall (<a
428429
href="http://www.rekallrevealed.org/">
429430
http://www.rekallrevealed.org/</a>). There is also PhpPgAdmin (<a
430431
href="http://phppgadmin.sourceforge.net/">
@@ -815,11 +816,29 @@ <H4><A name="4.8">4.8</A>) How do I perform regular expression
815816
</PRE>
816817

817818
<H4><Aname="4.9">4.9</A>) In a query, how do I detect if a field
818-
is<SMALL>NULL</SMALL>?</H4>
819+
is<SMALL>NULL</SMALL>? How can I sort on whether a field is<SMALL>
820+
NULL</SMALL> or not?</H4>
819821

820822
<P>You test the column with<SMALL>IS NULL</SMALL> and<SMALL>IS
821823
NOT NULL</SMALL>.</P>
822824

825+
<PRE>
826+
SELECT *
827+
FROM tab
828+
WHERE col IS NULL;
829+
</PRE>
830+
831+
<P>To sort by the<SMALL>NULL</SMALL status, use the<SMALL>IS NULL</SMALL>
832+
and<SMALL>IS NOT NULL</SMALL> modifiers in your<SMALL>WHERE</SMALL> clause.
833+
Things that are<I>true</I> will sort higher than things that are<I>false</I>,
834+
so the following will put NULL entries at the top of the resulting list:</P>
835+
836+
<PRE>
837+
SELECT *
838+
FROM tab
839+
ORDER BY (col IS NOT NULL)
840+
</PRE>
841+
823842
<H4><Aname="4.10">4.10</A>) What is the difference between the
824843
various character types?</H4>
825844
<BLOCKQUOTE>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp