提交 5d283d89 编写于 作者: B Bruce Momjian

Update russian FAQ, from Viktor Vislobokov.

上级 8fee9615
此差异已折叠。
......@@ -2,11 +2,10 @@
<HTML>
<!-- DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN" -->
<!-- HTML -->
<HEAD>
<META name="generator" content="HTML Tidy, see www.w3.org">
<META http-equiv="Content-Type" content="text/html; charset=koi8-r">
<TITLE>PostgreSQL FAQ</TITLE>
</HEAD>
......@@ -14,7 +13,7 @@
alink="#0000ff">
<H1> PostgreSQL</H1>
<P> : 9 23:14:53 EDT 2002</P>
<P> : 20 20:47:14 EDT 2002</P>
<P> : (Bruce Momjian) (<A href=
"mailto:pgman@candle.pha.pa.us">pgman@candle.pha.pa.us</A>)<BR>
......@@ -32,8 +31,7 @@
<HR>
<H2 align="center"> </H2>
<A href="#1.1">1.1</A>) PostgreSQL?
?<BR>
<A href="#1.1">1.1</A>) PostgreSQL? ?<BR>
<A href="#1.2">1.2</A>) PostgreSQL?<BR>
<A href="#1.3">1.3</A>) Unix PostgreSQL?<BR>
<A href="#1.4">1.4</A>) Unix ?<BR>
......@@ -80,8 +78,7 @@
<A href="#3.7">3.7</A>) ?<BR>
<A href="#3.8">3.8</A>) <I>"Sorry, too many
clients"</I> ?<BR>
<A href="#3.9">3.9</A>) <I>pg_sorttempNNN.NN</I>
?<BR>
<A href="#3.9">3.9</A>) <I>pgsql_tmp</I>?<BR>
<A href="#3.10">3.10</A>) dump restore
PostgreSQL?<BR>
......@@ -143,6 +140,7 @@
<A href="#4.26">4.26</A>) /
PL/PgSQL?<BR>
<A href="#4.27">4.27</A>) ?<BR>
<A href="#4.28">4.28</A>) ?<BR>
<H2 align="center"> PostgreSQL</H2>
<A href="#5.1">5.1</A>) .
......@@ -158,7 +156,7 @@
<H2 align="center"> </H2>
<H4><A name="1.1">1.1</A>) PostgreSQL?</H4>
<H4><A name="1.1">1.1</A>) PostgreSQL? ?</H4>
<P>PostgreSQL <I>Post-Gres-Q-L (---)</I>.</P>
......@@ -169,13 +167,12 @@
<SMALL>SQL</SMALL>. PostgreSQL -
.</P>
<P> PostgreSQL ,
Internet,
. ,
(Marc G. Fournier) (<A href=
<P> PostgreSQL ,
. ,
(Marc G. Fournier) (<A href=
"mailto:scrappy@PostgreSQL.org">scrappy@PostgreSQL.org</A>). (.
, ).
PostgreSQL.</P>
<A href="#1.6">1.6</A> , ).
PostgreSQL.</P>
<P> PostgreSQL 1.01 (Andrew Yu)
(Jolly Chen).
......@@ -240,10 +237,10 @@
<P><STRONG></STRONG></P>
<P> MS Windows C
<I>libpq</I>, psql .
<I>libpq</I>, psql, .
, MS Windows
TCP/IP , Unix
. <I>win31.mak</I> ,
. <I>win32.mak</I> ,
<I>libpq</I>
<I>psql</I> Win32. PostgreSQL
<SMALL>ODBC</SMALL>.</P>
......@@ -252,10 +249,12 @@
<P> Windows NT Win2k,
Cygwin, Unix
NT. <I>pgsql/doc/FAQ_MSWIN</I> <A href=
"http://www.postgresql.org/docs/faq-mswin.html">MS Windows FAQ</A>
. PostgreSQL
- Microsoft.</P>
NT. <I>pgsql/doc/FAQ_MSWIN</I>
MS Windows FAQ <A href="http://www.postgresql.org/docs/faq-mswin.html">
http://www.PostgreSQL.org/docs/faq-mswin.html</A>.</P>
<P>PostgreSQL, MS Win NT/2000/XP
.</P>
<H4><A name="1.5">1.5</A>) PostgreSQL?</H4>
......@@ -321,7 +320,7 @@
<P>
<A href=
"http://www.postgresql.org/users-lounge/commercial-support.html">http://www.postgresql.org/users-lounge/commercial-support.html</A>.</P>
"http://www.postgresql.org/users-lounge/commercial-support.html">http://www.PostgreSQL.org/users-lounge/commercial-support.html</A>.</P>
<H4><A name="1.7">1.7</A>) ?</H4>
......@@ -341,8 +340,8 @@
"http://www.PostgreSQL.org/docs/awbook.html">http://www.PostgreSQL.org/docs/awbook.html</A>
<a href="http://www.commandprompt.com/ppbook/">http://www.commandprompt.com/ppbook/</a>.
PostgreSQL,
<a href="http://www.postgresql.org/books/">http://www.postgresql.org/books/</a>.
, <a href="http://techdocs.postgresql.org">http://techdocs.postgresql.org/</a>
<a href="http://www.ca.postgresql.org/books/">http://www.ca.PostgreSQL.org/books/</a>.
, <a href="http://techdocs.postgresql.org">http://techdocs.PostgreSQL.org/</a>
PostgreSQL.</p>
......@@ -405,8 +404,8 @@
<H4><A name="1.13">1.13</A>) ??</H4>
<P> <A href=
"http://www.postgresql.org/bugs/bugs.php">PostgreSQL BugTool</A>,
<P> PostgreSQL BugTool <A href=
"http://www.postgresql.org/bugs/bugs.php">http://www.PostgreSQL.org/bugs/bugs.php</A>,
.</P>
......@@ -445,9 +444,8 @@
,
.
, PostgreSQL MySQL
<A href="http://openacs.org/why-not-mysql.html">
http://openacs.org/why-not-mysql.html</A><BR>
<A href="http://openacs.org/philosophy/why-not-mysql.html">
http://openacs.org/philosophy/why-not-mysql.html</A><BR>
<BR>
</DD>
......@@ -467,15 +465,15 @@
<DT><B></B></DT>
<DD>
,
. , - ,
<SMALL></SMALL>
. , ,
PostgreSQL
<SMALL></SMALL>.
,
. ( <A href="#1.6"> ?</A>.)<BR>
<DD>
,
. , -
, <SMALL></SMALL>
. ,
,
PostgreSQL <SMALL></SMALL>.
,
. ( <A href="#1.6"> 1.6</A>.)<BR>
<BR>
</DD>
......@@ -493,7 +491,7 @@
PostgreSQL?</H4>
<P>PostgreSQL
6 .
1996 .
(Marc Fournier),
.</P>
......@@ -505,8 +503,8 @@
,
. ,
,
<A href="https://store.pgsql.com/shopping/index.php?id=1">
https://store.pgsql.com/shopping/index.php?id=1</A>
<A href="https://store.pgsql.com/shopping/">
https://store.pgsql.com/shopping/</A>
.</P>
<P> PostgreSQL, Inc,
......@@ -549,29 +547,23 @@
<P> Web :
<A href="http://www.webreview.com">http://www.webreview.com</A></P>
<P> <A href=
"http://www.phone.net/home/mwm/hotlist/">http://www.phone.net/home/mwm/hotlist/.</A></P>
<P> Web, PHP.
<A
href="http://www.php.net">http://www.php.net</A>.</P>
<A href="http://www.php.net">http://www.php.net</A>.</P>
<P> , Perl CGI.pm.</P>
<P> , Perl CGI.pm mod_perl.</P>
<H4><A name="2.3">2.3</A>) PostgreSQL
? ?
?</H4>
<P> ,
<I>pgaccess</I>, . <I>pgaccess</I>
. <A href=
"http://www.flex.ro/pgaccess">http://www.flex.ro/pgaccess</A></P>
PgAccess, .
<A href="http://www.pgaccess.org">http://www.pgaccess.org/</A></P>
<P> <I>ecpg</I>,
SQL C.</P>
<H4><A name="2.4">2.4</A>)
PostgreSQL?</H4>
<H4><A name="2.4">2.4</A>) PostgreSQL?</H4>
<P> :</P>
......@@ -584,7 +576,7 @@
<LI>Java (jdbc)</LI>
<LI>Perl (perl5)</LI>
<LI>Perl (DBD::Pg perl5)</LI>
<LI>ODBC (odbc)</LI>
......@@ -594,11 +586,12 @@
<LI>C Easy API (libpgeasy)</LI>
<LI>Embedded <SMALL>HTML</SMALL> (<A href=
"http://www.php.net">PHP from http://www.php.net</A>)</LI>
<LI>PHP ('pg_' functions, Pear::DB)</LI>
</UL>
<P> <A href="http://www.postgresql.org/interfaces.html">
http://www.postgresql.org/interfaces.html.</A>
<P>
<A href="http://www.postgresql.org/interfaces.html">http://www.PostgreSQL.org/interfaces.html.</A>
<A href="http://gborg.postgresql.org/">http://gborg.PostgreSQL.org</a>.
</P>
<HR>
......@@ -671,7 +664,7 @@
<P> <SMALL>INSERT</SMALL>,
,
<SMALL>COPY</SMALL>. ,
<SMALL>INSERT.</SMALL> -,
<SMALL>INSERT</SMALL>. -,
<SMALL>BEGIN WORK/COMMIT</SMALL> .
.
. ,
......@@ -740,7 +733,7 @@
<P> <I>postmaster</I> , <I>psql</I>
, <SMALL>PID</SMALL> <I>postgres</I>,
<I>psql</I>.
<I>postgres</I> <SMALL>PID.</SMALL>
<I>postgres</I> <SMALL>PID</SMALL>.
<I>psql</I>.
<I>postgres</I>,
PGOPTIONS="-W n", <I>psql</I>.
......@@ -781,7 +774,7 @@
, <SMALL>SEMMNS</SMALL> <SMALL>SEMMNI;</SMALL>
, <SMALL>NPROC;</SMALL>
, <SMALL>MAXUPRC;</SMALL>
, <SMALL>NFILE</SMALL> <SMALL>NINODE.</SMALL>
, <SMALL>NFILE</SMALL> <SMALL>NINODE</SMALL>.
backend
, .</P>
......@@ -789,38 +782,35 @@
64,
MaxBackendId <I>include/storage/sinvaladt.h</I>.</P>
<H4><A name="3.9">3.9</A>) <I>pg_sorttempNNN.NN</I>
?</H4>
<P> , .
, <SMALL>ORDER BY</SMALL>
,
backend <I>-S</I>,
.</P>
<H4><A name="3.9">3.9</A>) <I>pgsql_tmp</I>?</H4>
<P> ,
, backend .
backend ,
pg_tempNNN.NN.</P>
<P> ,
. , <small>ORDER BY</small>
, <i>-S</i>
backend',
.</P>
<P> ,
, backend .
.</P>
<A name="3.10">3.10</A>) dump restore
PostgreSQL?<BR>
<H4><A name="3.10">3.10</A>) dump restore
PostgreSQL?</H4>
<P> PostgreSQL
. 7.2 7.2.1
dump restore.
.
,
. dump
,
.</P>
dump restore.
(.. , 7.2 7.3)
.
,
. dump
,
.</P>
<P>
, ,
<P> , ,
<i>pg_upgrade</i>
dump/restore.
<i>pg_upgrade</i> .
</P>
<i>pg_upgrade</i> .</P>
<HR>
<H2 align="center"> </H2>
......@@ -857,7 +847,8 @@
<H4><A name="4.4">4.4</A>) ?</H4>
<P> <SMALL>ALTER TABLE DROP COLUMN,</SMALL>
<P> 7.3
<small>ALTER TABLE DROP COLUMN</small>. ,
:</P>
<PRE>
BEGIN;
......@@ -981,21 +972,21 @@
SELECT col
FROM tab
ORDER BY col [ DESC ]
LIMIT 1
LIMIT 1;
</pre>
<P> , <SMALL>LIKE</SMALL>
<I>~</I>, :
</P><UL>
<LI> , ..:</LI>
<I>~</I>, :</P>
<UL>
<LI><small>LIKE</small> <i>%.</i><LI>
<LI><i>~</i> <i>^.</i><LI>
</UL>
<LI> , ..:
<UL>
<LI><small>LIKE</small> <i>%.</i>.</LI>
<LI><i>~</i> <i>^</i>.</LI>
</UL></LI>
<LI> , .. [a-e].</LI>
<LI>
<small>ILIKE</small> <i>~</i>.
, FAQ .</LI>
<LI> , <small>ILIKE</small>
<i>~*</i> . ,
, <A href="#4.12">4.12</A>.</LI>
<LI> <i>initdb</i>
<i>C</i>.
</UL>
......@@ -1053,13 +1044,13 @@
<PRE>
SELECT *
FROM tab
WHERE lower(col) = 'abc'
WHERE lower(col) = 'abc';
</PRE>
. ,
, :
<PRE>
CREATE INDEX tabindex on tab (lower(col));
CREATE INDEX tabindex ON tab (lower(col));
</PRE>
<H4><A name="4.13">4.13</A>) ,
......@@ -1074,8 +1065,8 @@
--------------------------------------------------
"char" char 1
CHAR(#) bpchar
VARCHAR(#) varchar ,
CHAR(n) bpchar
VARCHAR(n) varchar ,
TEXT text
BYTEA bytea ( null- )
</PRE>
......@@ -1091,13 +1082,14 @@ BYTEA bytea
,
.</P>
<P><SMALL>CHAR()</SMALL> - ,
. <SMALL>VARCHAR()</SMALL> -
<P><SMALL>CHAR(n)</SMALL> - ,
. <SMALL>VARCHAR(n)</SMALL> -
, ,
. <SMALL>TEXT</SMALL> -
, 1 .
<SMALL>BYTEA</SMALL> ,
<SMALL>NULL</SMALL> .</P>
<SMALL>NULL</SMALL> .
.</P>
<H4><A name="4.15.1">4.15.1</A>)
serial/--?</H4>
......@@ -1136,11 +1128,11 @@ BYTEA bytea
<P>
<SMALL>SERIAL</SMALL> sequence
<I>nextval()</I> <I></I>
. - <A href="#4.15.1">4.15.1</A>,
Perl:</P>
. - <A href="#4.15.1">4.15.1</A>,
:</P>
<PRE>
new_id = output of "SELECT nextval('person_id_seq')"
INSERT INTO person (id, name) VALUES (new_id, 'Blaise Pascal');
new_id = execute("SELECT nextval('person_id_seq')");
execute("INSERT INTO person (id, name) VALUES (new_id, 'Blaise Pascal')");
</PRE>
......@@ -1152,11 +1144,11 @@ BYTEA bytea
<SMALL>SERIAL</SMALL>.
<P> ,
<SMALL>SERIAL</SMALL> <I>currval</I>()
<SMALL>SERIAL</SMALL> <I>currval()</I>
<I></I> , </P>
<PRE>
INSERT INTO person (name) VALUES ('Blaise Pascal');
new_id = output of "SELECT currval('person_id_seq')";
execute("INSERT INTO person (name) VALUES ('Blaise Pascal')");
new_id = execute("SELECT currval('person_id_seq')");
</PRE>
,
......@@ -1171,7 +1163,7 @@ BYTEA bytea
<I>currval()</I> <I>nextval()</I>
?</H4>
<P>. Currval() ,
<P>. <i>currval()</i> ,
backend', .</P>
<H4><A name="4.15.4">4.15.4</A>)
......@@ -1191,7 +1183,7 @@ BYTEA bytea
PostgreSQL. , PostgreSQL
<SMALL>OID</SMALL>. <SMALL>OID</SMALL>
<I>initdb</I> 16384 (
<I>backend/access/transam.h</I>).
<I>include/access/transam.h</I>).
<SMALL>OID</SMALL> . ,
<SMALL>OID</SMALL> -
, PostgreSQL.</P>
......@@ -1215,13 +1207,12 @@ BYTEA bytea
COPY new TO '/tmp/pgtable';
DELETE FROM new;
COPY new WITH OIDS FROM '/tmp/pgtable';
</PRE>
<!--
CREATE TABLE new_table (mycol int);
INSERT INTO new_table (oid, mycol) SELECT oid, mycol FROM old_table;
-->
</PRE>
<P><SMALL>OID</SMALL> 4-
<P>O<SMALL>ID</SMALL> 4-
4 . , ,
,
.</P>
......@@ -1258,8 +1249,7 @@ BYTEA bytea
<LI>range variable, table name, table alias</LI>
</UL>
<P> <A href=
"http://www.comptechnews.com/~reaster/dbdesign.html">http://www.comptechnews.com/~reaster/dbdesign.html</A></P>
<P> <A href="http://hea-www.harvard.edu/MST/simul/software/docs/pkgs/pgsql/glossary/glossary.html">http://hea-www.harvard.edu/MST/simul/software/docs/pkgs/pgsql/glossary/glossary.html</A></P>
<H4><A name="4.18">4.18</A>) <I>"ERROR: Memory
exhausted in AllocSetAlloc()"</I>?</H4>
......@@ -1284,7 +1274,7 @@ BYTEA bytea
<H4><A name="4.19">4.19</A>) , PostgreSQL
?</H4>
<P> <I>psql</I>, <CODE>select version();</CODE></P>
<P> <I>psql</I>, <CODE>SELECT version();</CODE></P>
<H4><A name="4.20">4.20</A>)
<I>"invalid large obj descriptor"</I>?</H4>
......@@ -1324,18 +1314,16 @@ BYTEA bytea
, <CODE>IN</CODE>
<CODE>EXISTS</CODE>:</P>
<PRE>
<CODE>SELECT *
SELECT *
FROM tab
WHERE col IN (SELECT subcol FROM subtab)
</CODE>
WHERE col IN (SELECT subcol FROM subtab);
</PRE>
:
<PRE>
<CODE>SELECT *
SELECT *
FROM tab
WHERE EXISTS (SELECT subcol FROM subtab WHERE subcol = col)
</CODE>
WHERE EXISTS (SELECT subcol FROM subtab WHERE subcol = col);
</PRE>
, <CODE>subcol</CODE>
......@@ -1390,7 +1378,7 @@ BYTEA bytea
PostgreSQL
, , .</P>
<P><I>/contrib/dblink</I> ,
<P><I>contrib/dblink</I> ,
. ,
.</P>
......@@ -1399,8 +1387,8 @@ BYTEA bytea
<P> PL/pgSQL ,
<i>refcursors</i>. <A
href="http://developer.postgresql.org/docs/postgres/plpgsql-cursors.html">
http://developer.postgresql.org/docs/postgres/plpgsql-cursors.html,</a>
href="http://www.postgresql.org/idocs/index.php?plpgsql-cursors.html">
http://www.PostgreSQL.org/idocs/index.php?plpgsql-cursors.html</a>,
23.7.3.3.</P>
<H4><A name="4.26">4.26</A>) /
......@@ -1416,10 +1404,26 @@ BYTEA bytea
<H4><A name="4.27">4.27</A>) ?</H4>
<P> master/slave.
,
slave .</P>
<P> master/slave.
master ,
slave .
: <A href="http://gborg.postgresql.org/genpage?replication_research">
http://gborg.PostgreSQL.org/genpage?replication_research</A>.
master :
<a href="http://gborg.postgresql.org/project/pgreplication/projdisplay.php">http://gborg.PostgreSQL.org/project/pgreplication/projdisplay.php</A>.</P>
<h4><a name="4.28">4.28</a>) ?
</h4>
<ul>
<li><i>contrib/pgcrypto</i>
<small>SQL</small> .</li>
<li> ,
, <i>hostssl</i> <i>pg_hba.conf</i>.</li>
<li> ,
7.3. ,
<i>PASSWORD_ENCRYPTION</i> <i>postgresql.conf</i>.</li>
<li> , .</li>
</ul>
<HR>
<H2 align="center"> PostgreSQL</H2>
......@@ -1439,8 +1443,10 @@ BYTEA bytea
<H4><A name="5.3">5.3</A>) C ,
?</H4>
<P>
, .</P>
<P> PostgreSQL, 7.3, ,
C, PL/PgSQL SQL.
. ,
C, <i>contrib/tablefunc</i>.</P>
<H4><A name="5.4">5.4</A>) .
?</H4>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册