Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit e38c920

Browse files
committed
Add new FAQ information.
Martijn van Oosterhout
1 parent cbd015d commit e38c920

File tree

2 files changed

+64
-7
lines changed

2 files changed

+64
-7
lines changed

doc/FAQ

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Frequently Asked Questions (FAQ) for PostgreSQL
33

4-
Last updated: Fri Jul 29 10:05:09 EDT 2005
4+
Last updated: Wed Aug 10 15:29:42 EDT 2005
55

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

@@ -79,6 +79,7 @@
7979
4.19) Why do I get "relation with OID ##### does not exist" errors
8080
when accessing temporary tables in PL/PgSQL functions?
8181
4.20) What replication solutions are available?
82+
4.21) Why are my table and column names not recognized in my query?
8283
_________________________________________________________________
8384

8485
General Questions
@@ -471,6 +472,12 @@
471472
The maximum table size and maximum number of columns can be quadrupled
472473
by increasing the default block size to 32k.
473474

475+
One limitation is that indexes can not be created on columns longer
476+
than about 2,000 characters. Fortunately, such indexes are rarely
477+
needed. Uniqueness is best guaranteed using another column that is an
478+
MD5 hash of the long column, and full text indexing allows for
479+
searching of words within the column.
480+
474481
4.5) How much database disk space is required to store data from a typical
475482
text file?
476483

@@ -578,6 +585,11 @@
578585
expresssion index, it will be used:
579586
CREATE INDEX tabindex ON tab (lower(col));
580587

588+
If the above index is created as UNIQUE, though the column can store
589+
upper and lowercase characters, it can not have identical values that
590+
differ only in case. To force a particular case to be stored in the
591+
column, use a CHECK constraint or a trigger.
592+
581593
4.9) In a query, how do I detect if a field is NULL? How can I sort on
582594
whether a field is NULL or not?
583595

@@ -776,3 +788,16 @@
776788

777789
There are also commercial and hardware-based replication solutions
778790
available supporting a variety of replication models.
791+
792+
4.20) Why are my table and column names not recognized in my query?
793+
794+
The most common cause is the use of double-quotes around table or
795+
column names during table creation. When double-quotes are used, table
796+
and column names (called identifiers) are stored case-sensitive,
797+
meaning you must use double-quotes when referencing the names in a
798+
query. Some interfaces, like pgAdmin, automatically double-quote
799+
identifiers during table creation. So, for identifiers to be
800+
recognized, you must either:
801+
* Avoid double-quoting identifiers when creating tables
802+
* Use only lowercase characters in identifiers
803+
* Double-quote identifiers when referencing them in queries

doc/src/FAQ/FAQ.html

Lines changed: 38 additions & 6 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 May 30 09:11:03 EDT 2005</P>
13+
<P>Last updated: Wed Aug 10 15:29:42 EDT 2005</P>
1414

1515
<P>Current maintainer: Bruce Momjian (<A href=
1616
"mailto:pgman@candle.pha.pa.us">pgman@candle.pha.pa.us</A>)
@@ -26,7 +26,7 @@ <H1>Frequently Asked Questions (FAQ) for PostgreSQL</H1>
2626
<HR>
2727

2828
<H2 align="center">General Questions</H2>
29-
<A href="#1.1">1.1</A>) What is PostgreSQL? How is it pronounced?<BR>
29+
<A href="#1.1">1.1</A>) What is PostgreSQL? How is it pronounced?<BR>
3030
<A href="#1.2">1.2</A>) What is the copyright of PostgreSQL?<BR>
3131
<A href="#1.3">1.3</A>) What platforms does PostgreSQL support?<BR>
3232
<A href="#1.4">1.4</A>) Where can I get PostgreSQL?<BR>
@@ -116,16 +116,20 @@ <H2 align="center">Operational Questions</H2>
116116
does not exist" errors when accessing temporary tables in PL/PgSQL
117117
functions?<BR>
118118
<A href="#4.20">4.20</A>) What replication solutions are available?<BR>
119-
119+
<A href="#4.21">4.21</A>) Why are my table and column names not
120+
recognized in my query?<BR>
121+
120122

121123
<HR>
122124

123125
<H2 align="center">General Questions</H2>
124126

125127
<H3><A name="1.1">1.1</A>) What is PostgreSQL? How is it pronounced?</H3>
126128

127-
<P>PostgreSQL is pronounced <I>Post-Gres-Q-L</I>, also called just
128-
<I>Postgres</I>.</P>
129+
<P>PostgreSQL is pronounced <I>Post-Gres-Q-L</I>, and is also sometimes
130+
referred to as just <I>Postgres</I>. An audio file is available in
131+
<a href="http://www.postgresql.org/files/postgresql.mp3">MP3 format</a> for
132+
those would like to hear the pronunciation.</P>
129133

130134
<P>PostgreSQL is an object-relational database system that has the
131135
features of traditional commercial database systems with
@@ -613,6 +617,12 @@ <H3><A name="4.4">4.4</A>) What is the maximum size for a row, a
613617
<P>The maximum table size and maximum number of columns can be
614618
quadrupled by increasing the default block size to 32k.</P>
615619

620+
<P>One limitation is that indexes can not be created on columns
621+
longer than about 2,000 characters. Fortunately, such indexes are
622+
rarely needed. Uniqueness is best guaranteed using another column
623+
that is an MD5 hash of the long column, and full text indexing
624+
allows for searching of words within the column.</P>
625+
616626
<H3><A name="4.5">4.5</A>) How much database disk space is required
617627
to store data from a typical text file?</H3>
618628

@@ -740,7 +750,12 @@ <H3><A name="4.8">4.8</A>) How do I perform regular expression
740750
<PRE>
741751
CREATE INDEX tabindex ON tab (lower(col));
742752
</PRE>
743-
753+
<P>If the above index is created as <SMALL>UNIQUE</SMALL>, though
754+
the column can store upper and lowercase characters, it can not have
755+
identical values that differ only in case. To force a particular
756+
case to be stored in the column, use a <SMALL>CHECK</SMALL>
757+
constraint or a trigger.</P>
758+
744759
<H3><A name="4.9">4.9</A>) In a query, how do I detect if a field
745760
is <SMALL>NULL</SMALL>? How can I sort on whether a field is <SMALL>
746761
NULL</SMALL> or not?</H3>
@@ -1000,5 +1015,22 @@ <H3><A name="4.20">4.20</A>) What replication solutions are available?
10001015

10011016
<P>There are also commercial and hardware-based replication solutions
10021017
available supporting a variety of replication models.</P>
1018+
1019+
<H3><A name="4.20">4.20</A>) Why are my table and column names not
1020+
recognized in my query?</H3>
1021+
1022+
<P>The most common cause is the use of double-quotes around table or
1023+
column names during table creation. When double-quotes are used,
1024+
table and column names (called identifiers) are stored <a
1025+
href="http://www.postgresql.org/docs/8.0/static/sql-syntax.html#SQL-
1026+
SYNTAX-IDENTIFIERS">case-sensitive</a>, meaning you must use
1027+
double-quotes when referencing the names in a query. Some interfaces,
1028+
like pgAdmin, automatically double-quote identifiers during table
1029+
creation. So, for identifiers to be recognized, you must either:
1030+
<UL>
1031+
<LI>Avoid double-quoting identifiers when creating tables</LI>
1032+
<LI>Use only lowercase characters in identifiers</LI>
1033+
<LI>Double-quote identifiers when referencing them in queries</LI>
1034+
</UL>
10031035
</BODY>
10041036
</HTML>

0 commit comments

Comments
 (0)