
    Linux  Database-SQL-RDBMS HOWTO ļ (PostgreSQL Ͽϵͳ)
                                       
ߡAl Dev (Alavoor Vasudevan) [1]alavoor@yahoo.com
ߡ￵ [2]a9504480@graduate.hku.hk

   ¶գ23.0
     _________________________________________________________________
   
   ļһݽ Unix ϵͳݵؽһ SQL Ͽ
   (Database Engine) ǰ˹ߵġʵָϡҲ۹ʱ׼
   ANSI/ISO SQL Լ̽ڻСʽ ("open
   development" environment)  SQL Ͽŵ㡣ǹ
   Unix ϵͳн PostgreSQL ȿӦóʽϿŷ
   (Application Database Server)άϿŷ (Web
   Database Server) һʽϿ⡣PostgreSQL ʵĹ
    ISO / ANSI SQL ׼ļҲṩϿĽʽǰͼ
   桢Ӧóʽٿ (Rapid Application Development) ߡODBCJDBC
   ʽCC++JavaPerl ʽԽϿ⹤ߡṩ
    Unix / Windows NT ƽ̨Ͽ⣬Ͽ⡢SQL Լ
   PostgreSQL ַǳáļҲһ SQL ĵ SQL ﷨
   Գѧ߷ǳáоüһһõĲοϡѧ˵
   ⴦ṩϻǵõ PostgresSQL ʽϿԴʽ룬Ӷѧ
   ϰαдһʽ SQL Ͽ⡣
     _________________________________________________________________
   
1. 

2. Ҳ춵

3. PostgreSQL ʲ᣿

     * 3.1 Ƥ
       
4. ĸϺãPostgreSQL  MySQL

5. δȡ ?

6. PostgreSQL ٰװָ

     * 6.1 װͲ
     * 6.2 PostgreSQL RPMs
     * 6.3 Maximum RPM
     * 6.4 RPM  
     * 6.5  PyGreSQLPython  
     * 6.6  PerlPerl  
     * 6.7  libpq, libpq++  
     * 6.8  Java  
     * 6.9  ecpg  
     * 6.10  SQL ӡԶ̬ͺ 
     * 6.11  Tcl/TK 
     * 6.12  ODBC 
     * 6.13  MPSQL Motif-worksheet 
     * 6.14 ֤
     * 6.15 
       
7. PostgreSQL ֧Ԯ 200 Gig ĳϿ

8. ƾʲ PostgreSQLRegression ׼ (Regression test package) Ϊû


9. PostgreSQL ǰ GUI ߣͼʹ߽棩

10. PostgreSQL Ľʽ

     * 10.1 PostgreSQL  ODBC ʽ
     * 10.2 PostgreSQL  UDBC ʽ
     * 10.3 PostgreSQL  JDBC ʽ
     * 10.4 PostgreSQL  Java
       
11. PostgreSQL  Perl Ͽ (Database Interface, DBI) 

     * 11.1 PostgreSQL  PERL 5 
     * 11.2 Perl Ͽ DBI
     * 11.3  Perl 
       
12. PostgreSQL 

     * 12.1 PGACCESS - PostgreSQL  GUI 
     * 12.2 PostgreSQL ӴʽѯߣWISQL  MPSQL
     * 12.3 Ϊ PSQL  PostgreSQL ʽѯߣISQL
     * 12.4 MPMGRPostgreSQL Ͽ
       
13. ֻʹһʾ (monitor) ̨ PostgreSQL 

14. PostgreSQL άӦóʽŷ

     * 14.1 Enhydra
     * 14.2 Zope
       
15. PostgreSQL Ӧóʽ͹

     * 15.1 PostgreSQL  4GL άϿʽAppGEN ϵͳ
     * 15.2 PostgreSQL ĻDBENGINE
     * 15.3 PostgreSQL  Apache ŷģNeoSoft NeoWebScript
     * 15.4 HTML  HEITML ŷһ PostgreSQL  4GL 
     * 15.5 PostgreSQL  America On-line AOL άŷ
     * 15.6 PostgreSQL  / ƻ׷ϵͳʽ(Problem/Project
       Tracking System Application Tool for PostgreSQL )
     * 15.7  dbase  dbf ת PostgreSQL
     * 15.8 ΢ MDB Ͽת PostgreSQL
       
16. PostgreSQL ĻϿ/ɹߡEARP

     * 16.1 EARP ʲ᣿
     * 16.2 ʩ
     * 16.3 ι
     * 16.4 δȡ EARP
       
17. PHP Hypertext PreProcessorPostgreSQL ŷ html Ƕ 

     * 17.1 Ҫɫ
     * 17.2 PHPʷ
     * 17.3 ᣬ PHP ʲ᣿
     * 17.4 һ򵥵ӡ
     * 17.5 CGI  (CGI Redirection)
     * 17.6 ִָ PHP
       
18. PostgreSQL  Python 

     * 18.1 ȡ PyGres
     * 18.2 Ϻ֧Ԯ
     * 18.3  Python 
       
19. PostgreSQL άբ· (gateway) WDB-P95

     * 19.1 й wdb-p95
     * 19.2 PostgreSQL ŷpgperl  httpd Ƿͬһԣ
       
20. "C", "C++", ESQL/C Խ PostgreSQL λԪ (Bitwise Operators)

     * 20.1 "C" 
     * 20.2 "C++" 
     * 20.3 ESQL/C
     * 20.4 PostgreSQL λԪԪ
       
21. PostgreSQL ļ (Kanji Code)

22. ֲ PostgreSQL Ӵ 95 / Ӵ NT

     * 22.1 NT 
     * 22.2 װ Cygwin ׼
     * 22.3 趨 Bash Ӵ
     * 22.4 װ Andy Piper 
     * 22.5 װ Ludovic Lange  Cygwin32 IPC ׼
     * 22.6 װ PostgreSQL 
       
23. ̳ͨ

     * 23.1 PostgreSQL ĵʻ
     * 23.2 Ӣ̳ͨ
     * 23.3 ̳ͨ
     * 23.4 ̳ͨ
       
24. ļͲο

     * 24.1 ûָ˵
     * 24.2 ļ
     * 24.3 õĲο
     * 24.4 ANSI/ISO SQL ļSQL 1992, SQL 1998
     * 24.5 ANSI/ISO SQL 1992 ﷨
     * 24.6 ANSI/ISO SQL 1998 ﷨
     * 24.7 ѧ SQL 
     * 24.8 SQL92 ʱ̬ (Temporal Extension)
     * 24.9 㲿֡ȡ ISO/ANSI SQL ļ 
     * 24.10 һ֡ISO/ANSI SQL ǰ
     * 24.11 ڶ֡ISO/ANSI SQL  (ISO/ANSI SQL Foundation)
     * 24.12 ֡ISO/ANSI SQL м (Call Level Interface)
     * 24.13 Ĳ֡ ISO/ANSI SQL ־ôģ (Persistent Stored
       Modules)
     * 24.14 岿֡ ISO/ANSI SQL/ (Bindings)
     * 24.15 ֡ISO/ANSI SQL XA  SQL/XA
     * 24.16 ߲֡ʱ̬ ISO/ANSI SQL 
     * 24.17 ڰ˲֡ISO/ANSI SQL MULTIMEDIA (SQL/MM)
       
25. PostgreSQL ļ֧Ԯ

     * 25.1 ҵ֧Ԯ
       
26. úҵ

27. Ͽ

28. άѰʾ

29. 

30. FAQй PostgreSQL 

31. ļʽ

32. Ȩ֪ͨ

Appendix

33. ¼סANSI/ISO SQL 1992 ﷨ 

34. ¼ҡѧ SQL  

     * 34.1 PostgreSQL 
     * 34.2  URL ָ
       
35. ¼Linux ٰװָ 
     _________________________________________________________________
   
1. 

   ļҪĿṩһ趨 PostgreSQL 꾡 URL ᳫ
   Դʼϵͳ PostgreSQLLinux ĺô
   
   ϵÿһԶҪһϿȡϡʹõҪ
   桢ȡʹϣǺܿɹʡʱ䡣ͬʱϵ
   ͳ򵥡١ɿúáϿҪϵͳΪ
   ÿһ乫˾ĹؼϡϵÿһҵҪһϿ⡣û
   ϿϵͳĻѶСչ˾ȹҵЧ
   еϿϵͳӹʱ׼֯ (International Standard Organisation,
   ISO) Ĺ ANSI SQLĹҵ糣õ¹ ISO/ANSI
   SQL 1992һ׼ SQL 1998/99 SQL-3ڿСе
   Ͽ⣬ OracleSybase  Informix ǸЩ׼ʵʩЩ
   ׼
   
   û ANSI/ISO SQL ı׼ûҪһνһϿϵͳӦ
   ǳѡͻϣһιʹ ISO SQLODBCJDBC չһӦ
   еϿϵͳӦá
   
   ɶ֧Ԯ ISO SQLANSI SQL/98SQL/92  ANSI SQL/89 Ĺʽ
    (RDBMS) Уе PostgreSQLPostgreSQL һʽ
   Ͽ⣬ȫ ISO/ANSI  SQL ׼ΪĿꡣļΰװ
   Ͽ⡢νϿ⡢ӦϿ⡢ǰͼͽʽ
   ǿҽдϿٷְٷ ISO/ANSI SQLODBCJDBC ȱ
   ׼ĳʽֲͬϿ⣬ PostgreSQLOracleSybase
   Informix ȡ
   
    PostgreSQL õؼǳḻĹܣΪӡԴʼ
   ģʽ (Open Source Code development model)Դʽģʽ
   Դʽ룬ڻдֲСĿǰ
   ʾδ󲿷ֵͨеνѶٹ·ϽС δ
   ꣬ᱬըԵسɳʹҵʹ PostgreSQL
   
   ͳѧѧͿѧԭӦأֻһ
   PostgreSQL 㣬Դʽ뿪ŸѶٹ·ϵһĴͷԵϵͳ
   £ܵõصν˼档ԴʽģʽҲɷֹ
   ظǳãʡɢʱ估ϷйѻںȫԴľö
   ɡֻҪдһ㲻ҪһΡ㲻˷ʱ
   õĶһһҪúãΪһֻаСʱ
   ̤إһʱȡķı䡣ÿ˵ĵһѡ񶼽
    PostgreSQLLinux ȿϵͳ
   
   ִеӵԴʽʲԪ޼ֵ
   ܻΪʷֻҪõӲǮӲ϶ӻ
   ȡֵõġصǹĵӲӲܶƥ
   ֻǱ޲Ӳĸӳ̶ʹȫֻ 6 ұֳƼ
   ԾƬӲһȽĿƼ̷ǳӣʽܼ賧
    0.18С 0.18΢׿ƼĻͶӴһСƬƬϱ
   ԰Ƶİ뵼͵·һApplied MaterialAMDӢCyrix
   IBM ˾Ѵ- (man-years) ڸ߿Ƽ羧Ƭơ΢
   Ӽ΢ӵоϡ΢״֮һ (10^-6)΢״ʮڷ
   ֮һ (10^-9)ֽ΢ӼУ0.35 ΢׵ʹ壬0.25 ΢׵
   ʹͭý֮ᣬͭ 0.10 ΢׼΢ӼӦ
   ԾƬΪͭǿ彫ᱻ̭ڿʴƬ
   (photolithography) ĹУƵߡX-߻ᱻ춿ʴ
   (etch) С (feature size) С 0.15 ΢׵ĵ·ʮ꣬Ƭ
   ᱻӵ (molecular computers) ﾧƬ (bio chips) ȡǵ
   ٶȽƬʮڱһԭӡԭ
   ӵԻʵķĵӿơ (ON) ָ֮ʾ
   1ر (OFF) ָʾ 0еԳʽǸݶԪ 1  0
   
   
   ±гƬĽδչơ
   
                                 δƬĽչ
                                 ********************
+--------------------------+---------+---------+---------+---------+--------+--
-------+
| Ŀ/                | 1997    | 1999    | 2001    | 2003    | 2012   | 2
020    |
+--------------------------+---------+---------+---------+---------+--------+--
-------+
| С΢ף         | 0.25    | 0.18    | 0.15    | 0.13    | 0.05   |<
0.00001|
+--------------------------+---------+---------+---------+---------+--------+--
-------+
| ƬСף         | 200     | 300     | 300     | 300     | 450    |
/|
+--------------------------+---------+---------+---------+---------+--------+--
-------+
| еѹ             | 1.8-2.5 | 1.5-1.8 | 1.2-1.5 | 1.2-1.5 | 0.5-0.6| <
 0.001 |
+--------------------------+---------+---------+---------+---------+--------+--
-------+
|              | 70      | 90      | 110     | 130     | 175    | 6
00     |
+--------------------------+---------+---------+---------+---------+--------+--
-------+
| Ƶ (MHz)           | 750     | 1,250   | 1,500   | 2,100   | 10,000 | >
 50,000|
+--------------------------+---------+---------+---------+---------+--------+--
-------+
| DRAM                 | 256 MB  | 1 GB    | 2 GB    | 4 GB    | 256 GB | >
 1000GB|
+--------------------------+---------+---------+---------+---------+--------+--
-------+

   ӲҪҪ߿ƼܼõĿƼͱȽϼ
   
   
   һ棬ÿҶᷢչʵϣκһӵһͼ۵
   ˶ɱд
   
    OracleInformixSybaseIBM DB2 (Unix) Ͽ⣬ "C" д
   ɣԪñ۸ûˡOracleSybase
   Informix Ͽǰٷְٵ C ʽ
   
   ʮ PostgreSQL ˲£ͷһ
   ANSI/ISO SQL ϿϵͳϷ PostgreSQL ԴʽϼǷȱ
   Ĺܻ֮ǿ֮ʹãкܴô
   
   ݹƣԡƷ󽫻ָΪάϵһ
   ءͼ۶Ӵʹ߼ԱʹáƷĹһ
   ⳡȫҴ롣Ϊ
   ġ˾ҲǴ͵
   
2. Ҳ춵

   »˵ѧڲͬ桢ԭӡԼĴ
   аҪĽɫҲ˵Ϊοѧ֪ʶʹÿѧĲƷǰǳҪ
   
   ƽǡ㲻һĲƷⶨж
   Ͽϵͳϵͳҵϵͳ壡˵Ҫõϵͳ
   Դʽϡ˽ڵԭӷǳҪΪ PostgreSQL΢
   Ӵ 95 ȶġ
   
   ǺҪһʹÿѧ˱֪β춵
   ϵͳ PostgreSQL˶ûпѧ֪ʶ˲֪΢Ӵ
   NT/95Oracleϵͳβܶ˲֪ʲᴴ΢
   Ӵ NT/95 ڲʲᡣӵϵͳԼ򵥵ɲֽɡ磬
   ǧǧˣÿ涼ǧǧ (super-cluster) 
   ÿŶǧǧϵ (galaxy) ɣÿϵǧǧⷡ
    (star) ɣЩϵͳ (planet)ʮڼƵԭ
   ɡʷУֻڹӡһ˴һ棬ִû
   ἰһΪȽĿƼըй㵺ͳ飬ɿֲ
   ԭӵȽöࡣִϸСǿʹֻһЩ˵ʹ
   ʧҲȫкк䣡ı仯˵
   ΢Ӵ 95 Ǽ򵥵 C ֻ 1  0 Գʽдɣ
   ǵƵʵ΢СԭӳɡƵ
   ʵ΢СϸɣŴԡǰ
   еԭӲڣʱ䣡ڴըʱʼŲ
   ɳֱţһΪBrahma洴
   ڵ档ʵпܴġԴ޴
   ԴҵϵͳҲ޴󣡣ޱ仯Ķάԭ
    (multi-dimensional atoms) Ϊά
   (primary-dimensional-universe)
   
   ѧͳѧֿ֧ԭʼ룬 PostgreSQL  Linuxٶÿ
   նҲԽԽɿʽʽĶ (momentum) Ѹӡ
   ⣬ͳѧѧȷĻǸעѧ͵֪˿ʼѧϰ
   ѧʽʽʧ
   
   չ PostgreSQL ƻҪʱԴˣPostgreSQL 
   ʱĲƷʱֻڿѧϽͣѧ PostgreSQLLinux
   ֮רֱӹġ
   
   ѧӦκεطκʱ䡢κιרʱ
   ѧʹ˵Уͽ֮Ħͱд
   ʱáпѧֲѧ PostgreSQL
   PostgreSQL ʹѧһСִ֦(Modern Algebra)ִ
   ۡ(Set Theory)ϵ(Relational Algebra)Ⱥ
   (Groups) (Rings)ռ (Collections) (Sets) (Unions)
    (Intersections)ų (Exclusions) (Domains) (Lists) 
   ȡ
   
   PostgreSQL Ʒ֮ԴڣΪʱ䡣ͬһ
   ͬʵһǰδΪ֪ʹڽʱҲ֪
   ġ˾
   
   еϸڹдʽʱʳĻѧתΪ
   ܼܡʹĶʱеϸȼϼʹС
   Ҳ˵һ̨ѧϵĻ (thermodynamic heat engine)
   ΪѧĶҲԣҲͼӵӰ쵽 PostgreSQL һ
   
   
   ϿɫԡƬƺۣһɫ
   ԡƺϵͳܵõֻǽɫϵͳ
   ϿۣȻһͲάĿռ䣬ռӵı
   ޱ仯ȫΪСĿռ䣬֮Ȼ
   
   ʹýһϵͳϿ
   пܡѴּǵ
   ǳӴ󣬶ҿɼ춽һϵͳ
   
   ĵλǽ (Joules)ǧ򹫽ʱСʱȡ
   (power) ʱ䣬λߡ
     _________________________________________________________________
   
        ÿ˵ = y 
˵
        ÿ˵ = y 
֮ת E = m * c * c'c' ǹٶ 'm' 
        ʱ = 8 СʱһΪһһֻ 8 Сʱ
         =  / ʱ
             = (y / (8 * 60 * 60)) 
        ܹ = n * (y / (8 * 60 * 60)) 
n = ƻ
     _________________________________________________________________
   
   Ϸʽ 'n' ƲƷء
   
   򫣬ϵܶˣҲ˵дʱ䣬ñ
   ˾̵ʱصʹ΢IBM ȴ˾ҲΥ
   ɣػͶ
   
   ǡΪѧĶɣԭʼ롯ϵͳ PostgreSQLLinux ս
   ʤԭʼ롯ϵͳͱػ졣пѧݵġ಻Ӧ˷
   ʱ䴴̫ظƷ
   
3. PostgreSQL ʲ᣿

   PostgreSQL һɵϿ⣬ĳʽ룬һ ANSI SQL
   1998, 92, 89 ΪĿʽϿϵͳڲͬӲƽ̨Ͳ
   ϵͳִСPostgreSQL Ŀǰٷְٷ ANSI/ISO SQL Ϊ
   һĿͨϿ⡣
   
   죬PostgreSQL Ƚϵͳ˲ǣܶҵϿ
   ءԺ涼׷PostgreSQL ǵϺܶҵĺɹ
   һ͹̫վ (International Space Station) Ƶרδ
   ʮ꣬PostgreSQL ԻѵϿϵͳΪһԴʼϵͳ
   
   
   PostgreSQL Ļ뷨ǡֻҪһģĳʽдˣͲӦ˷ʱ
   дһΣĹֻǧ֮һ룡
   
   Informix Universal server1997 ƳĻ PostgreSQL ĽϾɰ汾
   Ϊ Informix չ Illustra Inc. ϵ InformixIllustra Ͽ
   Ǹ PostgresPostgreSQL ǰдɵġ
   
   PostgreSQL  POSTGRES Ͽϵͳĸ棬һһ DBMS оԭ
    (prototype)ڱ POSTGRES ǿģͼḻ̬ͬʱ
   һ˵ SQL Ӽȡ PostQuel ѯԡ
   
   PostgreSQL һȺμ PostgreSQL ̳ͨĻԱеġ
   ĿǰЭΪ Marc G. Fournier
     * [3]scrappy@postgreSQL.org
       
   Ḻڼδ PostgreSQL չȻϿû
   Ҳ PostgreSQL ĿԱ⿪ǷɢڻϴϿü
   ġ
   
   PostgreSQL 1.01  Andrew Yu  Jolly ChenPostgreSQL ǰ
   Postgres ĳʽ룬ǺܶѧҵʽԱ University
   of CaliforniaBerkeley  Michael Stonebraker ڵָµĲƷ
   
   ԰ PostgreSQL װϿŷϿŷӦ
   ʽϿŷһȽʽϿ⣨ORDBMS
   
   PostgreSQL  SolorisSunOSHPUXAIXLinuxIrixDigital Unix
   BSDiNetBSDFreeBSDSCO UnixNEXTSTEPUnixware 
   Unix ִСֲӴ 95/NT Ĺ Cygnus cygwin32 ׼ɡ
   
   ָ PostgreSQL й University of California, Berkeley
   İȨ
   
3.1 Ƥ

   PostgreSQL ϼ
   
     * Ŀ PostgreSQL SQL RDBMS Ͽ⣨Ͽϵͳ
     * Ŀǰ汾7.0.1
     *  PostgreSQL ʮꡣ 1985 꿪ʼ
     * ߡ ʮ԰ƵĴѧ͹˾
       
   PostgreSQL İƤ [4]http://www.greatbridge.com ҵ
   
4. ĸϺãPostgreSQL  MySQL

   MySQL һԴʼ SQL ŷ֧Ԯ (Transaction)
   ǳ춷ǳСϿ⣬֧ԮȽ SQL ܡPostgreSQL һ
   ҵϿ⣬֧Ԯ׺ͼ SQL ṹڲýMySQL Ŀ
   ֹͣ MySQL ߶תƵ PostgreSQLΪ MySQL Ҳ ANSI SQL
   ΪĿ꣬һظĲƷңMySQL һҵ
   (quasi-commercial) ĲƷ PostgreSQL ͬ߿Դʼ룬
   Ȩѡ
   
   MySQL  [5]http://www.tcx.se ҵ
   
5. δȡ ?

   ɴµط Redhat Linux  Debian Linux  Slackware
   Linux ҵ PostgreSQL װԴʽͶԪ룩
     * Linux System Labs ַ [6]http://www.lsl.com/ 7 Ԫ
     * Cheap Bytes Inc ַ [7]http://www.cheapbytes.com/ 7 Ԫ
     * Debian ַ [8]http://www.debian.org/vendors.html
       
   PostgreSQL ֯ҲPostgreSQL CDROMںԴʽ룬
   Unix ϵͳĿִеļ
     * ҳȡ PostgreSQL  [9]http://www.postgresql.org 30
       Ԫ
       
   PostgreSQL ֻԪɢ
     * PostgreSQL RPMs ά Lamer Owen [10]lamar.owen@wgcr.org
       ҵ
     * PostgreSQL Դ RPM ͶԪ RPM
       [11]http://www.ramifordistat.net/postgres
     * PostgreSQL Դ RPM ͶԪ RPM [12]http://www.postgresql.org ѡ
       Latest News Redhat RPMs
     * PostgreSQL Դ RPM ͶԪ RPM
       [13]http://www.redhat.com/pub/contrib/i386/ ftp site 
       [14]ftp://ftp.redhat.com/pub/contrib/i386/
     * Solaris, HPUX, AIX, IRIX, Linux ĶԪվ̨
       [15]ftp://ftp.postgresql.org/pub/bindist
       
   άվ
     * վ [16]http://www.postgresql.org/
     * վ [17]http://logical.thought.net/postgres95/
     * [18]http://www.itm.tu-clausthal.de/mirrors/postgres95/
     * [19]http://s2k-ftp.cs.berkeley.edu:8000/postgres95/
     * [20]http://xenium.pdi.net/PostgreSQL/
     * [21]http://s2k-ftp.cs.berkeley.edu:8000/postgres95/
       
   ڴг ftp վ
     *  FTP: [22]ftp://ftp.postgresql.org/pub
     *  FTP: [23]ftp://ftp.chicks.net/pub/postgresql
     * [24]ftp://ftp.emsi.priv.at/pub/postgres/
     * [25]ftp://ftp.itm.tu-clausthal.de/pub/mirrors/postgres95
     * [26]ftp://rocker.sch.bme.hu/pub/mirrors/postgreSQL
     * [27]ftp://ftp.jaist.ac.jp/pub/dbms/postgres95
     * [28]ftp://ftp.luga.or.at/pub/postgres95
     * [29]ftp://postgres95.vnet.net:/pub/postgres95
     * [30]ftp://ftpza.co.za/mirrors/postgres
     * [31]ftp://sunsite.auc.dk/pub/databases/postgresql
     * [32]ftp://ftp.task.gda.pl/pub/software/postgresql
     * [33]ftp://xenium.pdi.net/pub/PostgreSQL
       
   PostgreSQL ԴʽҲɴ sunsite unc ӳվõȫдԼһǧ
    Redhat Linux ׼ɢ /pub/contrib/i386/postgresql.rpm 
   С
     * Ҫ֪ʲӳվ뵽 [34]ftp://sunsite.unc.edu
       
6. PostgreSQL ٰװָ

   ڻСڿٰװϿ⡣
   
6.1 װͲ

   װԡȷϺִ PostgreSQL Ĳ  root ݵ
     _________________________________________________________________
   
# cd /mnt/cdrom/RedHat/RPMS
# man rpm
# ls postgre*.rpm
# rpm -qpl postgre*.rpm | less ۿ
# rpm -qpi postgre*.rpm ۿ׼ϣ
# cat /etc/passwd | grep postgres
     _________________________________________________________________
   
   ע㿴һpostgresʹߣҪݺ postgres 
   Ŀ¼  postgres  ɾߣΪpostgres2֮ࡣװʱ
   ҪǬǬ
     _________________________________________________________________
   
# rpm -i postgre*.rpm 밲װ׼ͻˡϺ׼
ʹ pgaccess 
# man chkconfig
# chkconfig --add postgresql  ʱʼ pg
# /etc/rc.d/init.d/postgresql start  postgresql
# man xhost
# xhost +   postgres ʹʾװã
# su - postgres
bash$ man createdb
bash$ createdb mydatabase
bash$ man psql
bash$ psql mydatabase
 psql пɰ / ¼༭ʷ¼ \s

bash$ export DISPLAY=<hostname>:0.0
bash$ man pgaccess
bash$ pgaccess mydatabase
     _________________________________________________________________
   
    pgaccess  psql ٵش SQL ָˣ
     _________________________________________________________________
   
bash$ cd /usr/doc/postgresql*
     _________________________________________________________________
   
   ڴĶ FAQʹߡʽԱֲָ
   
6.2 PostgreSQL RPMs

   ⣬뿴 [35]http://www.ramifordistat.net/postgres  "Installation
   Steps"
   
   PostgreSQL RPM  Lamar Owen λ [36]lamar.owen@wgcr.org 
   [37]http://www.postgresql.org ҵ PostgreSQL ϡ
   
6.3 Maximum RPM

   ϰ RedHat RPM package manager Թ PostgreSQL װ 
   [38]http://www.RPM.org ءMaximum RPMһ飬Ѱ
   maximum-rpm.ps.gz  Linux ʹ gv ָĶ
     _________________________________________________________________
   
# gv maximum-rpm.ps.gz
     _________________________________________________________________
   
   һ rpm2deb ɰ RPM ׼תΪ Debian Linux ׼
   
6.4 RPM 

    PostgreSQL ĸֽҪӡµطװ PostgreSQL Ŀ¼
   
     * Linux  - postgresql-*examples.rpm
     * postgresql-*examples.rpm [39]http://www.aldev.8m.com 
       [40]http://www.aldev.webjump.com
     * PostgreSQL Դʽ postgresql*.src.rpm examplestesting 
       tutorial Ŀ¼Ѱҡ
       
6.5  PyGreSQLPython 

   װ examples ׼ [41]Examples RPM ֮
     _________________________________________________________________
   
bash$ cd /usr/lib/pgsql/python
bash$ createdb thilo
bash$ psql thilo
thilo=> create table test (aa char(30), bb char(30) );
bash$ /usr/bin/python
>>> import _pg
>>> db = _pg.connect('thilo', 'localhost')
>>> db.query("INSERT INTO test VALUES ('ping', 'pong')")
>>> db.query("SELECT * FROM test")
eins|zwei
----+----
ping|pong
(1 row)
>>>CTRL+D
bash$
ˡʽװ
bash$ su - root
# cp /usr/lib/pgsql/python/_pg.so /usr/lib/python1.5/lib-dynload
     _________________________________________________________________
   
6.6  PerlPerl 

   װ examples ׼ [42]Examples RPM ֮
     _________________________________________________________________
   
bash$ cd /usr/doc/postgresql-6.5.3/examples/perl5
bash$ perl ./example.pl
     _________________________________________________________________
   
   עָʧȫ @INC Ҫڰ site_perl
   Ŀ¼е Pg.pm ģ飬Ҫʹ -I ѡ
     _________________________________________________________________
   
bash$ perl -I/usr/lib/perl5/site_perl/5.004/i386-linux-thread ./example.pl
     _________________________________________________________________
   
    perl ڴȡ PostgreSQL Ͽ⣡
   
   Ҫʹ perl 棬 example.pl 
   
6.7  libpq, libpq++ 

   װ examples ׼ [43]Examples RPM ֮
     _________________________________________________________________
   
bash$ su root   --> ΪıӵӵȨ
# chown -R postgres /usr/doc/postgresql-6.5.3/examples
# exit

bash$ cd /usr/doc/postgresql-6.5.3/examples/libpq
bash$ gcc testlibpq.c -I/usr/include/pgsql -lpq
bash$ export PATH=$PATH:.
bash$ a.out

bash$ cd /usr/doc/postgresql-6.5.3/examples/libpq++
bash$ g++ testlibpq0.cc -I/usr/include/pgsql -I/usr/include/pgsql/libpq++
-lpq++ -lpq -lcrypt
bash$ ./a.out עòѶϢ£
> create table foo (aa int, bb char(4));
No tuples returned...
status = 1
Error returned: fe_setauthsvc: invalid name: , ignoring...
> insert into foo values ('4535', 'vasu');
No tuples returned...
status = 1
Error returned: fe_setauthsvc: invalid name: , ignoring...
> select * from foo;
aa   |bb   |
-----|-----|
4535 |vasu |
Query returned 1 row.
>
>CTRL+D
bash$
     _________________________________________________________________
   
   ֱ C/C++ ȡ PostgreSQL Ͽ⣡
   
6.8  Java 

   װ examples ׼ [44]Examples RPM Ͱװ¶ Ϊ
   밲װ jdk-*glibc*.rpm ׼Java RPM ׼
     *  [45]ftp://ftp.redhat.com/pub/contrib/i386 
       [46]http://www.blackdown.org ȡJDK jdk-*glibc*.rpm
     *  [47]ftp://ftp.redhat.com/pub/contrib/i386 ȡ
       postgresql-jdbc-*.rpm
     _________________________________________________________________
   
bash$ cd /usr/doc/postgresql-6.5.3/examples/jdbc
bash$ echo $CLASSPATH
 --> Ҫʾ  CLASSPATH=/usr/lib/jdk-x.x.x/lib/classes.zip
x.x.x ǰ汾롣
bash$ export CLASSPATH=$CLASSPATH:.:/usr/lib/pgsql/jdbc6.5-1.2.jar
༭ psql.java ѡpackageбΪۡ
bash$ javac psql.java
bash$ java psql jdbc:postgresql:template1 postgres < password >[1] select * fro
m pg_tables;
tablename       tableowner      hasindexes      hasrules
pg_type postgres        true    false   false
pg_attribute    postgres        true    false   false
[2]
CTRL+C
bash$
     _________________________________________________________________
   
   ֱ Java ȡ PostgreSQL Ͽ⣡
   
6.9  ecpg 

   װ examples ׼ [48]Examples RPM ֮
     _________________________________________________________________
   
bash$ cd /usr/doc/postgresql-6.5.3/examples/ecpg
bash$ ecpg test1.pgc -I/usr/include/pgsql
bash$ cc test1.c -I/usr/include/pgsql -lecpg -lpq -lcrypt
bash$ createdb mm
bash$ ./a.out
     _________________________________________________________________
   
   ֱǶʽ SQL ȡ PostgreSQL Ͽ⣡
   
6.10  SQL ӡԶ̬ͺ
     _________________________________________________________________
   
bash$ cd /usr/doc/postgresql-6.5.3/examples/sql
δдá
     _________________________________________________________________
   
6.11  Tcl/TK 

   Tck/Tk  pgaccess ʽ ʹһֱ༭Ķ
   /usr/bin/pgaccess 
     _________________________________________________________________
   
bash$ view /usr/bin/pgaccess
bash$ export DISPLAY=<hostname of your machine>:0.0
bash$ createdb mydb
bash$ pgaccess mydb
     _________________________________________________________________
   
6.12  ODBC 

    1.  [49]http://www.insightdist.com/psqlodbc/ ȡ win32 pgsql odbc
       ʽ
    2.  /usr/lib/libpsqlodbc.a
       
6.13  MPSQL Motif-worksheet 

    [50]http://www.mutinybaysoftware.com ȡ RPM
   
6.14 ֤

   Ҫ֤ PostgreSQL ĸƷʣִ Regression ׼  root ݵ
     _________________________________________________________________
   
# rpm -i postgresql*test.rpm
Ķ README װԴʽ regress Ŀ¼
# rpm -i postgresql*.src.rpm
# cd /usr/src/redhat/SPECS
# more postgresql*.spec Բ쿴ҪװЩ RPM ׼
# rpm -bp postgresql*.spec ׼׼

Regression Ҫ Makefiles  *fmgr*.h ıͷָ

# rpm --short-circuit -bc postgresql*.spec ߽ݾ
make -C common  SUBSYS.oᰴ CTRL-C ֹʱ趨Ѿ
ɹ Makefiles ͵ͷҲѲ㲻Ҫȥ
# cd /usr/src/redhat/BUILD
# chown -R postgres postgresql*
# su - postgres
bash$ cd /usr/src/redhat/BUILD/postgresql-6.5.3/src/test/regress
bash$ more README
bash$ make clean; make all runtest
bash$ more regress.out
     _________________________________________________________________
   
6.15 

   ʱǶҪƳ PostgreSQL Ҫ汾֮֡Լ
   Ҫн޲²  postgresql ʽĿ¼
   
                # rpm -i postgresql*.src.rpm
                # cd /usr/src/postgresql6.5.3
                # man patch
                # patch -p0 < patchfile
                # make clean
                # make

   Ƕ
     * PostgreSQL Ƕ [51]ftp://ftp.postgresql.org/pub/patches
       
7. PostgreSQL ֧Ԯ 200 Gig ĳϿ

   32 λԪĵϿⳬ 5 GigaByte ʱֻѸ½ 32
   λԪִ 30 gig Ͽ⣬ֻ½32 λԪܵ 2 GB
   壬2 GB ϵͳϵͳơʹ SGIIBM HP Ϊ
   Linux Ƶĵϵͳ ext3-fs  32 λԪ֧Ԯ 2 GB ĵ
   С
   
   Լ͵Ͽ˵ǿҽʹ 64 λԪ Digital Alpha
   Sun Ultra-sparc 64 λԪSGI 64 λԪIntel Mercel IA-64
   HPUX 64 λԪԡIBM 64 λԪԡʹ 64 λԪĴ
   PostgreSQLͿԴ͵Ͽ⼰ѯѯͱϿٶ
    32 λԪĵԿ64 λԪԵŵкܴļλַ
   (memory addressing space) ͲϵͳɴܴĵϵͳΪϿ
   ṩϼѱ֧֡Ԯ塢ǿ
   
8. ƾʲ PostgreSQLRegression ׼ (Regression test package) Ϊû


   ѧɡǿԿѧؼ֤Ƿ ISO/ANSI SQL 
   ΪPostgreSQLRegression ׼src/test/regressѰ
   ɢУĵԼ֤׼ SQL  PostgreSQL 
   ׼Ѱٸ SQL Գʽ
   
   ӦõԵĸ֤ PostgreSQLԡԿǧ
   ڱٶ Regression ԡִԿںܶʱִʮ
    SQL ԡڲýԻԿױˣʹõԵ
   ԵıǺġ
   
   ҪҲӲԡΪ㻥üа
   Ҳɰص PostgreSQL վRegression û
   PostgreSQL ļΣҲϵͳѸ PostgreSQL
   
   RegressionԿɱΪԱû໥ͬһݷǳļ
   ļPostgreSQL ڿ̼Ƴ֮ǰ㷺ʹ Regression ֤
   ء
   
   PostgreSQL ɼ Regression ֱӷӳһֹܡ﷨
    Regression дڣͱ֧Ԯûг
   PostgreSQL Ϳ֧ܲԮ֤ Regression С
   
9. PostgreSQL ǰ GUI ߣͼʹ߽棩

   ҳδΪеǰ GUI󲿷ֳʽҪŷ
   壨ͱ룩 PHP/Zend [52]PHP+Zend compilerHTML  DHTML дɣС
   ڿͻ JavaScript  Java Applet дɡҽִ
   Windows 95/NT Ӧóʽֲ PHP + HTML + DHTML  Zend PHP 
   ʮǿΪ PerlJavaC++  Javascript Ĺܽϵһ
   УҿҵϵͳUnixes Ӵ NT/95 ִС
   
   ѹΪ
     * PHP  Zend  [53]PHP+Zend compiler
     * X-Designer ֧Ԯ C++, Java  MFC [54]http://www.ist.co.uk/xd
     * Windows95  Unix  QT  [55]http://www.troll.no 
       [56]ftp://ftp.troll.no
     * Code Crusader  Linux cdrom У MetroWorks Code Warrior д
        
       [57]http://www.kaze.stetson.edu/cdevel/code_crusader/about.html
     * MetroWorks  Code Warrior [58]http://www.metrowerks.com
     * GNU Prof C++ IDE [59](Redhat) Cygnus
       [60]http://www.cygnus.com
     * Borland C++ Builder Linux  [61]http://www.inprise.com
     * Borland Java JBuilder Linux  [62]http://www.inprise.com
       
   Ϊȵѡ
    1. PHP άŷ HTMLDHTMLJavascript ͻ弰
       Java-Applet
    2. Perl ʹ Perl-Qt  Perl-Tk [63]Perl Database Interface
    3. Omnipresent  Omnipotent  C++ (GNU g++)
          + Fast CGI C++ дɣ Javascript/Java-Applet Ϊҳǰ
            ˽
          + GNU C++  QtEZ  QT
          + GNU C++  Lesstiff  Motif
    4. Java ĳʽʮֻѡC++  Java  20 
       
   ߡ PostgreSQL ׼ɢһΪpgTcl Tcl/Tk 
   ʽ⡣Tcl/Tk һΪ SpecTcl ۺϿ
   
     * Lesstiff Motif 
       [64]ftp://ftp.redhat.com/pub/contrib/i386/lesstiff*.rpm
     * Vibe Java/C++  [65]http://www.LinuxMall.com/products/00487.html
     * JccWarrior [66]ftp://ftp.redhat.com/pub/contrib/i386/jcc*.rpm
     * Tcl/Tk [67]http://www.scriptics.com
     * Ϊ INCR  Tcl  [68]http://www.tcltk.com
     * Visual TCL վ [69]http://www.neuron.com
     * Visual TCL Redhat rpm 
       [70]ftp://ftp.redhat.com/pub/contrib/i386/visualtcl*.rpm
     * [71]http://sunscript.sun.com/
     * [72]http://sunscript.sun.com/TclTkCore/
     * [73]ftp://ftp.sunlabs.com/pub/tcl/tcl8.0a2.tar.Z
     * Java FreeBuilder
       [74]ftp://ftp.redhat.com/pub/contrib/i386/free*.rpm
     * SpecTCL [75]ftp://ftp.redhat.com/pub/contrib/i386/spec*.rpm
     * Java RAD  PostgreSQL Kanchenjunga 
       [76]http://www.man.ac.uk/~whaley/kj/kanch.html
     * Applixware  [77]http://www.redhat.com
     * XWPE X Window Programming Environment
       [78]http://www.rpi.edu/~payned/xwpe/
       [79]ftp://ftp.redhat.com/pub/contrib/i386/xwpe*.rpm
     * XWB X Window Work Bench
       [80]ftp://ftp.redhat.com/pub/contrib/i386/xwb*.rpm
     * NEdit [81]ftp://ftp.redhat.com/pub/contrib/i386/nedit*.rpm
       
   ҲӴ 95 ʹ Borland C++ BuilderDelphiBorland JBuilder
   PowerBuilder  ODBC/JDBC ʽӵ unix Ե PostgreSQL
   
10. PostgreSQL Ľʽ

10.1 PostgreSQL  ODBC ʽ

   ODBC ΢ƶġOpen DataBase ConnectivityǴӲ̲ͬͬ
   Ͽȡϵн档ʹ ODBC ʽдɵ֤ɺͲͬ
   ⣬ PostgreSQLOracleSybase  Informix Ⱥ
   
     * [82]PostODBC ѾɢСҳ
       [83]http://www.postgresql.org Ѱ PostgreSQL С
     *  [84]http://www.iodbc.org Ŀԭʼ ODBC ר
     * [85]http://www.openlinksw.com Open Link Software Corporation 
       PostgreSQL Ͽ ODBC ʽҲͳѵ ODBC (
       ޣ
     * PostgreSQL  Insight ODBC [86]http://www.insightdist.com/psqlodbc
        PostODBC Ĺٷվ
     * FreeODBC ׼ [87]http://www.ids.net/~bjepson/freeODBC/һ
       ѵ ODBC
       
10.2 PostgreSQL  UDBC ʽ

   UDBC һֶʽԱ (driver managers)  DLL ֧Ԯľ̬
   ODBC 汾ֱӰϿǶ뵽ӦС
     * [88]http://www.openlinksw.com Open Link Software Corporation 
       PostgreSQL Ͽ UDBC ʽ Open Link Ҳͳѵ
       UDBC (ޣ
       
10.3 PostgreSQL  JDBC ʽ

   JDBC Java DataBase ConnectivityJava һ (Sun
   Microsystems) Ķƽ̨ĳʽԡJava ʽʦʹ
   JDBC ׫дϿʽǿʽڲͬϿ⣬ PostgreSQLOracle
   Informix ֲ֮д Java ʽվȡ
   PostgreSQL  JDBC ʽ
   
   JDBC ʽѰ PostgreSQL  postgresql-jdbc*.rpm ׼С
   
     * [89]http://www.demon.co.uk/finder/postgres/index.html  Java 
       PostgreSQL 
     * [90]ftp://ftp.ai.mit.edu/people/rst/rst-jdbc.tar.gz
     * [91]http://www.openlinksw.com Open Link Software Corporation 
       PostgreSQL Ͽ JDBC ʽ Open Link Ҳͳѵ
       JDBC (ޣ
     * JDBC Ӣվ [92]http://www.retep.org.uk/postgres
     * JDBC FAQ վ [93]http://eagle.eku.edu/tools/jdbc/faq.html
       
   JDBC ҳ FAQ ڡ
     * JDBC HOME [94]http://splash.javasoft.com/jdbc
     * JDBC guide
       [95]http://www.javasoft.com/products/jdk/1.1/docs/guide/jdbc
     * JDBC FAQ [96]http://javanese.yoyoweb.com/JDBC/FAQ.txt
       
   ο [97] Java  һڡ
   
10.4 PostgreSQL  Java

   Java ʽʦЩǺá
     * [98]ftp://ftp.redhat.com/pub/contrib/i386  postgresql-jdbc-*.rpm
     * [99]http://www.blackdown.org
       
   ο [100] Java  һڡ
   
11. PostgreSQL  Perl Ͽ (Database Interface, DBI)

11.1 PostgreSQL  PERL 5 

   PERL ǡPractical Exptraction and Report Languageļд
   Ӳƽ̨ʹ PerlӴ 95/NTƻ iMac Unix
   SolarisHPUXAIXLinuxIrixSCO ȵȣ͵ MVS
   OS/2OS/400Amdahl UTS ܶԡPerl ںܶ಻кͲΪ
   ֪ĲϵͳӲִУԣڿ Perl һĲϵͳִ
   ʱشС֡ Perl ʹߺͿԱ
   
   PostgreSQL  Perl Ѱ PostgreSQL ɢСο
   src/pgsql_perl5 Ŀ¼
     * Pgsql_perl5 ַ [101]E.Mergl@bawue.de
     * һԴ
       [102]ftp://ftp.kciLink.com/pub/PostgresPerl-1.3.tar.gz
     * Perl ҳ [103]http://www.perl.com/perl/index.html
     * Perl  [104]http://reference.perl.com/ οĿ¼
     * Perl FAQ 
       [105]http://www.yahoo.com/Computers_and_Internet/Programming_Langu
       ages/Perl/
     * Perl GUI ʹ߽ Perl-Qt rpm
       [106]ftp://ftp.redhat.com/pub/contrib/i386 Ҳ뿴
       PerlQt-1.06-1.i386.rpm
     * Perl GUI ʹ߽ Perl-Qt
       [107]http://www.accessone.com/~jql/perlqt.html
     * Perl GUI ʹ߽ Perl-XForms
       [108]ftp://ftp.redhat.com/pub/contrib/i386Ѱ
       Xforms4Perl-0.8.4-1.i386.rpm
     * Perl GUI ʹ߽ Perl-Tk
       [109]ftp://ftp.redhat.com/pub/contrib/i386
     * Perl GUI kits [110]http://reference.perl.com/query.cgi?ui
     * Perl Ͽ
       [111]http://reference.perl.com/query.cgi?database
     * Perl  "C" ķ빤ߡ
       [112]http://www.perl.com/CPAN-local/modules/by-module/B/ Ѱ
       Compiler-a3.tar.gz
     * Bourne shell  Perl ķ빤ߡ
       [113]http://www.perl.com/CPAN/authors/id/MERLYN/sh2perl-0.02.tar.g
       z
     * awk  perl  a2p  sed  perl  s2p Ѱ PERL ɢС
     * Ҳ뿴 comp.lang.perl.* й PERL 
       
11.2 Perl Ͽ DBI

  ν DBI
  
   Perl Ͽ棨DBI Perl ԵһϿȡӦóʽ棨API
   Perl DBI API һ麯͹ṩһһ¶ʵ
   ϿĽ档
     * DBI FAQ  Descartes Hermetica  [114]descarte@hermetica.com
       
  PostgreSQL  DBI ʽ DBD-Pg-0.89
  
   ڴȡ DBD-Pg-0.89.tar.gz
     * DBD-Pg-0.89 : [115]http://www.perl.com/CPAN/modules/by-module/DBD/
     * Comprehensive Perl Archive Network CPAN
       [116]http://www.perl.com/CPAN
     * DBI ʽ DBI ģҳ
       [117]http://www.hermetica.com/technologia/perl/DBI
     * DBI  [118]http://www.fugue.com/dbi/
     * ҳ [119]ftp://ftp.demon.co.uk/pub/perl/db
     * ӽ DBI  [120]http://www-ccs.cs.umass.edu/db.html
     * ӽ DBI  [121]http://www.odmg.org/odmg93/updates_dbarry.html
     * ӽ DBI  [122]http://www.jcc.com/sql_stnd.html
     * PostgreSQL Ͽ [123]http://www.postgresql.org
       
  DBI ļ֧Ԯ
  
     * 뽫󱨸ͬ perl -v  perl -V PostgreSQL İ汾
       DBD-pg İ汾DBI İ汾 [124]E.Mergl@bawue.de
       
  ν DBIDBperlOraperl  *perl
  
   ժ¼ Tim BunceDBI ߺߡ
   
   DBI  Perl ԵһӦóʽ棨APIPerl DBI API  һ
   麯͹ṩһһ¶ʵõϿ档
   
   򵥵˵DBI ü͸ (transparently) ȡϿ⡣ԣ
   ӵ OracleInformixmSQLSybase κϿ⣬㲻Ҫ֪ 3GL
   ĻơDBI  API ЩϿ⡣
   
   ĺôõһƪ perl ָ̲ͬͬϿ⣬
   һʽжȡһ Oracle Ͽϼ뵽 Informix 
   СDBI 򵥼
   
    DBperl ģӦ DBI ģ鼰֧ԮѶй DBI 
   ʽӦ dbi-users ͨѶ̳ list.
   
     ģ      Ͽ                   DBI
    ----------- -----------------   ------          ---
    Sybperl     Sybase              Michael Peppler DBD::Sybase
                                    <mpeppler@datamig.com>
                                    http://www.mbay.net/~mpeppler
    Oraperl     Oracle 6 & 7        Kevin Stock     DBD::Oracle
                                    <dbi-users@fugue.com>
    Ingperl     Ingres              Tim Bunce &     DBD::Ingres
                                    Ted Lemon
                                    <dbi-users@fugue.com>
    Interperl   Interbase           Buzz Moschetti  DBD::Interbase
                                    <buzz@bear.com>
    Uniperl     Unify 5.0           Rick Wargo      None
                                    <rickers@coe.drexel.edu>
    Pgperl      Postgres            Igor Metz       DBD::Pg
                                    <metz@iam.unibe.ch>
    Btreeperl   NDBM                John Conover    SDBM?
                                    <john@johncon.com>
    Ctreeperl   C-Tree              John Conover    None
                                    <john@johncon.com>
    Cisamperl   Informix C-ISAM     Mathias Koerber None
                                    <mathias@unicorn.swi.com.sg>
    Duaperl     X.500 Directory     Eric Douglas    None
                User Agent

    DBI ģ DBperl ģ (emulation layers)
   DBD:Oracle  Oraperl ģ㣬ִ Oraperl ִָ
   Сģ Oraperl API з DBI вͨ DBI ִС
   
  DBI 
  
   һЩ DBI Դ
     * DBI 
       [125]http://www.hermetica.com/technologia/perl/DBI/doc/dbispec
       
   POD ļ POD Ƕ뵽 perl ʽԡͳʽһļ
   ṩ õϸʽʦģüҡDBI ʽ POD ԽԽ
   УҪĶйļʹָ
     _________________________________________________________________
   
DBI  PO ָĶ
        $ perldoc DBI

ʹýϵ DBD::Oracle  Oraperl ģ˿ָĶ Oraperl 
дʽ
        $ perldoc Oraperl

DBD::mSQL ģüҿɼָĶһЩʽĶҺ (private functions
) 칦ܵϡ
        $ perldoc DBD::mSQL

POD ļҲ⡣ҪĶĻ
        $ perldoc DBI::FAQ

POD һϡй POD ׫д POD POD ѧɼָĶ
        $ perldoc perlpod
     _________________________________________________________________
   
   װ Tk ģüҿܻһΪ tkpodʹ Tk  POD ĶȤ
    POD ŵһ㼰Ķʽ
   
   ̸СϢ͹۲  DBI ̳ͨвͬһżȻġ
   ̸ Ҳ뿴
     * DBI ̳ͨ
       [126]http://www.hermetica.com/technologia/perl/DBI/tidbits
     * DBI Perl Journal ҳ [127]http://www.tpj.com
     * DBperlһžʮһµġDr. Dobbs Journal
     * The Perl5 Database Interfaceһ Alligator Descartes дɣ
        O'Reilly and Associates 顣
       
   üҿܲμӵ̳ͨΪ The mailing lists that users may
   participate in are:
     * ̳ͨ [128]http://www.fugue.com/dbi
     * dbi-announce  [129]dbi-announce-request@fugue.com 
       'subscribe' Ϊ
     * dbi-dev Աר Email: [130]dbi-dev-request@fugue.com 
       'subscribe' Ϊ
     * dbi-users һ Email: [131]dbi-users-request@fugue.com 
       'subscribe' Ϊ
     * ͨŴ洦
       [132]http://outside.organic.com/mail-archives/dbi-users/
     * ŷͨŴ洦
       [133]http://www.rosat.mpe-garching.mpg.de/mailing-lists/PerlDB-Int
       erest
       
  򡸲ʧܡ
  
   ѶϢת (core dump)ʹ Devel::CoreStack ģѶϢ
   תĶѵ׷ (stack trace)Devel::CoreStack  CPAN ҵ
     * [134]http://www.perl.com/cgi-bin/cpan_mod?module=Devel::CoreStack
       
   Ѷѵ׷١ģ汾perl 汾Ըϵͳ汾κõ
   ϵʵ dbi-users ̳ͨĳԽȫԱԽ⡣
   
  Ӵ 95/NT û DBI ֧Ԯ
  
   DBI  DBD::Oracle  Win32 汾ѳΪ DBI ı׼֡ˣ DBI
   0.81 ߵİ汾Ӧû͸ ODBCԴȡ΢ Access 
   SQL-Server Ͽ⡣ DBI-0.79ᣩһʵʵ Win32::ODBC
   DBI ģ㡣Ϊ DBI::W32ODBCҪʹ Win32::odbc ģ顣
     * Win32 DBI [135]http://www.hermetica.com/technologia/perl/DBI/win32
     * Win32 ODBC [136]http://www.roth.net
       
   CGI ˵DBI ûã
  
   һ֡УDBI  CGI ʽƷǳãʵϣCGI  DBI Ҫ
   ;֮һ
   
   DBI  CGI ʽʦƹǿĻǰϿǵüңӶ
   еϡDBI ҲվϿŷʱ
   Ա CGI ½֮
   
  μӿ CGI  DBD Oracle ٶȣ
  
   Apache httpd һ httpd (httpd children) ͻ Doug
   MacEachern  Apache mod_perl ģ飬perl Ƕ뵽 httpd 
   CGIDBI ϲģڶӵʱ롣Щģֱڴŵϵĵ
   ʱŻٱ롣Ҫ֪й Apache ϣ뿴 Apache ƻ
   վ
     * Apache ƻվ [137]http://www.apache.org
     * Mod_perl ģ
       [138]http://www.perl.com/cgi-bin/cpan_mod?module=mod_perl
       
  ʹ DBI  CGI ӣ
  
    Edmund Mergl  Apache::DBI ģ飬ÿ httpd Ͽ봢
   Ӵ (hash) СӦóʽֻһϿüңÿһӶɿ
   ʼĿǰ֮䲢ϿӡApache::DBI ɴ CPAN 
   
     * [139]http://www.perl.com/cgi-bin/cpan_mod?module=Apache::DBI
       
  ִָһ perl ʱ⡣ http ִʱ
  ʧܣν⣿
  
   ϣпΪִָʹѰѻ趨ã
    DBD::Oracle ˵ $ORACLE_HOME, $ORACLE_SID  TWO_TASKhttpd 
   ͨ nobody ִУû趨õĻκ³
   ִеָ嶼ȷʧܡҪ⣬Ŀͷһ
   BEGIN() 趨⡣ͬأҪ httpd 
   ¼ѰԼĶIdiot's Guide To Solving Perl / CGI
   Problems͡Perl CGI Programming FAQѰҸϡŲ
    DBI йءļСĶ
     * Guide to Solving Perl CGI problems
       [140]http://www.perl.com/perl/faq/index.html
       
  DBI ж (multi-threading)
  
   ҪһЩʹö SELECT ӵ Oracle OCI ʽġ
     * [141]http://www.hermetica.com/technologia/oracle/oci/orathreads.ta
       r.gz
       
   DBI ڴ (stored procedure)
  
   ĿϿ⣬һ Oracle Ͽнڴʹ
   $dbh->do ʹִС
   
   $dbh->do( "BEGIN someProcedure END" );
   
   DBI Уȡڴķֵ
  
   Ҫ
   
    $sth = $dbh->prepare( "BEGIN foo(:1, :2, :3); END;" );
    $sth->bind_param(1, $a);
    $sth->bind_param_inout(2, \$path, 2000);
    $sth->bind_param_inout(3, \$success, 2000);
    $sth->execute;

  ҿɷ DBI һϿ⣿
  
    DBI ˵Ҫʵ֧ԮϿĽͶ̫ˡ磬Oracle 
   ֧ԮϿ⣡⣬ Oracle УϿŷϾϿ⣬
    mSQLʹûϿ⣬ŷҲ˳ִСǣ̫ˡ
   ˣʽ͸˽ func ɾϿ⡣Ҫʽ
   ļ˽û֧Ԯơ
   
  DBI  NULL ֵ
  
   DBI ָ NULL ֵ undef ֵNULL  NULL ֵ뵽
   ϿУ
   
    $rv = $dbh->do( "INSERT INTO table VALUES( NULL )" );

   ѯʱNULL Ҫ undef Ƚϡʽõı׼
   
  Щ func ʲģ
  
   DBI  func ΪϿйܵĽ㣬罨ͶһϿ
   ʹЩʽзʮּ򵥣磬Ҫʹһ createDatabase 
   һ (argument) ǻд
   
    $rv = $dbh->func( 'argument', 'createDatabase' );

   ԱҪע func ڲͬϿֲ
   
  ҵ֧Ԯѵ
  
   PERL CLINIC : Perl Clinic ԺԼʽΪ PerlDBIDBD::Oracle 
   Oraperl ṩҵ֧ԮЩ֧Ԯ DBI  Tim Bunce Ĺ˾ṩ
   ֪飬뿴
     * [142]http://www.perl.co.uk/tpc
       
11.3  Perl 

    [143] PerlPerl һ
   
12. PostgreSQL 

12.1 PGACCESS - PostgreSQL  GUI 

   PgAccess  PostgreSQL  Tcl/Tk 档Ѿ PostgreSQL ɢ
   ҳҳû°汾
     * [144]http://www.flex.ro/pgaccess
     * κĽ飬ʡ [145]teo@flex.ro
       
   pgaccess ÷
     _________________________________________________________________
   
# man xhost
# xhost +
# su - postgres
bash$ man pgaccess
bash$ export DISPLAY=<hostname>:0.0
bash$ pgaccess mydatabase
     _________________________________________________________________
   
   PgAccess ɫ
   
   PgAccess ӴMain window, Table builder, Table(query) view, Visual
   query builder.
   
   Tables
     *  (tables) ģٸ¼ perferences Ŀ¼ģ
     * ҷֱ (grid line) Сбռ (table space) 
       бĿ¼ (table header) кã
     * ԶСÿö
     * /ʽSDFCSV
     * ˹ܣ price>3.14 Ĺ
     * ܣλ
     * ༭
     * ˵ı (table generator assistant)
     * ˵λ༭
       
   Queries
     * 塢༭ʹ桰üҶѯ(user defined queries)
     * ѲѯΪʾ (views)
     * ѯִ
     * ۿ select ʽĲѯ
     * ɾ͸Ĳѯ
     * ҷͷ¹ܵ Visual query builderаװ Netscape
       Navigator  Tcl/Tk ڴ˿ 밴ò֪ģ
       
       
    (sequence)
     * 塢ɾͼ 
     * ʹ SQL Զ塢ɾ
       
   ¸Ľ
     * ƣλȵȣ
     * 
     * 
     * д
       
   й LIBGTCL 
   
   õ PostgreSQL  Tcl Ľʽ libgtclν Tcl/Tk ɡ
   ģ顣libpgtcl Դʽλ PostgreSQL  /src/interfaces/libpgtcl
   Ŀ¼ض˵Ҫһ Tcl/Tk롯 libpgtcl ʽ⡣
   ˵ͨ PostgreSQL ĿĵͬΪ libpgtcl һ
   Ŀĵļϡ⵵ Linux Ϊ libpgtcl.soַһΪ
   Linux i386 ϵͳԤȱ˵İ汾ֻ⵵ϵͳʽĿ¼
   /usr/libɡѣһɾԭʽй
   libpgtcl.so һʹ pgwish wishpg pgaccess.tcl
   wishΪ wish  libpgtcl ʽ⡣
   
   ڱ pgaccess Ŀ¼ʱҲ crypt Σʹ -lcrypt
   
12.2 PostgreSQL ӴʽѯߣWISQL  MPSQL

   MPSQL ṩʹһͼ SQL  PostgreSQLMPSQL  Oracle 
   SQL Worksheet ΢ SQL Server Ĳѯ WISQL ơһƯ
   GUI ָ¼ҲԼ¼ϡĹܡ
     * [146]http://www.troubador.com/~keidav/index.html
     * ʡ [147]keidav@whidbey.com
     * [148]http://www.ucolick.org/~de/  tcl_syb/wisql.html 
     * [149]http://www.troubador.com/~keidav/index.html
     * ʡ [150]de@ucolick.org
       
12.3 Ϊ PSQL  PostgreSQL ʽѯߣISQL

   ISQL ǹָն˻ʹõġ ѰɢУΪ psql
   Sybase ISQLOracle SQLplus ʮơ Unix ָʾ롮psql
    psql> ʾ
   
bash# su - postgres
bash$ man psql
bash$ psql mydatabase
Type \h to see help of commands.

   ǳʹƺá  (shell script) ʹá
   
12.4 MPMGRPostgreSQL Ͽ

   MPMGR Ϊ PostgreSQL ǹһͼ档µطҵ
     * [151]http://www.mutinybaysoftware.com/
     * Email: [152]keidav@mutinybaysoftware.com
     * [153]http://www.troubador.com/~keidav/index.html
     * ʡ [154]keidav@whidbey.com
     * [155]http://www.ucolick.org/~de in file tcl_syb/wisql.html
     * PostgreSQL  WISQL [156]http://www.ucolick.org/~de/Tcl/pictures
     * ʡ [157]de@ucolick.org
       
13. ֻʹһʾ (monitor) ̨ PostgreSQL 

   㲻뻨ǮӲѡʹ VNC (Vitual Network Computing)
   ɵѶҵ AT & T  VNC  GPL ģһ
   VNCһûʾĵִ PostgreSQL ʽԶ˵Եʾ
   ʾЩԱ Ethernet 濨ӡVNC 
   [158]http://www.uk.research.att.com/vnc ҵ밴VNC ʹ
   TCP/IPֻҪ IP ַԶ˵ӣٶȿܺ
   
   ɵֻ̨һʾһ KWM ̡Ӱʾ
   (Keyborad, Video, Monitor) 밴M ǷΪ󣿣ѡѡ
   ԡⲻʡطٻңҲʡʾ̺ͻÿֵ 100
    500 Ԫ
   
   ѡɵ߶̨ PostgreSQL ŷԡ
   ŷftp ŷŷŷŷһ
   ѡҲɿӴ 95/NT  OS/2 ԡ
   
   鿴ַ
     * DataComm Warehouse Inc绰 1-800-328-2261ṩƷֵĵ
       Ӳ [159]http://www.warehouse.com 4 ֶ KVM ѡ (PS/2) Լ
       $89.99 Part No. DDS1354
     * Network Technologies Inc
       [160]http://www.networktechinc.com/servswt.html (120 Ԫ/PC 8 )
       嵥а 'Server Switches'  'Video only switches'
     * Scene Double Inc, Ӣ
       [161]http://www.scene.demon.co.uk/qswitch.htm
     * Cybex corporation [162]http://www.cybex.com
     * Raritan Inc [163]http://www.raritan.com
     * RealStar Solutions Inc [164]http://www.real-star.com/kvm.htm
     * Belkin Inc [165]http://www.belkin.com
     * Better Box Communications Ltd.
       [166]http://www.betterbox.com/info.html
     * Ӳ̲ѯServer SwitchơKVM Auto Switches
       
    yahoo ѰҳСServer SwitchesKVM SwitchesĹ˾
   
   
   ÿ PostgreSQL Ͽŷһרõ unix ԣǿ֡
   ʽ/г̶ҪִСĶסطıµҵҳ
   Щ Intel Ժ 13 ɫөĻʮ˵өĻֻҪӲ
   ΢Ӵ/DOS ϿŷҪɫʾΪһɫ
   ĸ˵ңع µطȡ RedHat׼ɢLinux 
   
     * Linux System Labs ַ [167]http://www.lsl.com/ 7 Ԫ
     * Cheap Bytes Inc ַ [168]http://www.cheapbytes.com/ 7 Ԫ
       
   ȷ㹺Ӳ RedHat Linux ֧Ԯǰ RedHat  ftp վҳ
   Ӳ SCSI ʾôԼԪɵõһ̨ǿ
   Intel ԣ RedHat Linux ִ PostgreSQLӴ 95OS/2Unix
   Motif RedbaronOperaNetscape إ
   odbc/jdbc/perl/tcl  PostgreSQLѸٳΪ׼ GUI ͻ
   (client)
   
   ʹ KWM ѡֻһʾһƶ̨
   
14. PostgreSQL άӦóʽŷ

   һЩɺ PostgreSQL άӦóʽŷԴʼ뻹ҵ
   СĿԴʼάӦóʽŷ Enhydra  Zopeҵ
    IBM WebsphereBEA Weblogic
   
14.1 Enhydra

   Enhydra һΪеάӦóʽŷ Lutris Corporation 
   ԰ٷְٴ Java дɣ [169]http://www.enhydra.org ȡ
   Enhydra һԴרҵʽ Lutris Corp ֧
   Ԯ [170]http://www.lutris.com
   
   Ҳ
   [171]http://www.linuxdoc.org/HOWTO/Enterprise-Java-for-Linux-HOWTO.htm
   l  Enterprise Java HOWTO
   
14.2 Zope

   Python ΪеġԡZope һάӦ
   ʽŷṩ PostgreSQL 档Zope  [172]http://www.zope.org
   õ Python  [173]http://www.python.org ҵ
   
15. PostgreSQL Ӧóʽ͹

15.1 PostgreSQL  4GL άϿʽAppGEN ϵͳ

   AppGEN ڴ
     * [174]http://www.man.ac.uk/~whaley/ag/appgen.html
     * [175]ftp://ftp.mcc.ac.uk/pub/linux/ALPHA/AppGEN.
       
   AppGEN һָ߽׵ĴʽԺӦóʽ (application
   generator) ԲάΪĳʽЩʽһڻ˾
   ʹáAppGen ʽԺϺ Common Gateway Interface (CGI) ׼ C 
    (C scripts) дɣ󲿷ֻŷ֧Ԯ
   
   Ҫʹ AppGenҪ
   
   PostgreSQLʽϿϵͳ
   
   ֧Ԯ CGI Ļŷ NCSA  HTTPD
   
   һ ANSI C  GCC
   
   AppGEN  Unix Linux ִгʽ
   
     * defgen߼ϽṹһʽЩʽɼ
       ¡ ɾѰϿеļ¼ֿԶֲο
       (referential integrity)
     * appgenAppGEN ıʽ AppGEN ԴʽΪ CGI
       ִе C Դʽɼʱʹ HTML ʽļ
     * dbf2sql dBase III ݵ .dbf תΪִе SQL Ĺ
       ʽʹô󲿷ִ DOS/ӴϿϿֲһ SQL ŷ
        PostgreSQL
     * ⣬AppGEN ռһЩִڼʹõ HTML ļGIF  Java
       СʽȻкõ㣬ҲԴʽ롣
       
    Andrew Whaley ;Ӵ
     * [176]andrew@arthur.smuht.nwest.nhs.uk
       
15.2 PostgreSQL ĻDBENGINE

   dbengine  Ingo Ciechowski дһ弴õ PostgreSQL 
   
     * [177]http://www.cis-computer.com/software/dbengine/ 
       
   й DBENGINE dbengine ǻ Postgres95 ֮Ľ棬ֻ軨
   ΪȡκִϿ⡣
   
   PHP ļбд Perl ԣ PerlAppGEN 
   WDB-P95 ҪΪÿһϿ⽨趨 (configuration files)
   ƺҪѧһµļ (meta language) á
   
   ߲ͬ㲻Ҫѧκرĳʽʹ dbengineҲ
   ÿϿⶼ趨㲻ҪϰЩ½ṹ
   õ dbengine ܣѧϰ Perl һ⡣
   
   ϵͳɼһӵϿһЩ趨ãй
   Ͽȡϡָ (virual fields)
   ʾөĻ֮ǰʱ㡣
   
15.3 PostgreSQL  Apache ŷģNeoSoft NeoWebScript

   Apache һĻŷһ PostgreSQL  Apache Ľģλ
   춡
     * [178]http://www.neosoft.com/neowebscript/
       
   NeoWebScript һѲͬӳ̶ȵĳʽǶ뵽 HTML ʽԡ
   
   Ҫһ NeoWebScript  HTML ҳʱ֧ NeoWebScript 
   ִǶ˵壬һԶݵҳ
   
   NeoWebScript ֱҳ HTML йǿŷΪĻʽ
   һ١ȫѧķ NeoWebScriptʹ˵
   (counter)ʱ (email forms)ǽֽǩ (guest books)ÿͼ¼
   ü򵥡뿴 NeoWebScript ԼPERL  JavaScript ıȽϡ
   
   Ļŷװ NeoWebScriptԱڿʼǰ
   Ķǵ Sysop FAQTheory of Operations NeoWebScript 
   Installation𲽽͡Management趨ִŷ
   ˣTestȷ NeoWebScript Troubleshootingŷ
   йء
   
   Լ ISPʹ NeoWebScript ȫ⣬ڵǼ
   ʱõȫִաǶ뵽ԼĲƷҵŷ
    SSLʹãֵ 99 Ԫ
   
   NeoWebScript һҳǶ Tcl/Tk Ϊ幤ߵ
   Apache ģ顣 Karl LehenbauerNeoSoft  Chief Technical Officer
    Neosoft ĳʽʦͼ׫Աдļǿܡ
   
   Apache еĻŷվʮ˰ʹá
   
   Tcl/Tk  Dr. John Ousterhout һǿɡƽ̨
   ԡ˵
   
   Tck/Tk Աʹ C  C++ ΪĹ߿ʮɹ
   ҲһΰĽˮ (glue language)ʹִĳʽͬ
   ͼ񻯺Ϳ Internet
   
   NeoSoft ˼ Chief Technical OfficerKarl Lehenbauer ڿʼʱ
    Tcl/Tk Ҳ Mark Diehkans һ Extended TclΪ
   TclX  NeoSoft TclԵĹܡܶ Tcl ĺָ
   Extended Tcl Dr. Ousterhout 뵽С
   
   NeoSoft Inc., 1770 St. James Place, Suite 500, Houston, TX 77056 USA
   
15.4 HTML  HEITML ŷһ PostgreSQL  4GL 

   heitml һ postgres άĽ档֪飬Ӵ
   

          Helmut Emmelmann H.E.I. Informationssyteme GmbH
          Wimpfenerstrasse 23 Tel. 49-621-795141
          68259 Mannheim Germany Fax. 49-621-795161

     * Mr.Helmut Emmelmann ĵʵַ [179]emmel@h-e-i.de
     * Heitml ҳ [180]http://www.heitml.com
     * Heitml ҳ [181]http://www.h-e-i.deom
       
   Heitml ͬʱ HTML ŷһ 4GL ԡҳдԱ
   HTML ķ HTML ǩдʽ
   
   Heitml "Hi"-TML HTML 켰һȫĵĴԣԻ
   Ϊĳʽֱ SQL Ͽеϣʹøӵ CGI 
   
   
   Heitml ŷ HTML̬ذѡ.heiתΪ HTML ʽʹ
   κݡϤõ HTML ﷨ṩԤȿ
   ıǩͳʽӦ CGI еĹ XML 㣬heitml ʹ
   Զǩ heitmlʹԶıǩɷΪ HTML ͸
   
   Heitml ͬʱ HTML ߺרҵĳʽʦΪĿꡣHTML ʦʹ
   heitml ǩ̬ҳȡ SQL Ͽ⣬άӦó
   ʽǼϿ (registration databases)Ѱ񡢵ʱ
   ײʽѡ (hierachical menus) ɵؼڴԪʽ
   (Component Libraries) Ԥ HTML ıǩ
   
   Գʽʦ˵heitml  HTML ǶĵĴʽԣ
   

          (e.g. <if>, <while>,  <let> ǩ)

   ͶԺʵִֵԪ (tuple) ıʽǿԪ
   Ĳο﷨ (reference semantics) ͬ԰㣬ڶѵ
   Heitml ڶѵеĸϽṹ Session Mode пڲ
   ͬҳά֡ҲԶǩ򻷾ǩ (environment tags)¶
    HTML ǩ
   
   heitml ʹп
   
   Ծ߽ṹģ黯 (structured and modular) ʽҳά
   š
   
   ǻۼҳݿɶ̬Ӧ衣
   
   Ƴʽʾ SQL ϿݣֻҪʹԤ 
   dbaǩ
   
   ʹ Session Variables ӵϿ⼰Ŀ¼ʽ
   
   Heitml ɾ CGI  Linux κλŷִУ Apache п
   ʹ apache API ʹִٶر죨 CGI ĹĿǰ֧Ԯ
   mSQLһ棩PostgreSQL棩mySQL the yard databases
   heitml  LinuxBSDiSolaris  SunOS ִУԼӴ NT 
   CGI  ISAPIODBCӴ 95 ʹá
   
   heitmlLinux 棩оҵԺ͸;ѵġҵվ踽
   Ȩѡ޵ĹðءҪע⣬ÿ㿪
   ġ.heiҳӡһѶϢָǷð汾Ǽ֮յһ
   룬ʹɹصѶϢ°װ
   
   heitmlHi-TMLжıǩĳʽ
   켰ǿ HTML Ĺܡʹ̬ݺϿʽ HTML г֣
   Ҫ CGI ⲿָʽԡҲ˵һ HTML ߿ҳǶ
   ӦóʽֻҪʹµıǩ CGI ʽơһ棬
   ʹ߻ʽʦɴ켰ǿıǩ⡣ʹ heitml  HTML
   ֺרҵʽʦʱáheitml άŷִм̬ز
   HTML heitml ͻ׼ݣҲκݡһṩ
   Ͽȡܣһʹ κβҪ CGI 
   heitml Ǹйرͽ (transaction) ϵͳоɹ
   ġ
   
   heitml ҳĿ̺ HTML ҳһʹֱ༭ HTML ༭Ҳ
   糣طάŷϡµҳɰ̬ heitml ǩʹ
   ǩ⡣ ʹЩǩȡϿ⡢̬ݡĳʣԿ
   ǿӦóʽǼϿ (registration database) ͹ϵͳ
   
   HTML ֺרҵʽʦһΪܹٶ׵ƾɵӦóʽ
   ǵĻǩʹøӶѧ CGI ȡ⹤ֻʹ
    dba ʽеĹ߱
   
   heitml ͬıǩ⣬ǩϿάʽĲ
   ѯǿĵʱҳĽײʽѡ (hierarchic menu)Щ
   ʹãֻҳϼ϶Ӧıǩ
   
   Ϊһоĳʽʦȫʹ heitml ĳ־ö̬Ԫܹ
   (persistent dynamic tuple architecture)heitml ж̬̬
   (dynamic typing)ȫܵı ʽ㡢ݻغͷḻĲɫ
   ԣҲ ̬ԪܹԶκδС session ϡ
   
15.5 PostgreSQL  America On-line AOL άŷ

   AOLserver 2.3 һѵҵάŷӵ PostgreSQL
   ֪飬뿴
     * AOL άŷҳ [182]http://www.aolserver.com
     * Philip Greenspun  AOLserver 
       [183]http://photo.net/wtr/aolserver/introduction-1.html
       
   AOLserver һ٣ȫ (multithreaded)֧Ԯ Tcl άŷ
   ֹ춴ˣһȫ֧ԮϿάƽ̨
   
   ʹ AOLserverй (pooled)  PostgreSQL RDBMSӣ
   ɲִͬ (threads) AOLserver  Tcl  C APIɿǿ
   Ķ̬ҳЩ 1995 꿪ʼ APL (AOLserver Public
   License)  GPL Ȩȫɵ
   
   ҳ˵Tcl API áAOLserver һǿ Tcl У
   ns_sendmailʣns_httpgetȡһ URL
   ns_schedule cron ĹܣŶʽضʱִУȵȡҲ
    Tcl API չ AOLserver Ĺܡÿһ AOLserver ŷ
   ӵ˽ҵ Tcl 塰ʽ⡱ AOLserver ͣø
   κҳʹõõ
   
   ַΪ AOLserver ҳ
     *  HMTL
     * .tcl ҳ ns_write  HTML  tcl ʽ
     * .adp ҳAOL Dynamic PagesԴ HTML ҳ <% %>
        <%= %> Ƕ Tcl 룬 PHP  ASP ơ
       
   Ȼ AOLserver һΰĵĻŷӵļܹĹâ
   ϿAOLserver ӵԼϿ (abstraction
   layer)ȫ޸ĳʽӵͬ RDBMSЩ RDBMS ǹ
   (pooled) (persistent)ɲõִܿЧ
   Դ
   
   AOLserver ӵҪ RDBMS ʽPostgreSQLOracleSybase
   InformixIllustraSolidInterbase  MySQL
   
15.6 PostgreSQL  / ƻ׷ϵͳʽ(Problem/Project Tracking System
Application Tool for PostgreSQL )

   
     * [184]http://www.homeport.org/~shevett/pts/
       
15.7  dbase  dbf ת PostgreSQL

   dbf2msql ʽ mSQL  PostgreSQL 졣·ҵ
     * [185]ftp://ftp.nerosworld.com/pub/SQL/dbf2sql/
     * [186]ftp://ftp.postgresql.org/pub/incoming/dbf2pg-3.0.tar.gz
       
   ʽ Faculty of Electrical Engineering TU Delft, NL Computer
   Architecture and Digital Technique section  Maarten Boekhold дɡ
     * [187]M.Boekhold@et.tudelft.nl
       
   Ҳʹ python ķ (method) ڶ dbf 뵽 postgres Ͽ
   
     * See [188]http://www.python.org
       
15.8 ΢ MDB Ͽת PostgreSQL

   ƻе MDB Tools һ麯ʽ͹߳ʽ춰΢ Access Ͽ
   mdb ûϿ⣬ OracelSybaseDB2Informix
   MySQLPostgreSQL ֮ࡣ
     *  [189]http://mdbtools.sourceforge.net ȡ MDB Tools
     * ̳ͨ
       [190]http://lists.sourceforge.net/mailman/listinfo/mdbtools-dev
       
16. PostgreSQL ĻϿ/ɹߡEARP

     * [191]http://www.oswego.edu/Earp
     * [192]ftp://ftp.oswego.edu ġpub/unix/earpĿ¼
       
16.1 EARP ʲ᣿

    David Dougherty ġEasily Adjustable Response ProgramEARP һ
    PostgreSQL ϿϵϵϿ/ʵʩߡܰ
   
     * һӾϵͳ
     * һ sendmail 档շʣ
     * һǿ˵ıơ
     * һ cgi ʽ
       
16.2 ʩ

   EARP Ҫʩһ http سʽִе CGI ԪȡϿŷ
   ƹ߶ʽУϣûеطҪơ
   Щ߱Ҫһ֧ԮͼƳ춱д
   Ǹݸ˺ö
   
16.3 ι

   EARP һҪɫʹķϿ
   html ҳ󲿷ҳ涼ÿĳЩ߲ȡһ
   ֣Щᱻҳ湤 (page tool) һɺе˳ (callable
   sequence) һҳáй HTMLѯȡʹ
   롢Ĳѯʽ (Extendable Formatting of Query
   and Input objects)Ļ߽ṩȽ
   ߰ʹߺͶѯߡ
   
   EARP һɫȽıжַƴȡ EARP ϵͳĲͬ֡
   ΪﵽȽıEARP ÿһӣȷÿԱ (ids)
   Ⱥ (groups)ֵͬĴȡ壬յϾܷȡ
   EARP һض֡⣬ʵʩЩɫֻһ֧Ԯѣʹ
   ֤ (user authentication)  http ŷ
   
16.4 δȡ EARP

   EARP ɼ (anonymous) ftp ȡá
     * [193]ftp://ftp.oswego.edu  'pub/unix/earp' Ŀ¼
       
17. PHP Hypertext PreProcessorPostgreSQL ŷ html Ƕ

   ά湤λ춡
     * [194]http://www.php.net
     * [195]http://www.vex.net/php
       
   PHP ҲһΪ Zend ıɴƱ֡ڿԺͳ
    ʱʹ PHP ԡ׼ʽʹʱʹ Zend Ѹ
   ִ ִе
   
   ǰΪ Professional Home PagesPHPڳΪ PHP Hypertext
   Pre-Processor
     * ܶӳվ̨Ϊ www.COUNTRYCODE.php.net
     * [196]http://www.fe.de.php.net
     * [197]http://www.sk.php.net
     * [198]http://php.iquest.net/
     * ɵʵ [199]rasmus@lerdorf.on.ca
       
   PHP һŷ html Ƕԡ .HTML м
   壬 JavaScript 㡣 JavaScript ͬPHP ŷ
   JavaScript һֿͻ˵ html Ƕԣ PHP ŷ
   PHP ĸ Netscape  LiveWire Pro Ʒơϲٸ
   ԴʽŻϲ PHP 3
   
     * ֧Ԯ PostgreSQL ĳʽ Adam Sussman д
       [200]asussman@vidya.com
       
17.1 Ҫɫ

     * ׼ CGIFastCGI  Apache ģ֧Ԯ Ϊһ׼ CGI ʽ
       PHP ִκ Unix ŷκ Unix ϰװ϶
        FastCGI ׼֧ԮPHP ɴеõٶϵĸơΪһ Apache
       ģ飬 PHP  CGI ʽһǿѡ
     * ȡ¼ (Access Logging)  PHP Ĵȡ¼ܣ߿ά
        (hit counting) ¼ȫϵͳļ¼
       Ҽʱȡ̡Log Viewer Script ṩ˸ӵеҳ
       ȡժҪ⣬׼ɱ趨Ϊÿҳһʾȡϵעš
       ҳĽβһӡ
     * ȡ (Access Control) һάΪڽ趨洦ȡ
       趨߿Ϊĳӵелҳ˭ܼ
       ĶйҳߵʵַԴļ
       (referring document)ҳ뱣ȫֹ¼
       (logging disabled) ¡
     * PostgreSQL ֧Ԯ Postgres һȽ RDBMS PHP߿
       ֱ .HTML  Ƕ PostgreSQL ġSQL ѯ
     * RFC-1867 ϴ֧Ԯ ϴ Netscape 2.0 ¹ܡ
       ѵϴάŷʹпɵԭʵʵ Mime 
       PHP ṩṩĿܣյϴĵЩõ¡
     * HTTP Ϊ֤ơ PHP  Apache άŷнԶ
        HTTP Ϊ֤ơ
     *  (Associative Arrays) PHP ֧Ԯ̬
        Perl ǿɼ GET  POST ҳ䴫ݡ
     * ʽWhile Ȧ PHP ֧Ԯһ C ȫָԡʹ
       if/then/elseif/else/endif ʽwhile Ȧ switch/case ָ
        html ҳʾ߼
     * 쳣ʽ ʽģʽԡģʽ滻 (pattern
       substitutions) һִPHP ֧Ԯгõĳʽ
     * ԭʼ HTTP ͷơ Ҫи߽վƣʹҳδԶ HTTP
       ͷǱġһ߳÷Ǵһ Location: URL ͷѿ
       ˴͵ URLҲ춹صȡҳҳϵġϴθ
       ͷ
     * ʱ GIF ͼ PHP ֧Ԯ Thomas Boutell  GD ͼʽ⣬ʹ
       ɼʱ GIF ͼ
     * ISPȫģʽ֧Ԯ PHP ֧Ԯһеġȫģʽ(Safe Mode)ʹ
       ͬһŷжûʹ PHP Ҳûȫ⡣
     * °汾 PHP ˺ܶ¹ܣҳ
       [201]http://www.php.net
     * ɵģ һҪԡ׼ȫɵġ GPL ʽ
       ȨΪκĿʹҵ;֪飬ο
       GNU General Public License ļ
       
17.2 PHPʷ

   ʱPHP һ Perl дСɼ򵥵 cgi װ (wrapper)װ
   Ϊ Personal Home Page ToolsΪ Personal Home Page
   Construction Kit
   
   һдҳǶ SQL ѯĹһ CGI
   װܷ (parsed) SQL ѯ򻯽ЩѯıбĹ
   ⹤ΪFI (Form Interpreter)
   
   PHP/FI 2.0 ȫд֮϶ΪһɰѼ򵥵
   Ƕ HTML С򵥵ֱǶ HTML УС
   Perl cgi ʽҪӿҳΪ fork  Perl Ѿ
   Ҳ˹վĹΪɰҳвַһ
   html С϶Ͽ֧ԮʹϿĿü򵥡ܶ
   Ƕѯȷֱ HTML  CGI 򵥵öࡣ
   
   PHP/FI ѸΪ PHP
   
17.3 ᣬ PHP ʲ᣿

   ʹ PHPȻע⵽ҳβҳٴε
   ڱʱѡȡ access loggingֻ PHP һС֡
   һҪɫΪһֱ cgi ʽ (form interpreter cgi)
   Ҳ FI ˼磬һҳнһ
   Ҫ һʽϵϡʹֻϴ͵һҳҲҪ
   cgi ʽİPHP ʹȡúʹϼΪס
   
17.4 һ򵥵ӡ

   һű
   
<FORM ACTION="/cgi-bin/php.cgi/~userid/display.html" METHOD=POST>
<INPUT TYPE="text" name="name">
<INPUT TYPE="text" name="age">
<INPUT TYPE="submit">
<FORM>

    display.html ɰƵĶ
   
< ?echo "Hi $ name, you are $ age years old!<p>" >

   򵥣PHP ԶΪÿλһ֮
   ACTION URL ʹЩ
   
   ҳʹñ֮ĲҳһЩ߼̱ǩ磬
   ʾͬѶϢʹ if/else ߼ӣ
   ǿɸı display.htmlʹòͬûʾ
   
<?
    if($age>50);
        echo "Hi $name, you are ancient!<p>";
    elseif($age>30);
        echo "Hi $name, you are very old!<p>";
    else;
        echo "Hi $name.";
    endif;
>

   PHP ṩһַǳǿԣ±ϼ򵥵Ӷܶࡣ
   ֪飬й PHP Script Language ½ڡ
   
   Ҳʹ PHP 趨ʲܿҳʹһڽ趨
   磬ָֻĳЩ˿ɿҳһЩ
   뱣ĳЩҳ֪飬й Access Control ½ڡ
   
   PHP Ҳκ RFC-1867 涨ϴĵɫʹ
   ϴֻԪ PHP Ĵȡƺ߼ܣȫƻ˭
   ϴʲᡣ֪飬й File Upload ½ڡ
   
   PHP ֧Ԯ PostgreSQL Ͽ׼֧Ԯ .HTML Ƕ SQL ѯ
   
   PHP ֧Ԯ mysql Ͽ׼֧Ԯ .HTML Ƕ SQL ѯ
   
17.5 CGI  (CGI Redirection)

  Apache 1.0.x ժҪ
  
   ʹ Apache ŷ cgi ģִ PHP һ÷ע
   ĸģ飬ʹ PHP  Apache ģ汾 (Apache module
   version)ģ顣һ Dave Andersen ġ
     * [202]angio@aros.net
       
   µطҵ
     * [203]ftp://ftp.aros.net/pub/util/apache/mod_cgi_redirect.c
       
   һѰ Apache УΪ mod_actions.cЩģ鼫Ϊƣֻ
   ÷Թܺ PHP ˳
   
   鿴 Apache ļμһģ顣һ˵ģƼӵһ
   Ϊ Configuration ĵСʹ mod_actions ģ飬Ҫӵһ
   ǡ
   
   Module action_module mod_actions.o
   
   ʹ mod_cgi_redirect ģ飬һ
   
   Module cgi_redirect_module mod_cgi_redirect.o
   
   ± httpd װҪ趨 cgi Ҫ mime.types 
   нµ mime ͣ srm.conf ʹ AddType ָ
   mime ͡ϵ mime Ӧơ
   
     application/x-httpd-php phtml

   ʹ mod_actions.c ģ飬 srm.conf мһС
   
     Action application/x-httpd-php /cgi-bin/php.cgi

   ʹ mod_cgi_redirect.c ģ飬 srm.conf мһС
   
     CgiRedirect application/x-httpd-php /cgi-bin/php.cgi

   Ҫͬʱʹ mod_actions.c  mod_cgi_redirect.c
   
   װȷ趨Щ cgi ģᣬֻ쵵Ϊ .phtml
   ָ⵵ PHP ⣬ srm.conf  DirectoryIndex 
   м index.phtmlϲҳԶ php  index
   Ϊ index.phtml
   
  Netscape HTTPD
  
   ɼ Netscape Server CGI Redirection ģָԶĳЩ쵵ĵ
   Ҫ PHPģ PHP ҳ File Archieves ҵ׼
    README ȷؽ趨 PHP
   
  NCSA HTTPD
  
   ĿǰNCSA ֧Ԯģ飬ԣҪʹ cgi ĻҪ޸ŷԴ
   ʽ롣һ NCSA 1.5 ⹤Ƕ PHP ҵ
   
17.6 ִָ PHP

   㽨 CGI 汾 PHPָֻ php.cgi filename
   filename ĵɽ PHP 壬ָֻĵ
   һдΪơ
   
    #!/usr/local/bin/php.cgi -q

   -qֹӡ HTTP ͷϲĻɲѡ
   
18. PostgreSQL  Python 

   Python һֱԡʹüףɵ﷨ֱ
   ľӣкܶ춽 GUI 졢άȵȡһǻ۵
    HotJavaڿУһžʮһ£ʽԱܶ
   ᡣPython İȨΪķ˹ص Stichting S Mathematisch
   Centrumɢ (classes)ģ顢
   (exceptions) Ķ̬롣ʹ C ϵͳʽֱӵ
   ʹ Python 趨ʱʹáPython һӵ X ĸߵ
   ԡ Linux е Python ׼󲿷ֱ׼ Python ģ飬Լ
    Tk  Tix widget ģ顣
   
   PyGreSQL һ PostgreSQL ϿĽ档Ƕ PostgreSQL ѯ
   ʽ⣬ʹ Python ָʹǿ PostgreSQL ʮּ򵥡PyGreSQL
    by D'Arcy J.M. Cain and Pascal Andre дɡ
     * PyGreSQL վ [204]http://www.druid.net/pygresql/
     * D'Arcy ά [205]http://www.druid.net/~darcy/
     * վ
       [206]ftp://ftp.via.ecp.fr/pub/python/contrib/Database/PyGres95.REA
       DME 
     * D'Arcy J.M. Cain [207]darcy@druid.net
     * Pascal Andre [208]andre@chimay.via.ecp.fr
     * Pascal Andre [209]andre@via.ecp.fr
       
18.1 ȡ PyGres

   ͬ׼վڡ
     * Python
       [210]ftp://ftp.python.org:/pub/www.python.org/1.5/python1.5b2.tar.
       gz
     * PyGreSQL [211]ftp://ftp.druid.net/pub/distrib/PyGreSQL-2.1.tgz
     * վ
       [212]ftp://ftp.via.ecp.fr/pub/python/contrib/Database/PyGres95-1.0
       b.tar.gz 
       
   ΣӦѰӽӳվ̨ԴЩվ̨
   PygreSQL Ҳ Python  PostgreSQL վ̨ contrib Ŀ¼ҵ
   
18.2 Ϻ֧Ԯ

   ҪЩ׼ϣ鿴ҳ
     * Python : [213]http://www.python.org/
     * PostgreSQL :
       [214]http://epoch.cs.berkeley.edu:8000/postgres95/index.html
     * PyGreSQL [215]ftp://ftp.druid.net/pub/distrib/PyGreSQL-2.1.tgz
     * PyGreSQL վ :
       [216]http://www.via.ecp.fr/via/products/pygres.html
       
   ֧Ԯ
     * PyGreSQL ̳ͨҪμӵĻɵ
       [217]majordomo@vex.net дsubscribe pygresql name@domain
       ѡname@domain ΪԼĵʵַ
     * Python  newsgroup comp.lang.python
     * PyGreSQL : г桢עͣ Andre
       [218]andre@via.ecp.fr
       
18.3  Python 

   ο [219] PythonPostgreSQL  һڡ
   
19. PostgreSQL άբ· (gateway) WDB-P95

19.1 й wdb-p95

   WDB-P95 - һ J. Douglas Dunlop  PostgreSQL Ͽά
   ڡ
     * J Rowe  WDB 
       [220]http://www.lava.net/beowulf/programming/wdb
     * °汾 WWW-WDB  [221]http://www.eol.ists.ca/~dunlop/wdb-p95/
     * ̳ͨ [222]dunlop@eol.ists.ca
       
   һ޸˵ wdb-1.3a2ṩһ PostgreSQL άբ·汾
   ҲҪܴ HTML ԭ wdb ޴Ҫ󣬵ҪԭҲѡ
   
   ɳ CASI Tape  Image Queryɿ Form Definition File
   (FDF)Ҳ춲 CASI Tape  Image Queryб
   (join)
   
   汾Ҫ춰װִ WDB-P95 Ϊ PostgreSQL ĵҪ
   ϵͳֲϿӦΪ򵥡֧Ԯ׼ SQL ӵ Perl 
   档
   
19.2 PostgreSQL ŷpgperl  httpd Ƿͬһԣ

   PostgreSQL ͬһԡ WDB-P95  httpd УҪͬһ
   ԡΪ WDB-P95 ʹ Pg.pmpgperl ҲҪͬһԡPgperl 
   libpq ʽдɣɴȡκ PostgreSQL ŷ
   PostgreSQL ͻ
   
   (άͻ (Netscape)) => (HTTP ŷ (NCSA's http) + WDB-P95 +
   pgperl + libpq)=> (PostgreSQL ŷ)
   
    () ԡ
   
   ÿԿǲͬ͡NTSUNHPҪִ WDB-P95 ĵ
   Ե libpq 溯ʽ⣬ΪҪ pgperlϵͳƳɻʹ
   HTML һ½άͻˡ
   
20. "C", "C++", ESQL/C Խ PostgreSQL λԪ (Bitwise Operators)

20.1 "C" 

   ѰɢУΪlibpq Oracle OCISybase DB-lib
   Informix CLIʽơ
   
20.2 "C++" 

   ѰɢУΪlibpq++ ο [223] libpq, libpq++ 
    һڡ
   
20.3 ESQL/C

   PostgreSQL ESQL/C 'Embedded C Pre-compiler'  Oracle Pro*C
   Informix ESQL/CPostgreSQL ESQL/C һ SQL Ӧóʽ (API)ʹ
   C ʽʦƿӵйϿӦóʽPostgreSQL
   ESQL/C ʹϤĵԶõṹѯ
   (SQL) ŵ㡣
   
   ESQL/C 
     * ESQL/C ʽṩϿŷĴȡ C ʽ
     * ESQL/C ͷṩ ESQL/C ʽõϽṹ;޼Ķ塣
     * ESQL/C ԤһѰ SQL ӵ C תΪִеԴʽԤ
        밴ӦΪѺǶʽ SQL  C תΪ׼ C 
        gcc Ϊִе⣬PostgreSQL  SQL API ӦΪ ecpg
       
       
   
     * PostgreSQL  ESQL/C ѰɢС
     * վ [224]ftp://ftp.lysator.liu.se/pub/linus
     * ʡ [225]linus@epact.se
       
   ο [226] ecpg  һڡ
   
20.4 PostgreSQL λԪԪ

   λԪԪ Nicolas Moldavsky д
     * [227]nico@overnet.com.ar
       
   ʵλԪ㣨ANDORXORλԪ (bitwise complement) pgsql
   Cʽɽ anonymous FTP õ
     * [228]ftp://ftp.overnet.com.ar/pub/utils/linux/bitpgsql.tgz
       
    Linux  Makefile
   
21. PostgreSQL ļ (Kanji Code)

   ַ
     * [229]ftp://ftp.sra.co.jp/pub/cmd/postgres/
       
22. ֲ PostgreSQL Ӵ 95 / Ӵ NT

   Ӵ NT  PostgreSQL Ԫµطҵ
     * Ӵ NT PostgreSQL Ԫ [230]http://www.askesis.nl
     * [231]http://www.postgresql.org
       
   ؿִеѹӵʮʼ [232]װ PostgreSQL
   
   ±ԭʽ룬ָʾ
   
   ֲ NT Ҫʹ Cygnus cygwin32 ׼Ӵ NT/95  gcc
   gmake
     * Cygwin 32 package  [233]http://www.cygnus.com/misc/gnu-win32 ҵ
       
   ҳȡ cdk.exe gnu-win32 ҽѹ 밴ô˹Ѹ
   Ϊ cygwinַΪ [234]http://sourceware.cygnus.com
   
22.1 NT 

   PostgreSQL NT Ϊ
     * Daniel Horak [235]horak@mmp.plzen-city.cz
     * Joost Kraaijeveld [236]JKraaijeveld@askesis.nl
     * Kevin Lo [237]kevlo@FreeBSD.org
     * NT ҳ
       [238]http://www.freebsd.org/~kevlo/postgres/portNT.html
       
22.2 װ Cygwin ׼

    1. 
       [239]ftp://go.cygnus.com/pub/sourceware.cygnus.com/cygwin/latest/f
       ull.exe
    2. ִ full.exeװ c:\Unix\Root Ŀ¼
    3. ִ Cygwin롮mount --helpĶļ -f ѡǿƹ
       ִ֮Сumount / " ͡mount c:\Unix\Root /
       
22.3 趨 Bash Ӵ

   װ Cygwin ׼ᣬ¹趨
   
   1. װ Vi ༭Vim
   [240]http://metalab.unc.edu/LDP/HOWTO/Vim-HOWTO.html
   
   2. cygwin bash ԤӴһإУɫΪɫӴҪ趨 bash 
   ĵɫʹСʼ->̨->MS DOS ̨ѵɫ趨ΪɫС
   ΪʮС
   
   һӴУıݡ
   
   3. ༭ c:\cygnus\cywinb20 е cygnus.bat 趨
     _________________________________________________________________
   
set HOME=c:\cygnus\cygwinb20
bash --login
     _________________________________________________________________
   
   ༭  /.bash_profile ⼸
     _________________________________________________________________
   
set -o vi
PATH=$PATH:/usr/local/bin:/usr/bin
export PATH
     _________________________________________________________________
   
   4. Ҫָʷ༭
   
   bash$ set -o vi
   
   ʹ lkjh vi ָ༭ָʷظ޸֮ǰָ
   Խʡʱ䡣
   
   5. ָϴŵ / Ŀ¼
     _________________________________________________________________
   
bash$ umount /
bash$ mount "c:\cygnus"  /
bash$ mount "c:\cygnus\cygwin-b20\postgres" /usr/local/pgsql
     _________________________________________________________________
   
   6. ָĶϸ
     _________________________________________________________________
   
bash$ mount --help
bash$ ls --help
     _________________________________________________________________
   
22.4 װ Andy Piper 

    1.  [241]ftp://ftp.xemacs.org/pub/xemacs/aux/ 
       cygwin-b20-local.tar.bz2  c:/Unix/Root directory.
    2. cd c:/Unix/Root; bunzip2 cygwin-b20-local.tar.bz2
    3. tar -xvf cygwin-b20-local.tar
    4. cd /local/bin; sh check_cygwin_setup.sh
    5. ɵĲᣬῴѶϢ
         _____________________________________________________________
       
You don't have /bin would you like to mount cygwin as /bin?"
[ y/n ]
ѡnѡy
         _____________________________________________________________
       
    6. mount c:/Unix/Root/cygwin-b20/H-i586-cygwin32/i586-cygwin32/bin
       /bin
    7. cd c:/Unix/Root/cygwin-b20/H-i586-cygwin32/i586-cygwin32; mkdir
       libexec share man etc sbin info
    8. cp -R /local/{ bin,libexec,share,man,etc,sbin,info,include }
       
22.5 װ Ludovic Lange  Cygwin32 IPC ׼

    1.  [242]http://www.multione.capgemini.fr/tools/pack_ipc 
       cygwin32_ipc-1.03.tgz  c:/Unix/Root directory.
    2. tar -zxvf cygwin32_ipc-1.03.tgz
    3. cd cygwin32_ipc-1.03/src and run 'make'
    4. mkdir -p c:/usr/local/{bin,include,lib,include/sys}
         _____________________________________________________________
       
cp /cygwin32_ipc-1.03/bin/* c:/usr/local/bin
cp /cygwin32_ipc-1.03/include/sys/* c:/usr/local/include/sys
cp /cygwin32_ipc-1.03/lib/* c:/usr/local/lib
cp c:/usr/local/bin/* /bin
cp c:/Unix/Root/cygwin-b20/H-i586-cygwin32/bin/* /bin
         _____________________________________________________________
       
    5. mount c:/usr/local/bin /usr/local/bin
         _____________________________________________________________
       
mount c:/usr/local/include /usr/local/include
mount c:/usr/local/lib /usr/local/lib
cp /local/lib/* /usr/local/lib
         _____________________________________________________________
       
22.6 װ PostgreSQL

    1. µ PostgreSQL Դʽ
    2. Postgres еԪԻ lf/cf ⣬Ҫڶ
       岽
         _____________________________________________________________
       
mkdir -p c:/Postgres/{Source,Binary}
mkdir c:/Postgres/Binary/pgsql
mkdir -p /usr/src/pgsql
mkdir -p /usr/local/pgsql
         _____________________________________________________________
       
    3.  Postgres Դʽ뿽 c:/Postgres/Source Ŀ¼֮ tar -zxvf
       postgresql-6.5.3.tar.gz
    4. mv postgresql-6.5.3 pgsql
    5. ڹϸĿ¼
         _____________________________________________________________
       
mount -b c:/Postgres/Binary/pgsql /usr/local/pgsql
mount c:/Postgres/Source/pgsql /usr/src/pgsql
mount c:/Unix/Root/cygwin-b20/share /sw/cygwin-b20/share
         _____________________________________________________________
       
    6. mkdir -p /usr/local/pgsql/{bin,include,lib,data}
    7. cd /usr/src/pgsql/src/win32
    8. ͷ
         _____________________________________________________________
       
cp un.h c:/Unix/Root/cygwin-b20/H-i586-cygwin32/i586-cygwin32/include/sys
cp endian.h c:/Unix/Root/cygwin-b20/H-i586-cygwin32/i586-cygwin32/include
cp tcp.h c:/Unix/Root/cygwin-b20/H-i586-cygwin32/i586-cygwin32/include/netinet
         _____________________________________________________________
       
    9. ln -s /usr/local/lib /usr/src/pgsql/src/backend/libpostgres.a
   10. cd /usr/src/pgsql/src, ִ֮ './configure'
   11. make > make.txt 2>&1
   12. make install > make.install.txt 2>&1
   13. cp /usr/local/pgsql/lib/pq.dll /usr/local/pgsql/bin
   14.  make install ֮Ҫ bin  lib Ŀ¼еֵת
       cr/lf  eof ֮ණ
   15.  / Ŀ¼ʹκα༭ .bashrc ¡
         _____________________________________________________________
       
PATH=$PATH:/usr/local/pgsql/bin:/usr/local/bin
PGDATA=/usr/local/pgsql/data
PGLIB=/usr/local/pgsql/lib
LD_LIBRARY_PATH=/usr/local/pgsql/lib:/usr/local/lib
export LD_LIBRARY_PATH PATH PGDATA PGLIB
         _____________________________________________________________
       
   16. source /.bashrc, ִ֮ 'initdb --username=xxxx' ҪעϿϵͳ
       ӵ˲ root/administrator
   17. ༭ /usr/local/pgsql/data/pg_hba.conf 
         _____________________________________________________________
       
host        all     163.17.11.109   255.255.255.0   trust
         _____________________________________________________________
       
   18. ipc-daemon.exe&
   19. postmaster -i&
   20. ִ ' psql -h host_name template1'
       
23. ̳ͨ

23.1 PostgreSQL ĵʻ

   µطȡѵ
     *  Yahoo [243]http://www.yahoo.com  e-mail
     * In Lycos [244]http://www.lycos.com  new e-mail accounts
     * In hotmail [245]http://www.hotmail.com  new e-mail accounts
       
    PostgreSQL ̳ͨ Yahoo һɫΪ PostgreSQL 
   Ŀ¼ĵʡѡĿ¼ Email- > Options- >
   Filters ѡ seperate folder for emailʻκ
   طշʣֻҪ
   
   ʣáMail FiltersԶ PostgreSQL ʼŵ
   Ŀ¼ҡ
   
23.2 Ӣ̳ͨ

   ҳ Mailing Lists Ŀ
     * [246]http://www.postgresql.org/
     *  [247]pgsql-questions@postgresql.org
     * Ա [248]pgsql-hackers@postgresql.org
     * йֲ [249]pgsql-ports@postgresql.org
     * ļ [250]pgsql-docs@postgresql.org
       
   һ֮ڴӵյ𰸻ظ
   
   ҲɶͨѶ̳ҪĻֹͣģ
     * [251]pgsql-questions-request@postgresql.org
     * [252]pgsql-hackers-request@postgresql.org
     * [253]pgsql-ports-request@postgresql.org
     * [254]pgsql-docs-request@postgresql.org
       
   ѶϢֻһ
   
   subscribe
   
   
   
   unsubscribe
   
23.3 ̳ͨ

   ̳ͨҲ html ʽµط
     *  MHonarc پ WWW ÿĿ¼
       [255]http://www.postgresql.org/mhonarc/pgsql-questions
     * [256]ftp://ftp.postgresql.org Ŀ¼ /pub/majordomo
       
   PostgreSQL ҳҲһרΪ pgsql Ѱ档
   
23.4 ̳ͨ

   Ŀǰһǹٷ PostgreSQL ̳ͨҪĵĻ
   
     * [257]majordomo@tlali.iztacala.unam.mx
       
   ѶϢֻһ
   
   inscripcion pgsql-ayuda
   
24. ļͲο

24.1 ûָ˵

   PostgreSQL ɢѰ¸ postscriptHTML ʽ  unix
   man-pages /usr/doc/postgresql* Ŀ¼С
   طҵļ [258]http://www.postgresql.org/docs
   
     * "Installation Guide"
     * "User Guide" for PostgreSQL
     * "Implementation Guide" ϸ˵ PostgreSQL Ͽڲ
     * ˵
     * HTML ʽ˵
     * Postscript ʽ˵飬ӡ
       
24.2 ļ

     * ڽ̬Ԫͽ˵
       
A Ƿ PSQL ָһ

     * ֧Ԯ SQL ؼ
       
Դʽ /tools Ŀ¼һ

     * ֧Ԯľ
       
ʹ psql \h ָ

     * PostgreSQL ĻĹʽϿʵʩӣѯ
       
       
 src/test е regression ԣ <ref id="Examples RPM">ҵ regr
ess/sql  suite/*.sql Ŀ¼

     * PostgreSQL ָ
       
SQL ָ src/tutorial Ŀ¼

       Ҳıļ¼ [259]Appendix B ġѧ SQL ָ
       
24.3 õĲο

     * "Understanding the New SQL: A Complete Guide" - Jim Melton  Alan
       R.Simon 
       
Morgan Kaufman Publisher һõ SQL 顣Ȿ SQL92 Ϊ׼

     * "A Guide to THE SQL STANDARD" - C.J.Date 
       

Addison-Wesley Publishing company Ҳһ顣й SQL 

     * SQL - The Standard Handbook, һžŶʮһ
       
Stephen Cannan  Gerard Otten
McGraw-Hill Book Company Europe , Berkshire, SL6 2QL, England

     * SQL Instant Reference, 1993
       
Martin Gruber, Technical Editor: Joe Celko
SYBEX Inc.  2021 Challenger Drive Alameda, CA 94501

     * C.J.Date, "An introduction to Database Systems" (),
       Addison-Wesley, 1995, ISBN 0-201-82458-2
       
ⱾϿϵͳʥⱾϸ˵滯 (normalization)SQL
ָ (recovery) (concurrency) (integrity)
ԭĹģʽ졢ϵͳģ͡Ҳ
οԹо󲿷ûƼ

     * Stefan Stanczyk, "Theory and Practice of Relational Databases",
       UCL Press Ltd, 1990, ISBN 1-857-28232-9
       
Ȿϸ˵ʽϿ⡢ϵ (relational algebra)ϵ (calculus)
滯ۡʵͽϸӵӡ󲿷ûƼ

     * "The Practical SQL Handbook" 棬 Addison Wesley Developers
       Press ISBN 0-201-44787-8
       
󲿷ûƼ

     * Michael Stonebraker, "Readings in Database Systems", Morgan
       Kaufmann, 1988, ISBN 0-934613-65-6
       
ǹȥйϿļǸһ߿ǽ׵ѧо
Ͽ⿪Ա

     * C.J.Date, "Relational Database - Selected Readings",
       Addison-Wesley, 1986, ISBN 0-201-14196-5
       
ǹȥйϿļǸһ߿ǽ׵ѧо
Ͽ⿪Ա

     * Nick Ryan  Dan Smith, "Database Systems Engineering",
       International Thomson Computer Press, 1995, ISBN 1-85032-115-9
       
Ȿ˵ȡʹ漼

     * Bipin C. Desai, "An introduction to Database Systems", West
       Publishing Co., 1990, ISBN 0-314-66771-7
       
Ǹһ߿ǽ׵ѧоϿ⿪Ա

     * Joe Celko "INSTANT SQL Programming"
       
Wrox Press Ltd.
Unit 16, 20 James Road, Tyseley
Birmingham, B11 2BA, England
1995

     * Michael Gorman "Database Management Systems: Understanding and
       Applying Database"
       
Technology
QED and John Wiley
1991

     * Michael Gorman "Enterprise Database for a Client/Server
       Environment" QED and John Wiley
       
˵ repository metamodels ϿӦóʽҪ ANSI
׼ SQL 1993 Ӧá

   ԰ټй SQL 飡꿴ɡ
   
24.4 ANSI/ISO SQL ļSQL 1992, SQL 1998

   ANSI/ISO SQL ļվҵ
     * [260]http://www.naiua.org/std-orgs.html
     * [261]http://www.ansi.org/docs  cat_c.html ѰҡDatabase
       SQL
     * SQL92 ׼ [262]http://www.jcc.com  sql_stnd.html
     * ANSI/ISO SQL 
       [263]http://www.contrib.andrew.cmu.edu/~shadow/sql.html ڴ
        SQL Ĳοϡ
       
24.5 ANSI/ISO SQL 1992 ﷨

   ıļĸ¼ [264]Appendix A
   
24.6 ANSI/ISO SQL 1998 ﷨

   SQL 1998 (SQL 3) ڿСοļġ;ȡ SQL3 ݰ
   [265]SQL 1998
   
24.7 ѧ SQL 

   οĸ¼ [266]Appendix B
   
24.8 SQL92 ʱ̬ (Temporal Extension)

     * SQL92 ʱ̬ļ [267]ftp://FTP.cs.arizona.edu/tsql/tsql2/
     * Temporal SQL-3  [268]ftp://FTP.cs.arizona.edu/tsql/tsql2/sql3/
       
   Ŀ¼аһ SQL-92 Թʱ̬졣ԱΪ TSQL2
   
   ԹԵհ汾
   
   ֱ TSQL2 ίԱϯRichard T.Snodgrass, Department of
   Computer Science, University of Arizona, Tucson, AZ 85721,
     * [269]rts@cs.arizona.edu
       
    TSQL2 Language Design Committee ĵʵַԹ
   һҵ
   
   Ŀ¼е¡
   
   spec.dvi,.ps TSQL2 Թһž³
   
   bookspec.ps TSQL2 Թ TSQL2 㣬һžʮ 
   ģ
   
   sql3 ύ ANSI  ISO SQL3 ί޶
   
   ԹһﻹռһЩйϵľۡṩӡ
   ʵԵۡЩԭǸ TSQL2 Language Design
   Committee Ľ顣һôṩй TSQL2 ӡƶ
   ʱĴȽ TSQL2 ͹ȥʮĴԡ
   ǿЩĿǰ TSQL2 Թһ֣ǶĲͷչ
   Թ TSQL2 վ
   
   ЩۣԹ֧ԮϣѾ
   
   Snodgrass, R.T., editor, The TSQL2 Temporal Query Language, Kluwer
   Academic Publishers, 1995, 674+xxiv ҳ
   
   һ¼˵ۣڴĿ¼е eval.ps ṩ
   
   tl2tsql2.pl һѻܵʱ̬߼ (temporal logic) Ϊ TSQL2 
   prolog ʽʽ Michael Boehlen дɡ
     * [270]boehlen@iesd.auc.dk
       
   λɽӴȡһݽ̵ⷭġʽľɰ汾°汾
   
     * [271]http://www.cs.auc.dk/general/DBS/tdb/TimeCenter/Software
       
   (the TimeDB and Tiger systems).
   
24.9 㲿֡ȡ ISO/ANSI SQL ļ

   ˵ΣϷأȡһ SQL-92 ׼ȡһݡʱ
   SQL3 ݰ
   
   ׼ȨУ ANSI ׼ĳΪ ANSIISO ׼ĳΪ ISO
   
   ʱ2 SQL ׼ֱ ANSI  ISO 档ݱ׼ÿֶһ
   ģ һһЩСڣļ⡢ҳס̾䡰International Standard
    American Standard֮ࡣ
   
    SQL-92 ׼
   
   The ISO standard, ISO/IEC 9075:1992, Information Technology - Database
   Languages - SQLĿǰһž£ ANSI дɵõ
   
     American National Standards Institute
     1430 Broadway
     New York, NY 10018 (USA)
     Phone (sales): +1.212.642.4900

   Ǯ US$230.00ANSI 棬ANSI X3.135-1992, American National Standard
   for Information Systems - Database Language SQLĿǰ޴Ӧÿ
   һžѮѮõļǮ US$225.00
   
    ANSI κһļҪ 7% ѣԼ US$9.10
   ʼĿ϶ANSI Ҫеݶһݹ˾ĸӡ
   Ԫһе֧Ʊǻڽĸ㡣
   ֯ ANSI Ĺ˾Ա (corporate member)ANSI ļĸ
   ˾Ǯ
   
   ⣬ISO ׼ҲɴΪ ISO (International Organization for
   Standardization)  IEC (International Electrotechnical Commission) 
   ԱıӪı׼֯򡣹Ӫַɴ
   ANSI ӪȡáҲɴ ISO õ
   
     International Organization for Standardization
     Central Secretariat
     1, rue de Varembi
     CH-1211 Genhve 20
     Switzerland

   Ըݵķ׼Ҫۡɴ֯
   US$308.00  ISO/IEC 9075:1992, Information Technology - Database
   Languages - SQL
   
     Global Engineering Documents
     2805 McGaw Ave
     Irvine, CA 92714 (USA)
     USA
     Phone (works from anywhere): +1.714.261.1455
     Phone (only in the USA): (800)854-7179

   Ҳ֪Ƿ˷ѣҹƣ룩ʻ˻շѡǻ
   Ϊݵذļĸ㣬ܡҪÿGlobal û ANSI 
   ûмǮʱ䣨Ԥ ANSI ֮ڳ֣
   Ǯӽ US$300.00
   
   һ SQL3 ݰ (Working Draft)
   
   ɴ ANSI X3 Secretariat, CBEMA (Computer and Business Equipment
   Manufacturers Association) һ SQL3 ݰĸӡͼȷ
   汾 SQL3 ݰ US$60.00  US$65.00 ۡ
   ;Ӵ CBEMA
   
     CBEMA, X3 Secretariat
     Attn: Lynn Barra
     1250 Eye St.
     Suite 200
     Washington, DC 20005 (USA)

   Lynn Barra ҲԵ绰 +1.202.626.5738 ӴҪһݣʼƺ
   ò
   
   Ӿȡ SQL3 ݰ
   
   °汾дʱΪ׼ SQL3ANSI  ISOݰи
   վ̨ԡanonymous ftpftpmailõ
   
     gatekeeper.dec.com

  

     /pub/standards/sql/

   Ŀ¼ж PostScript ʹֵʽۣ
   өĻرĶ
   
   һ˵ҵƵĵ
   
     sql-bindings-mar94.ps
     sql-bindings-mar94.txt
     sql-cli-mar94.ps
     sql-cli-mar94.txt
     sql-foundation-mar94.ps
     sql-foundation-mar94.txt
     sql-framework-mar94.ps
     sql-framework-mar94.txt
     sql-psm-mar94.ps
     sql-psm-mar94.txt

   °汾ļᣬmar94ı˵µĳڣ硰aug94
   ڡmar94֮İ汾
   
   ⣬Ϊչ˲ܴ FTP ȡõĶߣĿ¼зһΪ
   
     ls

   ĵ⵵棡Ŀ¼ڵĵ
   
    Ftp ֱӻõ
   
   ʹ FTP ӡر˵ӵ gatekeeper.dec.com
   ЩĿ¼ѵ͵ĵԡҪעĵĵҪܡ
   ǡftpĵʵַνanonymous ftpָ
   type binaryȷյĵûλԪȥgetһȡһ
   еעڽ <  >
   
  % ftp gatekeeper.dec.com
  Connected to gatekeeper.dec.com.
  220- *** /etc/motd.ftp ***
       Gatekeeper.DEC.COM is an unsupported service of DEC Corporate Research.
       <һᡭ>
  220 gatekeeper.dec.com FTP server (Version 5.83 Sat ... 1992) ready.
  Name (gatekeeper.dec.com:<ĵ>): ftp  <anonymous Ҳ>
  331 Guest login ok, send ident as password.
  Password: <ĵʵַ>
  230 Guest login ok, access restrictions apply.
  Remote system type is UNIX.  <>
  Using binary mode to transfer files.
  ftp> cd pub/standards/sql
  250 CWD command successful.
  ftp> dir
  200 PORT command successful.
  150 Opening ASCII mode data connection for /bin/ls.
  total 9529
  -r--r--r--  1 root     system     357782 Feb 25 10:18 x3h2-93-081.ps
  -r--r--r--  1 root     system     158782 Feb 25 10:19 x3h2-93-081.txt
  -r--r--r--  1 root     system     195202 Feb 25 10:20 x3h2-93-082.ps
  -r--r--r--  1 root     system      90900 Feb 25 10:20 x3h2-93-082.txt
  -r--r--r--  1 root     system    5856284 Feb 25 09:55 x3h2-93-091.ps
  -r--r--r--  1 root     system    3043687 Feb 25 09:57 x3h2-93-091.txt
  226 Transfer complete.
  ftp> type binary
  200 Type set to I.
  ftp> get x3h2-93-082.txt
  200 PORT command successful.
  150 Opening BINARY mode data connection for x3h2-93-082.txt (90900 bytes).
  226 Transfer complete.
  90900 bytes received in 0.53 seconds (166.11 Kbytes/s)
  ftp> quit
  % <⵵ѳΪĵе x3h2-93-082.txt>

   û ftp ֧Ԯȡõ
   
   Digital Equipment Corporation ˾ƣṩ ftp email 
   ҪлӦΪֱṩ˵ͬ ftp ķ
   ĵַΪ
   
   ftpmail@decwrl.dec.com
   
   ȡ°汾 SQL3 ļ PostScript 
   
     reply joe.programmer@imaginary-corp.com
     connect gatekeeper.dec.com anonymous
     binary
     compress
     uuencode
     chdir /pub/standards/sql
     get x3h2-93-091.ps
     quit

   һָŷҪѵ㣬Ҫ
   joe.programmer@imaginary-corp.comΪĵʵַеĵ
   x3h2-93-091.ps  uuencode ˵ compress ʽֳʮķʻظ
   Ļûṩ鵵ĹߣҪԴģʽȡ
   õ
   
     reply joe.programmer@imaginary-corp.com
     connect gatekeeper.dec.com anonymous
     chdir /pub/standards/sql
     get x3h2-93-091.ps
     quit

   ע⣬ .ps ŻᱻΪʮظ
   
   Ҫȡκβ x3h2-93-091.ps ĵֻѡx3h2-93-091.psΪ
   ҪĵơҪȡеѡx3h2-93-091.psΪdir
   
24.10 һ֡ISO/ANSI SQL ǰ

   й SQL ׼䵱ǰԴ
   
   ǰ
   
   ĿǰڽпԸĽ SQL ΪΪ (computationally
   complete language)Կ춳־áӵһ㻯רŻ
    (generalization and specialization hierarchies)༶̳ (multiple
   inheritance)Զ̬ (triggers) ж (assertions)֪ʶ
   ϵͳ֧Ԯ (support for knowledge based systems)صݲѯʽ (recursive
   query expression) ͸ϹߡҲ̬ (ADTs)
   ʶ (object identifiers) (methods)̳ (inheritance)
   (polymorphism)װ (encapsulation) ϹйصĹ
   ܵĹ
   
   һž＾SQL3 ֽһ ISO CD ͶƱ
   SQL/FrameworkSQL/Foundation  SQL/BindingsһϣͶƱ
   յԼŰٸһѮһ ISO DBL ༭ (editing
   meeting)˴ἰύ춸ôλ
   δܴۣ齫ӳ༭ɶһž£ص
   ׶ء
   
   ݹƣµı༭֮ᣬйЩֵ SQL 
   CD ͶƱ CD ̻ỨԼ£֮ DBL ༭顢DIS ͶƱ
   ݵ IS ͶƱ
   
   ISO ĳ SQL/92 ֮ıˣ SQL ίԱ̵顣
   
   ˳SQL3 Щֻ 1998 ڳΪٷ ISO/IEC ׼
   ʱǳȡ
   
   һž꣬ANSI  ISO ίԱ֮ SQL չΪಿֵı
   ׼Щְ
   
     * Part 1: Framework A non-technical description of how the document
       is structured.
     * Part 2: Foundation The core specification, including all of the
       new ADT features.
     * Part 3: SQL/CLI The Call Level Interface.
     * Part 4: SQL/PSM The stored procedures specification, including
       computational completeness.
     * Part 5: SQL/Bindings The Dynamic SQL and Embedded SQL bindings
       taken from SQL-92.
     * Part 6: SQL/XA An SQL specialization of the popular XA Interface
       developed by X/Open
     * Part 7:SQL/TemporalAdds time related capabilities to the SQL
       standards.
       
   SQL3 ͬʱ ANSI  (Domestic, "D") ר ISO ר
   Ŀǰʱһžžꡣ
   
   SQL/CLI  SQL/PSM ٶȴΪ SQL-92 ޶
   ֻ (International, "I") ר SQL/CLI һž
   ˡSQL/PSM Ӧû 1996 δɡ
   
    SQL3 ⣬һЩӵļƻ
   
     * SQL/MM An ongoing effort to define standard multi-media packages
       using the SQL3 ADT capabilities.
     * Remote Data Access (RDA)
       
   ׼ίԱ͹ (Standards Committee and Process)
   
   ʵϣж SQL ׼ίԱᡣISO һһ SQL ׼С
   Ҷ SQL ΪصίԱᡣЩңͨɳ
   ISO/IEC JTC1/SC 21/WG3 DBL 顣 ISO SQL ׼ƶĹǡ
   
     * 
     * 
     * ô
     * 
     * ¹
     * ձ
     * 
     * 
     * Ӣ
     * 
       
   NIST ȷ (NIST Validation)
   
   SQL ʵȷϹ National Institute of Standards and
   Training (NIST) СNIST Ŀǰһż (entry level) SQL-92 Ĳ
   ׼NIST ȷҪ鱻Ϊһ Federal Information Processing
   Standard (FIPS)Ŀǰ SQL Ҫ FIPS 127-2ļ
   Postscript ģʽɴ NIST ȡáĿǰͨ SQL ȷϵĲƷҲ
   NIST ȡá
   
   ׼ SQL ļ (Standard SQL Publications and Articles)
   
   汾 SQL ׼ɴ ANSI ȡá
   
     * ISO/IEC 9075:1992, "Information Technology --- Database Languages
       --- SQL"
     * ANSI X3.135-1992, "Database Language SQL"
       
   Ͷ׼Ĳο⣬SQL ׼汾ȫһ汾ɴ
    طȡá
   
     American National Standards Institute
     1430 Broadway
     New York, NY 10018
     USA
     Phone (sales): +1.212.642.4900

    SQL-92 ׼⣬ڻһݼ (Technical Corrigendum) 
   
   
   * Technical Corrigendum 1:1994 to ISO/IEC 9075:1992

   TC 1 Ӧÿɴ ANSI ȡáTC 1 ֻ ISO 汾 ISO  ANSI 
    SQL-92
   
   ׼⣬Ҳй 1992 SQL ׼顣Щṩһʵʱ׼
   
   
   йصı׼
   
   SQL ȺҲԶ׼ȤڰһЩйЩŬָ롣
   ϳᣬҲ
   
     * SQL Environments (FIPS 193)
     * Next Generation Repository Systems (X3H4) - һݺ
       "Developing Standards for the Next Generation Repository Systems"
       Ÿ塣
       
24.11 ڶ֡ISO/ANSI SQL  (ISO/ANSI SQL Foundation)

   SQL3 ŬһҪ SQL ļС
   
     *  SQL/PSM  SQL/PSM-92
     * µ̬
     *  (Triggers)
     * б (Subtables)
     * ̬ (Abstract Data Types, ADT)
     * 
       
   ȾҪ
   
     * 帴
     * ѸӵϿ
     * ⲿЩ SQL Ҫ湵ͨ
       
   ЩѶΪ SQL/PSM һ
   
   д SQL ģͣʹ ODMG ģͿ롣Ŭ
    X3H2  ISO DBL  SQL3  ODMG SQL3/OQL
   Merger ĸ°Ҳɵõ
   
   SQL3 ʱ
   
   й SQL3 ĹڽУձ׼дų֡
   
     * ͶƱ SQL3 ӲݰΪίԱݰ (Committee Draft, CD) 
       һž＾С
     * ͶƱ
     * Ҫڶ CD ͶƱ
     * Draft International Standard ͶƱ 1998 н
     * ʱ׼һžž
       
   ANSI ı׼ıҲࡣ
   
24.12 ֡ISO/ANSI SQL м (Call Level Interface)

   SQL/CLI һֶ SQL Ͽĺм档Ϊ֧Ԯ
   (shrink-wrapped) ӦóʽCLI ԭ SQL Access Group (SAG) һС
   ίԱᴴ졣 SAG/CLI  1992 ΢ Open DataBase Connectivity
   (ODBC) 񹫲һž꣬SAG  CLI ύ ANSI  ISO SQL ίԱ
   (SQL Access Group ѽϵ X/Open consortium С)
   
   SQL/CLI ṩĹʱ׼
   
     * ʵ CLI ȡ SQL Ͽ
     * ӹ (Client-server tools) ׼̬ắʽȡϿ
     * ֧Ԯḻӹ
       
   SQL/CLI ʱ
   
   Ա׼Ŀ̣SQL/CLI Ծ˵ٶȴС
   
     * SQL/CLI Ƕ 1992 SQL ׼SQL-92Ĳ
     * һžɣΪ ISO ׼
     * ISO/IEC 9075-3:1995 Information technology -- Database languages
       -- SQL -- Part 3: Call-Level Interface (SQL/CLI)
     * Ŀǰ SQL/CLI Ŭ SQL3 
       
24.13 Ĳ֡ ISO/ANSI SQL ־ôģ (Persistent Stored Modules)

   SQL/PSM ¹ SQL
   
     *  (Procedural language) 
     *  (Multi-statement) ʹ
     * ⲿ (External function and procedure calls)
       
   ΪмֵӦóʽߣSQL/PSM Ϊ SQL3 ṩĻ
   ֧Ԯ
   
   ʹ
   
   ʹΪӻṩֺô
   
     * ֡춴ִж SQL 䣬ͻĹͨɼ١
     * ߿ȨһбûȨֱӸ¡
     * ʽÿȡϿͻ߶дԴĳʽ
       
     * ơΪӦóʽִṩһĶͿơ
       
   
   
   Լƺ̼Ϊ SQL ϴͳʽԵĹܡ
   
   
   
     * If-then-else
     * Ȧṹ (Looping constructs)
     * ⴦ (Exception handling)
     * Case 
     * Begin-End 
       
   컹̼ɡ
   
     * 
     * Set 䣬춸ֵ (assignment)
     * ȡó״̬
       
   ⣬дͳ SQL ԶɰڶĳС
   
   ⲿ
   
   һڴϿƷ wish lists г֣вʵɫ
   дϿĳ
   
     * ĳʽӦóʽԼϿ⺯
     * ϿӦóʽʹ
       
   ⹦ܵĺôϿ⣨˰ϿӦóʽʹ÷ḻĳͺ
    òһ׼֯
   
   SQL/PSM ʱ
   
   SQL/PSM չѸ١
   
     * SQL/PSM  SQL-92 Ĳ
     * йذ SQL/PSM ӹʱ׼ĲݰΪʱ׼ĹͶƱһžһ
       ɡ
     * һžµı༭δܽ
     * PSM ༭鰲һžʮʮڼؿ
     * Žȣ PSM пһž
     * ٷΪ ISO/IEC DIS 9075-4:199? Information technology --
       Database languages -- SQL -- Part 4: SQL Persistent Stored Modules
       (SQL/PSM)
     * Ϊ SQL3  SQL/PSM ֧Ԯ
       
24.14 岿֡ ISO/ANSI SQL/ (Bindings)

   ΪοʽԵĽϱɶļĿǰİ汾 SQL-92 
   ̬Ƕ (dynamic and embedded bindings) Ľ¼
   
   ʽԽвͬд
   
   Դͳʽ˵̬ SQL-92 ĿԻӦ SQL 
   ͳʽԱ֮ĶӦ붨塣
   
   ˵Ŀǰ SQL ̬SQL ģͺʽ
   ֮ ĶӦϵ붨塣
   
   ģڹЩ֮ǰȶ
   
   ԽʱΪ SQL3 һ֡
   
24.15 ֡ISO/ANSI SQL XA  SQL/XA

   Ϊܽ׹Ա (global Transaction Manager)  SQL ԴԱ
   (SQL Resource Manager) ֮Ӧóʽ (API) ṩ׼
   ISO/IEC 10026 ݣɢ״ (Distributed Transaction
   Processing׼УSQL ԴԱ֧Ԯֶ׶εȷ
   (two-phase commit)ļԾ X/Open ׼һ X/Open 
   ָ xa_close, xa_commit, xa_complete, xa_end, xa_forget,
   xa_open, xa_prepare, xa_recover, xa_rollback  xa_start ȶ
   SQL ̬﷨
   
   ISO ĿǰԾ׷ (fast-tract) X/Open XA ԭⲻ
   һĿǰҵ ISO SC21JTC 1 ȼ XA ׷ͶƱһž
   ¶ʮտʼһžʮ¶ʮս XA  75% Ʊ
    2/3  JTC 1 p-members ׼Ϊһʱ׼׷
   ͶƱ׼SQL/XA  1996 Ϊ׼
   
24.16 ߲֡ʱ̬ ISO/ANSI SQL

   ʱ̬ SQL ʱйصϡǲѯ϶֪һضʱ
   õġʱ̬ SQL һ Rick Snodgrass һžʮд
   ļ
   
   X3 ȷһ¼ƻISO/IEC 9075 Part 7: SQL/Temporal һݹ
   SQL/Temporal Ÿ
   
----------------------------------------------------------------------------
                                Temporal SQL
                                ************
Rick SnodgrassTSQL2 ίԱϯ
31-Dec-1994

   ʹ SQL 3 Ըʱ֧Ԯ⣨ DBL R10-75 飬Ҫ
   SQL µĲʱԵϿ⣩۵ǳ̬ (ADT's) 
   ֧Ԯʱ̬ѶԵĿʹþ֤ӵг̬λ
   ܴʱ̬ѯر˵ܶʱԵĲѯǺ SQL ģ⣬
   ڹʹǶʽ SQLѡ TSQL2һ SQL-92 ʱ̬
   ˡ
   
  
  
   Чʱ (Valid-time) ֧Ԯһʱ̬ ADT ʹߣһλ
   ָΪʱ̬ DATE  INTERVALӣЧʱ䣬
   ÿʱı䣬 ΪʵϸıˡϵһЧʱĳе
   ʱ (timestamp)ᱻѯΪиֵЧʱ
   ʱʹòѯԼر
   
  оʱ
  
   The University of Arizona  Office of Appointed Personnel Ͽ
   ЩϣԱ֡ĿǰнĿǰְλЩһ򵥵ı
   
   
        Employee(Name, Salary, Title)

   ʹѰһԱнʮּ򵥡
   
        SELECT Salary
        FROM Employee
        WHERE Name = 'Bob'

    OAP ټ¼ڡΪЩڱмһ¸Ŀ
   (schema)
   
        Employee(Name, Salary, Title, DateofBirth DATE)

   ѰһԱĳڸѰнơ
   
        SELECT DateofBirth
        FROM Employee
        WHERE Name = 'Bob'

  оʷ
  
   OAP ܹʷԻΪˣǼһָʾеϺʱ
   ʼЧ һָϺʱʧЧ
   
   Employee (Name, Salary, Title, DateofBirth, Start DATE, Stop DATE)
   
   ģ (data model) ˵Щλ DateofBirth ޷ֱ𡣲
   ǵ ڲֽ
   
  оͶӳ (Projection)
  
   ҪҳԱĿǰнΪѡ
   
        SELECT Salary
        FROM Employee
        WHERE Name = 'Bob' AND Start <= CURRENT_DATE AND CURRENT_DATE <= Stop

   ѯ֮ǰĸӡԪ׺OAP 뷢нʷԱ
   رأҪҳÿһԱһнʱ䡣ҵأ
   SQL һԱнڼְοжα
   
Name    Salary  Title             DateofBirth   Start           Stop
----    ------  -----             -----------   -----           ----
Bob     60000   Assistant Provost 1945-04-09    1993-01-01      1993-05-30
Bob     70000   Assistant Provost 1945-04-09    1993-06-01      1993-09-30
Bob     70000   Provost           1945-04-09    1993-10-01      1994-01-31
Bob     70000   Professor         1945-04-09    1994-02-01      1994-12-31

                               ͼ 1

   Ҫע Bob нͣ $70,000ԣӦ Bob С
   
Name    Salary  Start           Stop
----    ------  -----           ----
Bob     60000   1993-01-01      1993-05-30
Bob     70000   1993-06-01      1994-12-31

   һǰнְӡߣҳнʱⷽ
   Ȳ಻ʵʡһǾʹ SQL
   
CREATE TABLE Temp(Salary, Start, Stop)
AS      SELECT Salary, Start, Stop
        FROM Employee;

   repeat
   
        UPDATE Temp T1
        SET (T1.Stop) = (SELECT MAX(T2.Stop)
                         FROM Temp AS T2
                         WHERE T1.Salary = T2.Salary AND T1.Start < T2.Start
                                AND T1.Stop >= T2.Start AND T1.Stop < T2.Stop)
        WHERE EXISTS (SELECT *
                      FROM Temp AS T2
                      WHERE T1.Salary = T2.Salary AND T1.Start < T2.Start
                                AND T1.Stop >= T2.Start AND T1.Stop < T2.Stop)
        until no rows updated;

DELETE FROM Temp T1

WHERE EXISTS (SELECT *
              FROM Temp AS T2
              WHERE T1.Salary = T2.Salary
                        AND ((T1.Start > T2.Start AND T1.Stop <= T2.Stop)
                        OR (T1.Start >= T2.Start AND T1.Stop < T2.Stop))

   ȦҳصڶҪϲʱΡȦִ log N 
   N ָһصڵͬн¼߿ģѯ
   ִ֤ȷԡ
   
   ַʹ SQL Ϊһα (cursor)Ϊÿнһ
    (linked list)ʼʱΪհס
   
DECLARE emp_cursor CURSOR FOR
        SELECT Salary, Title, Start, Stop
        FROM Employee;
OPEN emp_cursor;
loop:
        FETCH emp_cursor INTO :salary, :start, :stop;
        if no-data returned then goto finished;
        find position in linked list to insert this information;
        goto loop;
finished:
CLOSE emp_cursor;

   ظӡںн
   
   α ORDER BY StartǱҪ
   
   Σһ򵥵Ĳѯǲ SQL-92 ĹܱĿġʹ TSQL2
    ѯܼ򵥡
   
        SELECT Salary
        FROM Employee

  о (JOIN)
  
   һķǰѸĿнְϷֿӶܿ
   ȡ нʷʱ⡣Ϊƣвٿǳ
   
   
        Employee1 (Name, Salary, Start DATE, Stop DATE)
        Employee2 (Name, Title, Start DATE, Stop DATE)

   Employee1 ¡
   
Name    Salary  Start           Stop
----    ------  -----           ----
Bob     60000   1993-01-01      1993-05-30
Bob     70000   1993-06-01      1993-12-31

    Employee2 
   
Name    Title                   Start           Stop
----    ------                  -----           ----
Bob     Assistant Provost       1993-01-01      1993-09-30
Bob     Provost                 1993-10-01      1994-01-31
Bob     Professor               1994-02-01      1994-12-31

   ı֮ᣬȡùԱнϱü򵥡
   
        SELECT Salary, Start, Stop
        FROM Employee1
        WHERE Name = 'Bob'

    OAP һанְλʱΣ OAP һͼ 1 ʽ
   񣩣һӡ񣬶ҳйϡһȫʹ
    SQLҵأѯҪ Employee1 ÿк Employee2 ص
   ֿܳ֡
   
SELECT Employee1.Name, Salary, Dept, Employee1.Start, Employee1.Stop
FROM Employee1, Employee2
WHERE Employee1.Name = Employee2.Name
     AND Employee2.Start <= Employee1.Start AND Employee1.Stop < Employee2.Stop
UNION
SELECT Employee1.Name, Salary, Dept, Employee1.Start, Employee2.Stop
FROM Employee1, Employee2
WHERE Employee1.Name = Employee2.Name
     AND Employee1.Start >= Employee2.Start AND Employee2.Stop < Employee1.Stop
        AND Employee1.Start < Employee2.Stop
UNION
SELECT Employee1.Name, Salary, Dept, Employee2.Start, Employee1.Stop
FROM Employee1, Employee2
WHERE Employee1.Name = Employee2.Name
     AND Employee2.Start > Employee1.Start AND Employee1.Stop < Employee2.Stop
        AND Employee2.Start < Employee1.Stop
UNION
SELECT Employee1.Name, Salary, Dept, Employee2.Start, Employee2.Stop
FROM Employee1, Employee2
WHERE Employee1.Name = Employee2.Name
     AND Employee2.Start > Employee1.Start AND Employee2.Stop < Employee1.Stop

   ȷҳһսԵĹʹ TSQL2һʱ̬
   
   
        SELECT Employee1.Name, Salary, Dept
        FROM Employee1, Employee2
        WHERE Employee1.Name = Employee2.Name

  оۼ (AGGREGATES)
  
    OAP ʼнʲ᣿ʱǰܼ򵥡
   
        SELECT MAX(Salary)
        FROM Employee

   ڼнʷҪҳͬʱнʷ⵱Ȼ SQL 
   ṩʱ̬ľۼ򵥵ķӡйϣҳֵһ
   ȡɣһʱ (snapshot) ۼѯתΪʹþۼĲѯ
   תΪʱ̬ۼǸʹþۼĲѯҳֵн
   
        SELECT Salary
        FROM Employee AS E1
        WHERE NOT EXISTS (SELECT *
                          FROM Employee AS E2
                          WHERE E2.Salary > E1.Salary)

   ѯΪʱ̬ѯǳһַ
   
CREATE TABLE Temp (Salary, Start, Stop)
AS      SELECT Salary, Start, Stop
        FROM Employee;
INSERT INTO Temp
        SELECT T.Salary, T.Start, E.Start
        FROM Temp AS T, Employee AS E
        WHERE E.Start >= T.Start AND E.Start < T.Stop AND E.Salary > T.Salary;

INSERT INTO Temp
        SELECT T.Salary, T.Stop, E.Stop
        FROM Temp AS T, Employee AS E
        WHERE E.Stop > T.Start AND E.Stop <= T.Stop AND E.Salary > T.Salary;
DELETE FROM Temp T
WHERE EXISTS (SELECT *
              FROM Employee AS E
              WHERE ((T.Start => E.Start AND T.Start < E.Stop)
                        OR (E.Start >= T.Start AND E.Start < T.Stop))
                    AND E.Salary > T.Salary;

   ⷽмʱصֵϡ²
   ֮ǰӲѯҳļ¼ɾӰ쵽 NOT EXISTS
   ӸҳʱΣ֮ǰҳнѶ㡣ϣ
    SQL ִʱЧʷǳͣΪЩӵĳ״Ȳѯ
   
   Ǿ SQLõαҳʷ
   
   ʹ TSQL2 ٴμֱӡ
   
        SELECT MAX(Salary)
        FROM Employee

  ժҪ
  
   󲿷ϿӦóʽҪʱıϡЧʱ SQL ֧Ԯ
   ܶʱ̬ѯǺ SQL ģ⣬Ҫ SQL Ƕ뵽У
   Ϊ SQL ģͺͲѯԽṹȱЧʱ֧Ԯ
   
   һ棬ʾЧʱ֧ԮҪ DBMS ʩһЩı䣬
   ϷԵؼһЩѯʹѯпܡҲ춴ṹ
   ѻ (optimization)ѻĲԿɵ±ִ
   
    SQL3 һ²֧ԮʱıϣǿԿӦã
    SQL3 ʱ̬ϵ
   
----------------------------------------------------------------------------
           Accredited Standards Committee* X3, Information Technology
NEWS RELEASE

ļš       PR/96-0002

ظ       Barbara Bennett at bbennett@itic.nw.dc.us

             X3 Ͽһר, ISO/IEC 9075 Part 7:  SQL/Temporal

Washington D.C., 1996 һ
----------------------------------------------------------------------------

   -- Accredited Standards Committee X3, Information Technology Ͽһ
   й SQL/Temporal ֧ԮרISO/IEC 9075 Part 7йع
   Technical Committee X3H2, Databaseеı׼ֵ SQL3
   ׼һ²֣߲ Temporal SQL Ϊ SQL һ죬 SQL 
   Ͽ⻷֧Ԯȡʹʱ̬ϡ´ X3H2 鶨һžʮ
   һʮڿ˹ (Kansas) С
   
   вѯʼ
   
        Chairman of X3H2,
        Dr. Donald R. Deutsch,
        Sybase, Inc., Suite 800,
        6550 Rock Spring
        Drive, Bethesda, MD  20817.
        Email: deutsch@sybase.com.

   ѰܵרǡȨ̱꣩йϼĽ
   
        X3 Secretariat at
        1250 Eye Street
        NW, Suite 200,
        Washington DC  20005.
        Email: x3sec@itic.nw.dc.us
        FAX:  (202)638-4922.

24.17 ڰ˲֡ISO/ANSI SQL MULTIMEDIA (SQL/MM)

   һΪ춶ýӦóʽ SQL ʽ ISO/IEC ʱ׼
   һžڻ׼С±׼жΪ SQL Multimedia
   (SQL/MM)òе SQL3 еĳ̬ADTĿָ
   SQL ADT װ SQL/MM ĿΪ׼ѧ͹̡ȫĺļ
   ýӰֺ¼⡣һ
    JTC1 ׼֯йļ SC18Ӱ SC24ƬͶͼ
    SC29 SQL Խ (binding)
   
   SQL/MM רƻָΪһݶಿֱ׼Ĳ֡һ
   ֻνɵĿܡÿֻרעһض SQL Ӧó
   ʽ׼Ϊһž´ڵ SQL/MM ֡
   
     * Part 1: Framework A non-technical description of how the document
       is structured.
     * Part 2: Full Text Methods and ADTs for text data processing. About
       45 pages.
     * Part 3: Spatial Methods and ADTs for spatial data management.
       About 200 pages with active contributions from Spatial Data
       experts from 3 national bodies.
     * Part 4: General Purpose Methods and ADTs for complex numbers,
       Facilities include trig and exponential functions, vectors, sets,
       etc. Currently about 90 pages.
       
   жйؿռ͵ϵı׼ĹڽС
   
     * ANSI X3L1 - Geographic Information Systems. Unisys  Mark
       Ashworth of Unisys  X3L1  ANSI X3H2 ˡ Ҳ SQL/MM
       ݸһĲֵı༭
     * ISO TC 211 - Geographic information/Geomatics
       
25. PostgreSQL ļ֧Ԯ

   κμϵʽѣɵ
     * [272]pgsql-questions@postgresql.org
     *  [273]comp.databases.postgresql.general
     *  [274]comp.databases.postgresql.hackers
     *  [275]comp.databases.postgresql.doc
     *  [276]comp.databases.postgresql.bugs
     *  [277]linux.postgres
     * ̳ͨ [278]http://www.postgresql.org
       
   ԤһյظΪƷûΧܹ㣬ûֻ
   Ϊ԰ûṩ֧Ԯ֧Ԯȵ绰֧Ԯö࣬
   ΪɼºϴѶϢʽȵȣֿ״͵̳ͨ / 
   顣
   
25.1 ҵ֧Ԯ

   PostgreSQL ֯Ҳ˾ۼ֧ԮάصĶ
   ӳվ̨ά ftpҲӡļָ鼮԰˿͡
   ַΪ [279]http://www.postresql.org
   
   һΪGreat Bridge Corporation PostgreSQL Ŀۺ
   ֧ԮǵҳΪ [280]http://www.greatbridge.comһ
   Landmark Communications corpͶʹ˾Ĺ˾ר
   ҵ˾֧Ԯ PostgreSQL
   
   Ҳ RedhatAndersonWGSWork Group Solutionsרҵеõ
   ǰΪкܺõ CC++ רң PostgreSQL  C д
   ɣ
     * Redhat ˾Ͽʲ [281]http://www.redhat.com
     * Work Group Solutions [282]http://www.wgs.com
     * Anderson Consulting [283]http://www.ac.com
       
26. úҵ

   ҵϿɽܶ˰ݡۡáᱣϡҽƱ˰Ա
   ϡԱгƹ͹ѡЩöֱ
   ϿĿ춸ϿƷʺͼ㹺һҵϿ⣬
   һֵĽ˷˰оɱȵط
   
   ңҵϿ֧͹ Unix װάЩɱ
   ת޸û
   
   ҵϿȣPostgreSQL ӵֱ˰ŵ㣬Ϊǻ
   һȺΪ PostgreSQL Ŀҳס磬һӣ
   һ乫˾ÿ䶼ʮԪ PostgreSQL ˵ﳬֵÿ
   õһǧԪǻħ
   
   ĿǰPostgreSQL ԴʽдԼ 250,000  CC++ ʽÿ C ʽ
   ֵԪ PostgreSQL ֵʮԪ
   
   ܶ๫˾ѿ CC++ ʽáˣ PostgreSQL Դʽ
   뻥˾Թ˾棬ʡʱ
   
27. Ͽ

   г UnixLinux  SQL Ͽ⡣
     * ѡ Applications->databases.
       [284]http://www.caldera.com/tech-ref/linuxapps/linapps.html
     * ѡ Applications->databases.
       [285]http://www.xnet.com/~blatura/linapps.shtml
     * ϿԴ [286]http://linas.org/linux/db.html  Linas
       Vepstas дɵġ [287]linas@fc.net
     * Ͽ
       [288]http://cuiwww.unige.ch:80/~scg/FreeDB/FreeDB.list.html
     * Browne  RDBMS  [289]http://www.hex.net/~cbbrowne/rdbms.html
        Christopher B. Browne дɡ [290]cbbrowne@hex.net
     * SAL ʽ RDBMS  [291]http://SAL.KachinaTech.COM/H/1/
     * SAL  DBMS  [292]http://SAL.KachinaTech.COM/H/2/
     * SAL's ĹߺϿ [293]http://SAL.KachinaTech.COM/H/3/
     * ACM SIGMOD ڿȡõϿ
       [294]http://bunny.cs.uiuc.edu/sigmod/databaseSoftware/
       
28. άѰʾ

   ǳӵд·һѶȫÿٷ
   ֮ٵٶݹƣȫдԼһǧվ
   
   ҪѰϣҪŻLycos Ѱ档ȥŻѡ search
   ʹùѡ (filtering options) խѰҪԤѰ
   Intelligent searchȽһ㻯гпԡѡOptionsѡ
   EXACT phraseѰANDѰORѰȵȡɸҵ
   ҪѶϢ⣬ search Ŀ¼£ radio buttons ѡѰ
   վŻվ
   
29. 

   оɺͿȡԴʽϿᣬֵֻ PostgreSQL 
   졢ʹúȫ SQL RDMSʽ
   
   PostgreSQL ǳΪкܶ๤ɡ ODBC  JDBC ʽ
   ЩԱдϿӦóʽ ODBC  JDBC ʽд
   PostgreSQL ӦóʽֲϿ⣬ OracleSybase 
   Informix֮Ȼ
   
   ܻʡΪʲ PostgreSQLΪ㿪ʼһϿ
   ʱ䣬ѡһϿϵͳϺʶ
   
   һ
     * ȡԴʽǿųʽϵͳ
     * ûиȨ־ (license string)ûӵȨ־䣨밴
       PostgreSQL  GPL ȨЭ顣ûȨ־䣬ʹΥ
       ˣ
     * ڻɢ
     * ѿ
     *  ISO/ANSI SQL 92 SQL 89ȱ׼
     * δҪ SQL 3SQL 98
     * ӵȽ
       
   Ͽϵͳ ֻ PostgreSQL Щһʵ
    ܻ˵PostgreSQLһҵĿǡΪθ
   ԶʹáPostgreSQL
   
30. FAQй PostgreSQL 

   һԡLinux  Irix ° FAQ
     * [295]http://www.postgresql.org/docs/faq-english.shtml
       
31. ļʽ

   ļʮֲͬĸʽDVIPostscriptLaTeXLyXGNU-info
   HTMLRTFRich Text Format֡Unix man pages  SGML
     * 
       [296]ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/other-formats/ ȡ
        HTMLDVIPostscript  SGML ʽдɵĵһ tar.gz 밴
       sunsite.unc.edu ѸΪ metalab.unc.edu
     * ֵڡ [297]ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO
     * Եķ룬編ġġġġλ
       [298]ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO ҶԷ뵽κ
       Եİλӭ
       
   ļһΪSGML toolĹдɣµطҵ
   [299]http://www.xs4all.nl/~cg/sgmltools/ ʽõµָ
   
     * sgml2html databasehowto.sgml  HTML 
     * sgml2rtf databasehowto.sgml  RTF 
     * sgml2latex databasehowto.sgml  LaTeX 
       
   ļλ춡
     * [300]http://sunsite.unc.edu/LDP/HOWTO/PostgreSQL-HOWTO.html
       
   Ҳӳվ̨ҵļ
     * [301]http://www.caldera.com/LDP/HOWTO/PostgreSQL-HOWTO.html
     * [302]http://www.WGS.com/LDP/HOWTO/PostgreSQL-HOWTO.html
     * [303]http://www.cc.gatech.edu/linux/LDP/HOWTO/PostgreSQL-HOWTO.htm
       l
     * [304]http://www.redhat.com/linux-info/ldp/HOWTO/PostgreSQL-HOWTO.h
       tml
     * 㸽λַ˵վ̨
       [305]http://sunsite.unc.edu/LDP/hmirrors.html ҵѡһվ
        /LDP/HOWTO/PostgreSQL-HOWTO.html Ŀ¼
       
   밴ñļġ롳Ŀǰֻ LaTeXLyXHTMLֺ
   SGML ʽ [306]http://www.linux.org.tw/CLDP/HOWTO/ ҵҪ
   ļҪ bg5sgmltools [307]http://www.linux.org.tw/CLDP/
   ҵ
   
   Ҫۿ dvi ʽļʹ xdvi ʽ Redhat Linux У͸
   ControlPanel | Applications | Publishing | TeX ťҵ
   tetex-xdvi*.rpm ׼мΪ xdvi ʽ
   
   ҪĶ dvi ļִָ
   
        xdvi -geometry 80x90 howto.dvi
        man xdvi

   ʹûӴС ʱʹüͷPage UpPage Down Ҳ
    'f', 'd', 'u', 'c', 'l', 'r', 'p', 'n' ĸϡ¡С
   ǰҳȵȡҪص expert menu 'x'
   
   óʽ 'gv' (ghostview)  'ghostscript' Ķ postscript 
   RedHat Linux Уghostscript ʽ ghostscript*.rpm װgv 
    gv*.rpm͸ ControlPanel | Applications | Graphics ťҵ
   ǡgv ʽ ghostscript õöࡣghostscript  gv Ҳƽ̨
    OS/2Ӵ 95  NT õҲЩƽ̨Ķļ
   
                gv howto.ps
                ghostscript howto.ps

   עñļܳӡ postscript ԼҪ 113 ҳ 
   gv  ghostscript һǰ˽棬Լʹֻ gvҲҪװ
   ߡ⣬ OS/2 Ӵвû gvֻ GSViewһ gv ܲ
   ĳʽι [308]http://www.cs.wisc.edu/~ghost
   
   ʹ Netscape NavigatorMicrosoft Internet ExplorerRedhat Baron
   Web Browser κάĶ HTML ʽļ
   
    LyXLaTeX һ X-Window ǰ˽Ķ LaTeX  LyX 
   
32. Ȩ֪ͨ

   Copyright policy is GNU/GPL as per LDP (Linux Documentation project).
   LDP is a GNU/GPL project. Additional restrictions are - you must
   retain the author's name, email address and this copyright notice on
   all the copies. If you make any changes or additions to this document
   then you should intimate all the authors of this document.
   
   NO LIABILITY FOR CONSEQUENTIAL DAMAGES. In no event shall the
   author/authors of this document be liable for any damages whatsoever
   (including without limitation, special, incidental, consequential, or
   direct/indirect damages for personal injury, loss of business profits,
   business interruption, loss of business information, or any other
   pecuniary loss) arising out of the use of this document.
   
   Author/authors offers no warranties or guarantees on fitness,
   usability, merchantability of this document. Brands, companies and
   product names mentioned in this document are trademarks or registered
   trademarks of their respective holders. Please refer to individual
   copyright notices of brands, companies and products mentioned in this
   document. It is your responsibility to read and understand the
   copyright notices of the organisations/companies/products/authors
   mentioned in this document before using their respective information.
   
Appendix

33. ¼סANSI/ISO SQL 1992 ﷨

   ⵵аԵ BNF Ϊȵ״ģɨ (depth-first tree
   traversal)Լ 27-AUG-1992 11:03:41.64 ɡض汾õ
   BNF ֻ ANSI  SQL2 ġ
   


<SQL terminal character> ::=
      <SQL language character>
    | <SQL embedded language character>

<SQL language character> ::=
      <simple Latin letter>
    | <digit>
    | <SQL special character>

<simple Latin letter> ::=
      <simple Latin upper case letter>
    | <simple Latin lower case letter>

<simple Latin upper case letter> ::=
          A | B | C | D | E | F | G | H | I | J | K | L | M | N | O
    | P | Q | R | S | T | U | V | W | X | Y | Z

<simple Latin lower case letter> ::=
          a | b | c | d | e | f | g | h | i | j | k | l | m | n | o
    | p | q | r | s | t | u | v | w | x | y | z

<digit> ::=
    0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9

<SQL special character> ::=
      <space>
    | <double quote>
    | <percent>
    | <ampersand>
    | <quote>
    | <left paren>
    | <right paren>
    | <asterisk>
    | <plus sign>
    | <comma>
    | <minus sign>
    | <period>
    | <solidus>
    | <colon>
    | <semicolon>
    | <less than operator>
    | <equals operator>
    | <greater than operator>
    | <question mark>
    | <underscore>
    | <vertical bar>

<space> ::= !! <EMPHASIS>(space character in character set in use)

<double quote> ::= "

<percent> ::= %

<ampersand> ::= &

<quote> ::= '

<left paren> ::= (

<right paren> ::= )

<asterisk> ::= *

<plus sign> ::= +

<comma> ::= ,

<minus sign> ::= -

<period> ::= .

<solidus> ::= /

<colon> ::= :

<semicolon> ::= ;

<less than operator> ::= <

<equals operator> ::= =

<greater than operator> ::= >

<question mark> ::= ?

<underscore> ::= _

<vertical bar> ::= |

<SQL embedded language character> ::=
      <left bracket>
    | <right bracket>

<left bracket> ::= [

<right bracket> ::= ]

<token> ::=
      <nondelimiter token>
    | <delimiter token>

<nondelimiter token> ::=
      <regular identifier>
    | <key word>
    | <unsigned numeric literal>
    | <national character string literal>
    | <bit string literal>
    | <hex string literal>

<regular identifier> ::= <identifier body>

<identifier body> ::=
    <identifier start> [ ( <underscore> | <identifier part> )... ]

<identifier start> ::= <EMPHASIS>(!! See the Syntax Rules)

<identifier part> ::=
      <identifier start>
    | <digit>

<key word> ::=
      <reserved word>
    | <non-reserved word>

<reserved word> ::=
      ABSOLUTE | ACTION | ADD | ALL
    | ALLOCATE | ALTER | AND
    | ANY | ARE
    | AS | ASC
    | ASSERTION | AT
    | AUTHORIZATION | AVG
    | BEGIN | BETWEEN | BIT | BIT_LENGTH
    | BOTH | BY
    | CASCADE | CASCADED | CASE | CAST
    | CATALOG
    | CHAR | CHARACTER | CHAR_LENGTH
    | CHARACTER_LENGTH | CHECK | CLOSE | COALESCE
    | COLLATE | COLLATION
    | COLUMN | COMMIT
    | CONNECT
    | CONNECTION | CONSTRAINT
    | CONSTRAINTS | CONTINUE
    | CONVERT | CORRESPONDING | COUNT | CREATE | CROSS
    | CURRENT
    | CURRENT_DATE | CURRENT_TIME
    | CURRENT_TIMESTAMP | CURRENT_USER | CURSOR
    | DATE | DAY | DEALLOCATE | DEC
    | DECIMAL | DECLARE | DEFAULT | DEFERRABLE
    | DEFERRED | DELETE | DESC | DESCRIBE | DESCRIPTOR
    | DIAGNOSTICS
    | DISCONNECT | DISTINCT | DOMAIN | DOUBLE | DROP
    | ELSE | END | END-EXEC | ESCAPE
    | EXCEPT | EXCEPTION
    | EXEC | EXECUTE | EXISTS
    | EXTERNAL | EXTRACT
    | FALSE | FETCH | FIRST | FLOAT | FOR
    | FOREIGN | FOUND | FROM | FULL
    | GET | GLOBAL | GO | GOTO
    | GRANT | GROUP
    | HAVING | HOUR
    | IDENTITY | IMMEDIATE | IN | INDICATOR
    | INITIALLY | INNER | INPUT
    | INSENSITIVE | INSERT | INT | INTEGER | INTERSECT
    | INTERVAL | INTO | IS
    | ISOLATION
    | JOIN
    | KEY
    | LANGUAGE | LAST | LEADING | LEFT
    | LEVEL | LIKE | LOCAL | LOWER
    | MATCH | MAX | MIN | MINUTE | MODULE
    | MONTH
    | NAMES | NATIONAL | NATURAL | NCHAR | NEXT | NO
    | NOT | NULL
    | NULLIF | NUMERIC
    | OCTET_LENGTH | OF
    | ON | ONLY | OPEN | OPTION | OR
    | ORDER | OUTER
    | OUTPUT | OVERLAPS
    | PAD | PARTIAL | POSITION | PRECISION | PREPARE
    | PRESERVE | PRIMARY
    | PRIOR | PRIVILEGES | PROCEDURE | PUBLIC
    | READ | REAL | REFERENCES | RELATIVE | RESTRICT
    | REVOKE | RIGHT
    | ROLLBACK | ROWS
    | SCHEMA | SCROLL | SECOND | SECTION
    | SELECT
    | SESSION | SESSION_USER | SET
    | SIZE | SMALLINT | SOME | SPACE | SQL | SQLCODE
    | SQLERROR | SQLSTATE
    | SUBSTRING | SUM | SYSTEM_USER
    | TABLE | TEMPORARY
    | THEN | TIME | TIMESTAMP
    | TIMEZONE_HOUR | TIMEZONE_MINUTE
    | TO | TRAILING | TRANSACTION
    | TRANSLATE | TRANSLATION | TRIM | TRUE
    | UNION | UNIQUE | UNKNOWN | UPDATE | UPPER | USAGE
    | USER | USING
    | VALUE | VALUES | VARCHAR | VARYING | VIEW
    | WHEN | WHENEVER | WHERE | WITH | WORK | WRITE
    | YEAR
    | ZONE

<non-reserved word> ::=

      ADA
    | C | CATALOG_NAME
    | CHARACTER_SET_CATALOG | CHARACTER_SET_NAME
    | CHARACTER_SET_SCHEMA | CLASS_ORIGIN | COBOL | COLLATION_CATALOG
    | COLLATION_NAME | COLLATION_SCHEMA | COLUMN_NAME | COMMAND_FUNCTION
    | COMMITTED
    | CONDITION_NUMBER | CONNECTION_NAME | CONSTRAINT_CATALOG | CONSTRAINT_NAME
    | CONSTRAINT_SCHEMA | CURSOR_NAME
    | DATA | DATETIME_INTERVAL_CODE
    | DATETIME_INTERVAL_PRECISION | DYNAMIC_FUNCTION
    | FORTRAN
    | LENGTH
    | MESSAGE_LENGTH | MESSAGE_OCTET_LENGTH | MESSAGE_TEXT | MORE | MUMPS
    | NAME | NULLABLE | NUMBER
    | PASCAL | PLI
    | REPEATABLE | RETURNED_LENGTH | RETURNED_OCTET_LENGTH | RETURNED_SQLSTATE
    | ROW_COUNT
    | SCALE | SCHEMA_NAME | SERIALIZABLE | SERVER_NAME | SUBCLASS_ORIGIN
    | TABLE_NAME | TYPE
    | UNCOMMITTED | UNNAMED

<unsigned numeric literal> ::=
      <exact numeric literal>
    | <approximate numeric literal>

<exact numeric literal> ::=
      <unsigned integer> [ <period> [ <unsigned integer> ] ]
    | <period> <unsigned integer>

<unsigned integer> ::= <digit>...

<approximate numeric literal> ::= <mantissa> E <exponent>

<mantissa> ::= <exact numeric literal>

<exponent> ::= <signed integer>

<signed integer> ::= [ <sign> ] <unsigned integer>

<sign> ::= <plus sign> | <minus sign>

<national character string literal> ::=
    N <quote> [ <character representation>... ] <quote>
      [ ( <separator>... <quote> [ <character representation>... ] <quote> )...
 ]

<character representation> ::=
      <nonquote character>
    | <quote symbol>

<nonquote character> ::= !! <EMPHASIS>(See the Syntax Rules.)

<quote symbol> ::= <quote><quote>

<separator> ::= ( <comment> | <space> | <newline> )...

<comment> ::=
    <comment introducer> [ <comment character>... ] <newline>

<comment introducer> ::= <minus sign><minus sign>[<minus sign>...]

<comment character> ::=
      <nonquote character>
    | <quote>

<newline> ::= !! <EMPHASIS>(implementation-defined end-of-line indicator)

<bit string literal> ::=
    B <quote> [ <bit>... ] <quote>
      [ ( <separator>... <quote> [ <bit>... ] <quote> )... ]

<bit> ::= 0 | 1

<hex string literal> ::=
    X <quote> [ <hexit>... ] <quote>
      [ ( <separator>... <quote> [ <hexit>... ] <quote> )... ]

<hexit> ::= <digit> | A | B | C | D | E | F | a | b | c | d | e | f

<delimiter token> ::=
      <character string literal>
    | <date string>
    | <time string>
    | <timestamp string>
    | <interval string>
    | <delimited identifier>
    | <SQL special character>
    | <not equals operator>
    | <greater than or equals operator>
    | <less than or equals operator>
    | <concatenation operator>
    | <double period>
    | <left bracket>
    | <right bracket>

<character string literal> ::=
    [ <introducer><character set specification> ]
    <quote> [ <character representation>... ] <quote>
      [ ( <separator>... <quote> [ <character representation>... ] <quote> )...
 ]

<introducer> ::= <underscore>

<character set specification> ::=
      <standard character repertoire name>
    | <implementation-defined character repertoire name>
    | <user-defined character repertoire name>
    | <standard universal character form-of-use name>
    | <implementation-defined universal character form-of-use name>

<standard character repertoire name> ::= <character set name>

<character set name> ::= [ <schema name> <period> ]
      <SQL language identifier>

<schema name> ::=
    [ <catalog name> <period> ] <unqualified schema name>

<catalog name> ::= <identifier>

<identifier> ::=
    [ <introducer><character set specification> ] <actual identifier>

<actual identifier> ::=
      <regular identifier>
    | <delimited identifier>

<delimited identifier> ::=
    <double quote> <delimited identifier body> <double quote>

<delimited identifier body> ::= <delimited identifier part>...

<delimited identifier part> ::=
      <nondoublequote character>
    | <doublequote symbol>

<nondoublequote character> ::= <EMPHASIS>(!! See the Syntax Rules)

<doublequote symbol> ::= <double quote><double quote>

<unqualified schema name> ::= <identifier>

<SQL language identifier> ::=
    <SQL language identifier start>
       [ ( <underscore> | <SQL language identifier part> )... ]

<SQL language identifier start> ::= <simple Latin letter>

<SQL language identifier part> ::=
      <simple Latin letter>
    | <digit>

<implementation-defined character repertoire name> ::=
    <character set name>

<user-defined character repertoire name> ::= <character set name>

<standard universal character form-of-use name> ::=
    <character set name>

<implementation-defined universal character form-of-use name> ::=
    <character set name>

<date string> ::=
    <quote> <date value> <quote>

<date value> ::=
    <years value> <minus sign> <months value>
        <minus sign> <days value>

<years value> ::= <datetime value>

<datetime value> ::= <unsigned integer>

<months value> ::= <datetime value>

<days value> ::= <datetime value>

<time string> ::=
    <quote> <time value> [ <time zone interval> ] <quote>

<time value> ::=
    <hours value> <colon> <minutes value> <colon> <seconds value>

<hours value> ::= <datetime value>

<minutes value> ::= <datetime value>

<seconds value> ::=
      <seconds integer value> [ <period> [ <seconds fraction> ] ]

<seconds integer value> ::= <unsigned integer>

<seconds fraction> ::= <unsigned integer>

<time zone interval> ::=
    <sign> <hours value> <colon> <minutes value>

<timestamp string> ::=
    <quote> <date value> <space> <time value>
        [ <time zone interval> ] <quote>

<interval string> ::=
    <quote> ( <year-month literal> | <day-time literal> ) <quote>

<year-month literal> ::=
      <years value>
    | [ <years value> <minus sign> ] <months value>

<day-time literal> ::=
      <day-time interval>
    | <time interval>

<day-time interval> ::=
    <days value>
      [ <space> <hours value> [ <colon> <minutes value>
        [ <colon> <seconds value> ] ] ]

<time interval> ::=
      <hours value> [ <colon> <minutes value> [ <colon> <seconds value> ] ]
    | <minutes value> [ <colon> <seconds value> ]
    | <seconds value>

<not equals operator> ::= <>

<greater than or equals operator> ::= >=

<less than or equals operator> ::= <=

<concatenation operator> ::= ||

<double period> ::= ..

<module> ::=
    <module name clause>
    <language clause>
    <module authorization clause>
    [ <temporary table declaration>... ]
    <module contents>...

<module name clause> ::=
    MODULE [ <module name> ]
      [ <module character set specification> ]

<module name> ::= <identifier>

<module character set specification> ::=
    NAMES ARE <character set specification>

<language clause> ::=
    LANGUAGE <language name>

<language name> ::=
    ADA | C | COBOL | FORTRAN | MUMPS | PASCAL | PLI

<module authorization clause> ::=
      SCHEMA <schema name>
    | AUTHORIZATION <module authorization identifier>
    | SCHEMA <schema name>
          AUTHORIZATION <module authorization identifier>

<module authorization identifier> ::=
    <authorization identifier>

<authorization identifier> ::= <identifier>

<temporary table declaration> ::=
    DECLARE LOCAL TEMPORARY TABLE
        <qualified local table name>
      <table element list>
      [ ON COMMIT ( PRESERVE | DELETE ) ROWS ]

<qualified local table name> ::=
    MODULE <period> <local table name>

<local table name> ::= <qualified identifier>

<qualified identifier> ::= <identifier>

<table element list> ::=
      <left paren> <table element> [ ( <comma> <table element> )... ] <right pa
ren>

<table element> ::=
      <column definition>
    | <table constraint definition>

<column definition> ::=
    <column name> ( <data type> | <domain name> )
    [ <default clause> ]
    [ <column constraint definition>... ]
    [ <collate clause> ]

<column name> ::= <identifier>

<data type> ::=
      <character string type>
           [ CHARACTER SET <character set specification> ]
    | <national character string type>
    | <bit string type>
    | <numeric type>
    | <datetime type>
    | <interval type>

<character string type> ::=
      CHARACTER [ <left paren> <length> <right paren> ]
    | CHAR [ <left paren> <length> <right paren> ]
    | CHARACTER VARYING <left paren> <length> <right paren>
    | CHAR VARYING <left paren> <length> <right paren>
    | VARCHAR <left paren> <length> <right paren>

<length> ::= <unsigned integer>

<national character string type> ::=
      NATIONAL CHARACTER [ <left paren> <length> <right paren> ]
    | NATIONAL CHAR [ <left paren> <length> <right paren> ]
    | NCHAR [ <left paren> <length> <right paren> ]
    | NATIONAL CHARACTER VARYING <left paren> <length> <right paren>
    | NATIONAL CHAR VARYING <left paren> <length> <right paren>
    | NCHAR VARYING <left paren> <length> <right paren>

<bit string type> ::=
      BIT [ <left paren> <length> <right paren> ]
    | BIT VARYING <left paren> <length> <right paren>

<numeric type> ::=
      <exact numeric type>
    | <approximate numeric type>

<exact numeric type> ::=
      NUMERIC [ <left paren> <precision> [ <comma> <scale> ] <right paren> ]
    | DECIMAL [ <left paren> <precision> [ <comma> <scale> ] <right paren> ]
    | DEC [ <left paren> <precision> [ <comma> <scale> ] <right paren> ]
    | INTEGER
    | INT
    | SMALLINT

<precision> ::= <unsigned integer>

<scale> ::= <unsigned integer>

<approximate numeric type> ::=
      FLOAT [ <left paren> <precision> <right paren> ]
    | REAL
    | DOUBLE PRECISION

<datetime type> ::=
      DATE
    | TIME [ <left paren> <time precision> <right paren> ]
          [ WITH TIME ZONE ]
    | TIMESTAMP [ <left paren> <timestamp precision> <right paren> ]
          [ WITH TIME ZONE ]

<time precision> ::= <time fractional seconds precision>

<time fractional seconds precision> ::= <unsigned integer>

<timestamp precision> ::= <time fractional seconds precision>

<interval type> ::= INTERVAL <interval qualifier>

<interval qualifier> ::=
      <start field> TO <end field>
    | <single datetime field>

<start field> ::=
    <non-second datetime field>
        [ <left paren> <interval leading field precision> <right paren> ]

<non-second datetime field> ::= YEAR | MONTH | DAY | HOUR
    | MINUTE

<interval leading field precision> ::= <unsigned integer>

<end field> ::=
      <non-second datetime field>
    | SECOND [ <left paren> <interval fractional seconds precision> <right pare
n> ]

<interval fractional seconds precision> ::= <unsigned integer>

<single datetime field> ::=
      <non-second datetime field>
          [ <left paren> <interval leading field precision> <right paren> ]
    | SECOND [ <left paren> <interval leading field precision>
          [ <comma> <interval fractional seconds precision> ] <right paren> ]

<domain name> ::= <qualified name>

<qualified name> ::=
    [ <schema name> <period> ] <qualified identifier>

<default clause> ::=
      DEFAULT <default option>

<default option> ::=
      <literal>
    | <datetime value function>
    | USER
    | CURRENT_USER
    | SESSION_USER
    | SYSTEM_USER
    | NULL

<literal> ::=
      <signed numeric literal>
    | <general literal>

<signed numeric literal> ::=
    [ <sign> ] <unsigned numeric literal>

<general literal> ::=
      <character string literal>
    | <national character string literal>
    | <bit string literal>
    | <hex string literal>
    | <datetime literal>
    | <interval literal>

<datetime literal> ::=
      <date literal>
    | <time literal>
    | <timestamp literal>

<date literal> ::=
    DATE <date string>

<time literal> ::=
    TIME <time string>

<timestamp literal> ::=
    TIMESTAMP <timestamp string>

<interval literal> ::=
    INTERVAL [ <sign> ] <interval string> <interval qualifier>

<datetime value function> ::=
      <current date value function>
    | <current time value function>
    | <current timestamp value function>

<current date value function> ::= CURRENT_DATE

<current time value function> ::=
      CURRENT_TIME [ <left paren> <time precision> <right paren> ]

<current timestamp value function> ::=
      CURRENT_TIMESTAMP [ <left paren> <timestamp precision> <right paren> ]

<column constraint definition> ::=
    [ <constraint name definition> ]
    <column constraint>
      [ <constraint attributes> ]

<constraint name definition> ::= CONSTRAINT <constraint name>

<constraint name> ::= <qualified name>

<column constraint> ::=
      NOT NULL
    | <unique specification>
    | <references specification>
    | <check constraint definition>

<unique specification> ::=
    UNIQUE | PRIMARY KEY

<references specification> ::=
    REFERENCES <referenced table and columns>
      [ MATCH <match type> ]
      [ <referential triggered action> ]

<referenced table and columns> ::=
     <table name> [ <left paren> <reference column list> <right paren> ]

<table name> ::=
      <qualified name>
    | <qualified local table name>

<reference column list> ::= <column name list>

<column name list> ::=
    <column name> [ ( <comma> <column name> )... ]

<match type> ::=
      FULL
    | PARTIAL

<referential triggered action> ::=
      <update rule> [ <delete rule> ]
    | <delete rule> [ <update rule> ]

<update rule> ::= ON UPDATE <referential action>

<referential action> ::=
      CASCADE
    | SET NULL
    | SET DEFAULT
    | NO ACTION

<delete rule> ::= ON DELETE <referential action>

<check constraint definition> ::=
    CHECK
        <left paren> <search condition> <right paren>

<search condition> ::=
      <boolean term>
    | <search condition> OR <boolean term>

<boolean term> ::=
      <boolean factor>
    | <boolean term> AND <boolean factor>

<boolean factor> ::=
    [ NOT ] <boolean test>

<boolean test> ::=
    <boolean primary> [ IS [ NOT ]
          <truth value> ]

<boolean primary> ::=
      <predicate>
    | <left paren> <search condition> <right paren>

<predicate> ::=
      <comparison predicate>
    | <between predicate>
    | <in predicate>
    | <like predicate>
    | <null predicate>
    | <quantified comparison predicate>
    | <exists predicate>
    | <unique predicate>
    | <match predicate>
    | <overlaps predicate>

<comparison predicate> ::=
    <row value constructor> <comp op>
        <row value constructor>

<row value constructor> ::=
       <row value constructor element>
    | <left paren> <row value constructor list> <right paren>
    | <row subquery>

<row value constructor element> ::=
      <value expression>
    | <null specification>
    | <default specification>

<value expression> ::=
      <numeric value expression>
    | <string value expression>
    | <datetime value expression>
    | <interval value expression>

<numeric value expression> ::=
      <term>
    | <numeric value expression> <plus sign> <term>
    | <numeric value expression> <minus sign> <term>

<term> ::=
      <factor>
    | <term> <asterisk> <factor>
    | <term> <solidus> <factor>

<factor> ::=
    [ <sign> ] <numeric primary>

<numeric primary> ::=
      <value expression primary>
    | <numeric value function>

<value expression primary> ::=
      <unsigned value specification>
    | <column reference>
    | <set function specification>
    | <scalar subquery>
    | <case expression>
    | <left paren> <value expression> <right paren>
    | <cast specification>

<unsigned value specification> ::=
      <unsigned literal>
    | <general value specification>

<unsigned literal> ::=
      <unsigned numeric literal>
    | <general literal>

<general value specification> ::=
      <parameter specification>
    | <dynamic parameter specification>
    | <variable specification>
    | USER
    | CURRENT_USER
    | SESSION_USER
    | SYSTEM_USER
    | VALUE

<parameter specification> ::=
    <parameter name> [ <indicator parameter> ]

<parameter name> ::= <colon> <identifier>

<indicator parameter> ::=
    [ INDICATOR ] <parameter name>

<dynamic parameter specification> ::= <question mark>

<variable specification> ::=
    <embedded variable name> [ <indicator variable> ]

<embedded variable name> ::=
    <colon><host identifier>

<host identifier> ::=
      <Ada host identifier>
    | <C host identifier>
    | <COBOL host identifier>
    | <Fortran host identifier>
    | <MUMPS host identifier>
    | <Pascal host identifier>
    | <PL/I host identifier>

<Ada host identifier> ::= !! <EMPHASIS>(See the Syntax Rules.)

<C host identifier> ::=
    !! <EMPHASIS>(See the Syntax Rules.)

<COBOL host identifier> ::= !! <EMPHASIS>(See the Syntax Rules.)

<Fortran host identifier> ::= !! <EMPHASIS>(See the Syntax Rules.)

<MUMPS host identifier> ::= !! <EMPHASIS>(See the Syntax Rules.)

<Pascal host identifier> ::= !! <EMPHASIS>(See the Syntax Rules.)

<PL/I host identifier> ::= !! <EMPHASIS>(See the Syntax Rules.)

<indicator variable> ::=
    [ INDICATOR ] <embedded variable name>

<column reference> ::= [ <qualifier> <period> ] <column name>

<qualifier> ::=
      <table name>
    | <correlation name>

<correlation name> ::= <identifier>

<set function specification> ::=
      COUNT <left paren> <asterisk> <right paren>
    | <general set function>

<general set function> ::=
      <set function type>
          <left paren> [ <set quantifier> ] <value expression> <right paren>

<set function type> ::=
    AVG | MAX | MIN | SUM | COUNT

<set quantifier> ::= DISTINCT | ALL

<scalar subquery> ::= <subquery>

<subquery> ::= <left paren> <query expression> <right paren>

<query expression> ::=
      <non-join query expression>
    | <joined table>

<non-join query expression> ::=
      <non-join query term>
    | <query expression> UNION  [ ALL ]
          [ <corresponding spec> ] <query term>
    | <query expression> EXCEPT [ ALL ]
          [ <corresponding spec> ] <query term>

<non-join query term> ::=
      <non-join query primary>
    | <query term> INTERSECT [ ALL ]
          [ <corresponding spec> ] <query primary>

<non-join query primary> ::=
      <simple table>
    | <left paren> <non-join query expression> <right paren>

<simple table> ::=
      <query specification>
    | <table value constructor>
    | <explicit table>

<query specification> ::=
    SELECT [ <set quantifier> ] <select list> <table expression>

<select list> ::=
      <asterisk>
    | <select sublist> [ ( <comma> <select sublist> )... ]

<select sublist> ::=
      <derived column>
    | <qualifier> <period> <asterisk>

<derived column> ::= <value expression> [ <as clause> ]

<as clause> ::= [ AS ] <column name>

<table expression> ::=
    <from clause>
    [ <where clause> ]
    [ <group by clause> ]
    [ <having clause> ]

<from clause> ::= FROM <table reference>
    [ ( <comma> <table reference> )... ]

<table reference> ::=
      <table name> [ [ AS ] <correlation name>
          [ <left paren> <derived column list> <right paren> ] ]
    | <derived table> [ AS ] <correlation name>
          [ <left paren> <derived column list> <right paren> ]
    | <joined table>

<derived column list> ::= <column name list>

<derived table> ::= <table subquery>

<table subquery> ::= <subquery>

<joined table> ::=
      <cross join>
    | <qualified join>
    | <left paren> <joined table> <right paren>

<cross join> ::=
    <table reference> CROSS JOIN <table reference>

<qualified join> ::=
    <table reference> [ NATURAL ] [ <join type> ] JOIN
      <table reference> [ <join specification> ]

<join type> ::=
      INNER
    | <outer join type> [ OUTER ]
    | UNION

<outer join type> ::=
      LEFT
    | RIGHT
    | FULL

<join specification> ::=
      <join condition>
    | <named columns join>

<join condition> ::= ON <search condition>

<named columns join> ::=
    USING <left paren> <join column list> <right paren>

<join column list> ::= <column name list>

<where clause> ::= WHERE <search condition>

<group by clause> ::=
    GROUP BY <grouping column reference list>

<grouping column reference list> ::=
    <grouping column reference>
        [ ( <comma> <grouping column reference> )... ]

<grouping column reference> ::=
    <column reference> [ <collate clause> ]

<collate clause> ::= COLLATE <collation name>

<collation name> ::= <qualified name>

<having clause> ::= HAVING <search condition>

<table value constructor> ::=
    VALUES <table value constructor list>

<table value constructor list> ::=
    <row value constructor> [ ( <comma> <row value constructor> )... ]

<explicit table> ::= TABLE <table name>

<query term> ::=
      <non-join query term>
    | <joined table>

<corresponding spec> ::=
    CORRESPONDING [ BY <left paren> <corresponding column list> <right paren> ]

<corresponding column list> ::= <column name list>

<query primary> ::=
      <non-join query primary>
    | <joined table>

<case expression> ::=
      <case abbreviation>
    | <case specification>

<case abbreviation> ::=
      NULLIF <left paren> <value expression> <comma>
            <value expression> <right paren>
    | COALESCE <left paren> <value expression>
            ( <comma> <value expression> )... <right paren>

<case specification> ::=
      <simple case>
    | <searched case>

<simple case> ::=
    CASE <case operand>
      <simple when clause>...
      [ <else clause> ]
    END

<case operand> ::= <value expression>

<simple when clause> ::= WHEN <when operand> THEN <result>

<when operand> ::= <value expression>

<result> ::= <result expression> | NULL

<result expression> ::= <value expression>

<else clause> ::= ELSE <result>

<searched case> ::=
    CASE
      <searched when clause>...
      [ <else clause> ]
    END

<searched when clause> ::= WHEN <search condition> THEN <result>

<cast specification> ::=
    CAST <left paren> <cast operand> AS
        <cast target> <right paren>

<cast operand> ::=
      <value expression>
    | NULL

<cast target> ::=
      <domain name>
    | <data type>

<numeric value function> ::=
      <position expression>
    | <extract expression>
    | <length expression>

<position expression> ::=
    POSITION <left paren> <character value expression>
        IN <character value expression> <right paren>

<character value expression> ::=
      <concatenation>
    | <character factor>

<concatenation> ::=
    <character value expression> <concatenation operator>
        <character factor>

<character factor> ::=
    <character primary> [ <collate clause> ]

<character primary> ::=
      <value expression primary>
    | <string value function>

<string value function> ::=
      <character value function>
    | <bit value function>

<character value function> ::=
      <character substring function>
    | <fold>
    | <form-of-use conversion>
    | <character translation>
    | <trim function>

<character substring function> ::=
    SUBSTRING <left paren> <character value expression> FROM <start position>
                [ FOR <string length> ] <right paren>

<start position> ::= <numeric value expression>

<string length> ::= <numeric value expression>

<fold> ::= ( UPPER | LOWER )
     <left paren> <character value expression> <right paren>

<form-of-use conversion> ::=
    CONVERT <left paren> <character value expression>
        USING <form-of-use conversion name> <right paren>

<form-of-use conversion name> ::= <qualified name>

<character translation> ::=
    TRANSLATE <left paren> <character value expression>
        USING <translation name> <right paren>

<translation name> ::= <qualified name>

<trim function> ::=
    TRIM <left paren> <trim operands> <right paren>

<trim operands> ::=
    [ [ <trim specification> ] [ <trim character> ] FROM ] <trim source>

<trim specification> ::=
      LEADING
    | TRAILING
    | BOTH

<trim character> ::= <character value expression>

<trim source> ::= <character value expression>

<bit value function> ::=
    <bit substring function>

<bit substring function> ::=
    SUBSTRING <left paren> <bit value expression> FROM <start position>
        [ FOR <string length> ] <right paren>

<bit value expression> ::=
      <bit concatenation>
    | <bit factor>

<bit concatenation> ::=
    <bit value expression> <concatenation operator> <bit factor>

<bit factor> ::= <bit primary>

<bit primary> ::=
      <value expression primary>
    | <string value function>

<extract expression> ::=
    EXTRACT <left paren> <extract field>
        FROM <extract source> <right paren>

<extract field> ::=
      <datetime field>
    | <time zone field>

<datetime field> ::=
      <non-second datetime field>
    | SECOND

<time zone field> ::=
      TIMEZONE_HOUR
    | TIMEZONE_MINUTE

<extract source> ::=
      <datetime value expression>
    | <interval value expression>

<datetime value expression> ::=
      <datetime term>
    | <interval value expression> <plus sign> <datetime term>
    | <datetime value expression> <plus sign> <interval term>
    | <datetime value expression> <minus sign> <interval term>

<interval term> ::=
      <interval factor>
    | <interval term 2> <asterisk> <factor>
    | <interval term 2> <solidus> <factor>
    | <term> <asterisk> <interval factor>

<interval factor> ::=
    [ <sign> ] <interval primary>

<interval primary> ::=
      <value expression primary> [ <interval qualifier> ]

<interval term 2> ::= <interval term>

<interval value expression> ::=
      <interval term>
    | <interval value expression 1> <plus sign> <interval term 1>
    | <interval value expression 1> <minus sign> <interval term 1>
    | <left paren> <datetime value expression> <minus sign>
          <datetime term> <right paren> <interval qualifier>

<interval value expression 1> ::= <interval value expression>

<interval term 1> ::= <interval term>

<datetime term> ::=
      <datetime factor>

<datetime factor> ::=
      <datetime primary> [ <time zone> ]

<datetime primary> ::=
      <value expression primary>
    | <datetime value function>

<time zone> ::=
    AT <time zone specifier>

<time zone specifier> ::=
      LOCAL
    | TIME ZONE <interval value expression>

<length expression> ::=
      <char length expression>
    | <octet length expression>
    | <bit length expression>

<char length expression> ::=
    ( CHAR_LENGTH | CHARACTER_LENGTH )
        <left paren> <string value expression> <right paren>

<string value expression> ::=
      <character value expression>
    | <bit value expression>

<octet length expression> ::=
    OCTET_LENGTH <left paren> <string value expression> <right paren>

<bit length expression> ::=
    BIT_LENGTH <left paren> <string value expression> <right paren>

<null specification> ::=
    NULL

<default specification> ::=
    DEFAULT

<row value constructor list> ::=
    <row value constructor element>
        [ ( <comma> <row value constructor element> )... ]

<row subquery> ::= <subquery>

<comp op> ::=
      <equals operator>
    | <not equals operator>
    | <less than operator>
    | <greater than operator>
    | <less than or equals operator>
    | <greater than or equals operator>

<between predicate> ::=
    <row value constructor> [ NOT ] BETWEEN
      <row value constructor> AND <row value constructor>

<in predicate> ::=
    <row value constructor>
      [ NOT ] IN <in predicate value>

<in predicate value> ::=
      <table subquery>
    | <left paren> <in value list> <right paren>

<in value list> ::=
    <value expression> ( <comma> <value expression> )...

<like predicate> ::=
    <match value> [ NOT ] LIKE <pattern>
      [ ESCAPE <escape character> ]

<match value> ::= <character value expression>

<pattern> ::= <character value expression>

<escape character> ::= <character value expression>

<null predicate> ::= <row value constructor>
    IS [ NOT ] NULL

<quantified comparison predicate> ::=
    <row value constructor> <comp op> <quantifier> <table subquery>

<quantifier> ::= <all> | <some>

<all> ::= ALL

<some> ::= SOME | ANY

<exists predicate> ::= EXISTS <table subquery>

<unique predicate> ::= UNIQUE <table subquery>

<match predicate> ::=
    <row value constructor> MATCH [ UNIQUE ]
        [ PARTIAL | FULL ] <table subquery>

<overlaps predicate> ::=
    <row value constructor 1> OVERLAPS <row value constructor 2>

<row value constructor 1> ::= <row value constructor>

<row value constructor 2> ::= <row value constructor>

<truth value> ::=
      TRUE
    | FALSE
    | UNKNOWN

<constraint attributes> ::=
      <constraint check time> [ [ NOT ] DEFERRABLE ]
    | [ NOT ] DEFERRABLE [ <constraint check time> ]

<constraint check time> ::=
      INITIALLY DEFERRED
    | INITIALLY IMMEDIATE

<table constraint definition> ::=
    [ <constraint name definition> ]
    <table constraint> [ <constraint attributes> ]

<table constraint> ::=
      <unique constraint definition>
    | <referential constraint definition>
    | <check constraint definition>

<unique constraint definition> ::=
            <unique specification> even in SQL3)
    <unique specification>
      <left paren> <unique column list> <right paren>

<unique column list> ::= <column name list>

<referential constraint definition> ::=
    FOREIGN KEY
        <left paren> <referencing columns> <right paren>
      <references specification>

<referencing columns> ::=
    <reference column list>

<module contents> ::=
      <declare cursor>
    | <dynamic declare cursor>
    | <procedure>

<declare cursor> ::=
    DECLARE <cursor name> [ INSENSITIVE ] [ SCROLL ] CURSOR
      FOR <cursor specification>

<cursor name> ::= <identifier>

<cursor specification> ::=
    <query expression> [ <order by clause> ]
      [ <updatability clause> ]

<order by clause> ::=
    ORDER BY <sort specification list>

<sort specification list> ::=
    <sort specification> [ ( <comma> <sort specification> )... ]

<sort specification> ::=
    <sort key> [ <collate clause> ] [ <ordering specification> ]

<sort key> ::=
      <column name>
    | <unsigned integer>

<ordering specification> ::= ASC | DESC

<updatability clause> ::=
    FOR
        ( READ ONLY |
          UPDATE [ OF <column name list> ] )

<dynamic declare cursor> ::=
    DECLARE <cursor name> [ INSENSITIVE ] [ SCROLL ] CURSOR
        FOR <statement name>

<statement name> ::= <identifier>

<procedure> ::=
    PROCEDURE <procedure name>
        <parameter declaration list> <semicolon>
      <SQL procedure statement> <semicolon>

<procedure name> ::= <identifier>

<parameter declaration list> ::=
      <left paren> <parameter declaration>
          [ ( <comma> <parameter declaration> )... ] <right paren>
    | <parameter declaration>...

<parameter declaration> ::=
      <parameter name> <data type>
    | <status parameter>

<status parameter> ::=
    SQLCODE | SQLSTATE

<SQL procedure statement> ::=
      <SQL schema statement>
    | <SQL data statement>
    | <SQL transaction statement>
    | <SQL connection statement>
    | <SQL session statement>
    | <SQL dynamic statement>
    | <SQL diagnostics statement>

<SQL schema statement> ::=
      <SQL schema definition statement>
    | <SQL schema manipulation statement>

<SQL schema definition statement> ::=
      <schema definition>
    | <table definition>
    | <view definition>
    | <grant statement>
    | <domain definition>
    | <character set definition>
    | <collation definition>
    | <translation definition>
    | <assertion definition>

<schema definition> ::=
    CREATE SCHEMA <schema name clause>
      [ <schema character set specification> ]
      [ <schema element>... ]

<schema name clause> ::=
      <schema name>
    | AUTHORIZATION <schema authorization identifier>
    | <schema name> AUTHORIZATION
          <schema authorization identifier>

<schema authorization identifier> ::=
    <authorization identifier>

<schema character set specification> ::=
    DEFAULT CHARACTER
        SET <character set specification>

<schema element> ::=
      <domain definition>
    | <table definition>
    | <view definition>
    | <grant statement>
    | <assertion definition>
    | <character set definition>
    | <collation definition>
    | <translation definition>

<domain definition> ::=
    CREATE DOMAIN <domain name>
        [ AS ] <data type>
      [ <default clause> ]
      [ <domain constraint>... ]
      [ <collate clause> ]

<domain constraint> ::=
    [ <constraint name definition> ]
    <check constraint definition> [ <constraint attributes> ]

<table definition> ::=
    CREATE [ ( GLOBAL | LOCAL ) TEMPORARY ] TABLE
        <table name>
      <table element list>
      [ ON COMMIT ( DELETE | PRESERVE ) ROWS ]

<view definition> ::=
    CREATE VIEW <table name> [ <left paren> <view column list>
                                  <right paren> ]
      AS <query expression>
      [ WITH [ <levels clause> ] CHECK OPTION ]

<view column list> ::= <column name list>

<levels clause> ::=
    CASCADED | LOCAL

<grant statement> ::=
   GRANT <privileges> ON <object name>
     TO <grantee> [ ( <comma> <grantee> )... ]
       [ WITH GRANT OPTION ]

<privileges> ::=
      ALL PRIVILEGES
    | <action list>

<action list> ::= <action> [ ( <comma> <action> )... ]

<action> ::=
      SELECT
    | DELETE
    | INSERT [ <left paren> <privilege column list> <right paren> ]
    | UPDATE [ <left paren> <privilege column list> <right paren> ]
    | REFERENCES [ <left paren> <privilege column list> <right paren> ]
    | USAGE

<privilege column list> ::= <column name list>

<object name> ::=
      [ TABLE ] <table name>
    | DOMAIN <domain name>
    | COLLATION <collation name>
    | CHARACTER SET <character set name>
    | TRANSLATION <translation name>

<grantee> ::=
      PUBLIC
    | <authorization identifier>

<assertion definition> ::=
    CREATE ASSERTION <constraint name> <assertion check>
      [ <constraint attributes> ]

<assertion check> ::=
    CHECK
        <left paren> <search condition> <right paren>

<character set definition> ::=
    CREATE CHARACTER SET <character set name>
        [ AS ]
      <character set source>
      [ <collate clause> | <limited collation definition> ]

<character set source> ::=
      GET <existing character set name>

<existing character set name> ::=
      <standard character repertoire name>
    | <implementation-defined character repertoire name>
    | <schema character set name>

<schema character set name> ::= <character set name>

<limited collation definition> ::=
    COLLATION FROM <collation source>

<collation source> ::=
      <collating sequence definition>
    | <translation collation>

<collating sequence definition> ::=
      <external collation>
    | <schema collation name>
    | DESC <left paren> <collation name> <right paren>
    | DEFAULT

<external collation> ::=
    EXTERNAL <left paren> <quote> <external collation name> <quote> <right pare
n>

<external collation name> ::=
      <standard collation name>
    | <implementation-defined collation name>

<standard collation name> ::= <collation name>

<implementation-defined collation name> ::= <collation name>

<schema collation name> ::= <collation name>

<translation collation> ::=
    TRANSLATION <translation name>
        [ THEN COLLATION <collation name> ]

<collation definition> ::=
    CREATE COLLATION <collation name> FOR
        <character set specification>
      FROM <collation source>
        [ <pad attribute> ]

<pad attribute> ::=
      NO PAD
    | PAD SPACE

<translation definition> ::=
    CREATE TRANSLATION <translation name>
      FOR <source character set specification>
        TO <target character set specification>
      FROM <translation source>

<source character set specification> ::= <character set specification>

<target character set specification> ::= <character set specification>

<translation source> ::=
      <translation specification>

<translation specification> ::=
      <external translation>
    | IDENTITY
    | <schema translation name>

<external translation> ::=
    EXTERNAL <left paren> <quote> <external translation name> <quote> <right pa
ren>

<external translation name> ::=
      <standard translation name>
    | <implementation-defined translation name>

<standard translation name> ::= <translation name>

<implementation-defined translation name> ::= <translation name>

<schema translation name> ::= <translation name>

<SQL schema manipulation statement> ::=
      <drop schema statement>
    | <alter table statement>
    | <drop table statement>
    | <drop view statement>
    | <revoke statement>
    | <alter domain statement>
    | <drop domain statement>
    | <drop character set statement>
    | <drop collation statement>
    | <drop translation statement>
    | <drop assertion statement>

<drop schema statement> ::=
    DROP SCHEMA <schema name> <drop behavior>

<drop behavior> ::= CASCADE | RESTRICT

<alter table statement> ::=
    ALTER TABLE <table name> <alter table action>

<alter table action> ::=
      <add column definition>
    | <alter column definition>
    | <drop column definition>
    | <add table constraint definition>
    | <drop table constraint definition>

<add column definition> ::=
    ADD [ COLUMN ] <column definition>

<alter column definition> ::=
    ALTER [ COLUMN ] <column name> <alter column action>

<alter column action> ::=
      <set column default clause>
    | <drop column default clause>

<set column default clause> ::=
    SET <default clause>

<drop column default clause> ::=
    DROP DEFAULT

<drop column definition> ::=
    DROP [ COLUMN ] <column name> <drop behavior>

<add table constraint definition> ::=
    ADD <table constraint definition>

<drop table constraint definition> ::=
    DROP CONSTRAINT <constraint name> <drop behavior>

<drop table statement> ::=
    DROP TABLE <table name> <drop behavior>

<drop view statement> ::=
    DROP VIEW <table name> <drop behavior>

<revoke statement> ::=
    REVOKE [ GRANT OPTION FOR ]
        <privileges>
        ON <object name>
      FROM <grantee> [ ( <comma> <grantee> )... ] <drop behavior>

<alter domain statement> ::=
    ALTER DOMAIN <domain name> <alter domain action>

<alter domain action> ::=
      <set domain default clause>
    | <drop domain default clause>
    | <add domain constraint definition>
    | <drop domain constraint definition>

<set domain default clause> ::= SET <default clause>

<drop domain default clause> ::= DROP DEFAULT

<add domain constraint definition> ::=
    ADD <domain constraint>

<drop domain constraint definition> ::=
    DROP CONSTRAINT <constraint name>

<drop domain statement> ::=
    DROP DOMAIN <domain name> <drop behavior>

<drop character set statement> ::=
    DROP CHARACTER SET <character set name>

<drop collation statement> ::=
    DROP COLLATION <collation name>

<drop translation statement> ::=
    DROP TRANSLATION <translation name>

<drop assertion statement> ::=
    DROP ASSERTION <constraint name>

<SQL data statement> ::=
      <open statement>
    | <fetch statement>
    | <close statement>
    | <select statement: single row>
    | <SQL data change statement>

<open statement> ::=
    OPEN <cursor name>

<fetch statement> ::=
    FETCH [ [ <fetch orientation> ] FROM ]
      <cursor name> INTO <fetch target list>

<fetch orientation> ::=
      NEXT
    | PRIOR
    | FIRST
    | LAST
    | ( ABSOLUTE | RELATIVE ) <simple value specification>

<simple value specification> ::=
      <parameter name>
    | <embedded variable name>
    | <literal>

<fetch target list> ::=
    <target specification> [ ( <comma> <target specification> )... ]

<target specification> ::=
      <parameter specification>
    | <variable specification>

<close statement> ::=
    CLOSE <cursor name>

<select statement: single row> ::=
    SELECT [ <set quantifier> ] <select list>
      INTO <select target list>
        <table expression>

<select target list> ::=
    <target specification> [ ( <comma> <target specification> )... ]

<SQL data change statement> ::=
      <delete statement: positioned>
    | <delete statement: searched>
    | <insert statement>
    | <update statement: positioned>
    | <update statement: searched>

<delete statement: positioned> ::=
    DELETE FROM <table name>
      WHERE CURRENT OF <cursor name>

<delete statement: searched> ::=
    DELETE FROM <table name>
      [ WHERE <search condition> ]

<insert statement> ::=
    INSERT INTO <table name>
      <insert columns and source>

<insert columns and source> ::=
      [ <left paren> <insert column list> <right paren> ]
            <query expression>
    | DEFAULT VALUES

<insert column list> ::= <column name list>

<update statement: positioned> ::=
    UPDATE <table name>
      SET <set clause list>
        WHERE CURRENT OF <cursor name>

<set clause list> ::=
    <set clause> [ ( <comma> <set clause> )... ]

<set clause> ::=
    <object column> <equals operator> <update source>

<object column> ::= <column name>

<update source> ::=
      <value expression>
    | <null specification>
    | DEFAULT

<update statement: searched> ::=
    UPDATE <table name>
      SET <set clause list>
      [ WHERE <search condition> ]

<SQL transaction statement> ::=
      <set transaction statement>
    | <set constraints mode statement>
    | <commit statement>
    | <rollback statement>

<set transaction statement> ::=
    SET TRANSACTION <transaction mode>
        [ ( <comma> <transaction mode> )... ]

<transaction mode> ::=
      <isolation level>
    | <transaction access mode>
    | <diagnostics size>

<isolation level> ::=
    ISOLATION LEVEL <level of isolation>

<level of isolation> ::=
      READ UNCOMMITTED
    | READ COMMITTED
    | REPEATABLE READ
    | SERIALIZABLE

<transaction access mode> ::=
      READ ONLY
    | READ WRITE

<diagnostics size> ::=
    DIAGNOSTICS SIZE <number of conditions>

<number of conditions> ::= <simple value specification>

<set constraints mode statement> ::=
    SET CONSTRAINTS <constraint name list>
        ( DEFERRED | IMMEDIATE )

<constraint name list> ::=
      ALL
    | <constraint name> [ ( <comma> <constraint name> )... ]

<commit statement> ::=
    COMMIT [ WORK ]

<rollback statement> ::=
    ROLLBACK [ WORK ]

<SQL connection statement> ::=
      <connect statement>
    | <set connection statement>
    | <disconnect statement>

<connect statement> ::=
    CONNECT TO <connection target>

<connection target> ::=
      <SQL-server name>
        [ AS <connection name> ]
          correspondence with Tony Gordon)
        [ USER <user name> ]
    | DEFAULT

<SQL-server name> ::= <simple value specification>

<connection name> ::= <simple value specification>

<user name> ::= <simple value specification>

<set connection statement> ::=
    SET CONNECTION <connection object>

<connection object> ::=
      DEFAULT
    | <connection name>

<disconnect statement> ::=
    DISCONNECT <disconnect object>

<disconnect object> ::=
      <connection object>
    | ALL
    | CURRENT

<SQL session statement> ::=
      <set catalog statement>
    | <set schema statement>
    | <set names statement>
    | <set session authorization identifier statement>
    | <set local time zone statement>

<set catalog statement> ::=
    SET CATALOG <value specification>

<value specification> ::=
      <literal>
    | <general value specification>

<set schema statement> ::=
    SET SCHEMA <value specification>

<set names statement> ::=
    SET NAMES <value specification>

<set session authorization identifier statement> ::=
    SET SESSION AUTHORIZATION
        <value specification>

<set local time zone statement> ::=
    SET TIME ZONE
        <set time zone value>

<set time zone value> ::=
      <interval value expression>
    | LOCAL

<SQL dynamic statement> ::=
      <system descriptor statement>
    | <prepare statement>
    | <deallocate prepared statement>
    | <describe statement>
    | <execute statement>
    | <execute immediate statement>
    | <SQL dynamic data statement>

<system descriptor statement> ::=
      <allocate descriptor statement>
    | <deallocate descriptor statement>
    | <set descriptor statement>
    | <get descriptor statement>

<allocate descriptor statement> ::=
    ALLOCATE DESCRIPTOR <descriptor name>
       [ WITH MAX <occurrences> ]

<descriptor name> ::=
    [ <scope option> ] <simple value specification>

<scope option> ::=
      GLOBAL
    | LOCAL

<occurrences> ::= <simple value specification>

<deallocate descriptor statement> ::=
    DEALLOCATE DESCRIPTOR <descriptor name>

<set descriptor statement> ::=
    SET DESCRIPTOR <descriptor name>
        <set descriptor information>

<set descriptor information> ::=
      <set count>
    | VALUE <item number>
        <set item information> [ ( <comma> <set item information> )... ]

<set count> ::=
    COUNT <equals operator> <simple value specification 1>

<simple value specification 1> ::= <simple value specification>

<item number> ::= <simple value specification>

<set item information> ::=
    <descriptor item name> <equals operator> <simple value specification 2>

<descriptor item name> ::=
      TYPE
    | LENGTH
    | OCTET_LENGTH
    | RETURNED_LENGTH
    | RETURNED_OCTET_LENGTH
    | PRECISION
    | SCALE
    | DATETIME_INTERVAL_CODE
    | DATETIME_INTERVAL_PRECISION
    | NULLABLE
    | INDICATOR
    | DATA
    | NAME
    | UNNAMED
    | COLLATION_CATALOG
    | COLLATION_SCHEMA
    | COLLATION_NAME
    | CHARACTER_SET_CATALOG
    | CHARACTER_SET_SCHEMA
    | CHARACTER_SET_NAME

<simple value specification 2> ::= <simple value specification>

<item number> ::= <simple value specification>

<get descriptor statement> ::=
    GET DESCRIPTOR <descriptor name> <get descriptor information>

<get descriptor information> ::=
      <get count>
    | VALUE <item number>
        <get item information> [ ( <comma> <get item information> )... ]

<get count> ::=
    <simple target specification 1> <equals operator>
         COUNT

<simple target specification 1> ::= <simple target specification>

<simple target specification> ::=
      <parameter name>
    | <embedded variable name>

<get item information> ::=
    <simple target specification 2> <equals operator> <descriptor item name>>

<simple target specification 2> ::= <simple target specification>

<prepare statement> ::=
    PREPARE <SQL statement name> FROM <SQL statement variable>

<SQL statement name> ::=
      <statement name>
    | <extended statement name>

<extended statement name> ::=
    [ <scope option> ] <simple value specification>

<SQL statement variable> ::= <simple value specification>

<deallocate prepared statement> ::=
    DEALLOCATE PREPARE <SQL statement name>

<describe statement> ::=
      <describe input statement>
    | <describe output statement>

<describe input statement> ::=
    DESCRIBE INPUT <SQL statement name> <using descriptor>

<using descriptor> ::=
    ( USING | INTO ) SQL DESCRIPTOR <descriptor name>

<describe output statement> ::=
    DESCRIBE [ OUTPUT ] <SQL statement name> <using descriptor>

<execute statement> ::=
    EXECUTE <SQL statement name>
      [ <result using clause> ]
      [ <parameter using clause> ]

<result using clause> ::= <using clause>

<using clause> ::=
      <using arguments>
    | <using descriptor>

<using arguments> ::=
    ( USING | INTO ) <argument> [ ( <comma> <argument> )... ]

<argument> ::= <target specification>

<parameter using clause> ::= <using clause>

<execute immediate statement> ::=
    EXECUTE IMMEDIATE <SQL statement variable>

<SQL dynamic data statement> ::=
      <allocate cursor statement>
    | <dynamic open statement>
    | <dynamic fetch statement>
    | <dynamic close statement>
    | <dynamic delete statement: positioned>
    | <dynamic update statement: positioned>

<allocate cursor statement> ::=
    ALLOCATE <extended cursor name> [ INSENSITIVE ]
        [ SCROLL ] CURSOR
      FOR <extended statement name>

<extended cursor name> ::=
    [ <scope option> ] <simple value specification>

<dynamic open statement> ::=
    OPEN <dynamic cursor name> [ <using clause> ]

<dynamic cursor name> ::=
      <cursor name>
    | <extended cursor name>

<dynamic fetch statement> ::=
    FETCH [ [ <fetch orientation> ] FROM ] <dynamic cursor name>
        <using clause>

<dynamic close statement> ::=
    CLOSE <dynamic cursor name>

<dynamic delete statement: positioned> ::=
    DELETE FROM <table name>
      WHERE CURRENT OF
          <dynamic cursor name>

<dynamic update statement: positioned> ::=
    UPDATE <table name>
      SET <set clause>
          [ ( <comma> <set clause> )... ]
        WHERE CURRENT OF
            <dynamic cursor name>

<SQL diagnostics statement> ::=
    <get diagnostics statement>

<get diagnostics statement> ::=
    GET DIAGNOSTICS <sql diagnostics information>

<sql diagnostics information> ::=
      <statement information>
    | <condition information>

<statement information> ::=
    <statement information item> [ ( <comma> <statement information item> )...
]

<statement information item> ::=
    <simple target specification> <equals operator> <statement information item
 name>

<statement information item name> ::=
      NUMBER
    | MORE
    | COMMAND_FUNCTION
    | DYNAMIC_FUNCTION
    | ROW_COUNT

<condition information> ::=
    EXCEPTION <condition number>
      <condition information item> [ ( <comma> <condition information item> )..
. ]

<condition number> ::= <simple value specification>

<condition information item> ::=
    <simple target specification> <equals operator> <condition information item
 name>

<condition information item name> ::=
      CONDITION_NUMBER
    | RETURNED_SQLSTATE
    | CLASS_ORIGIN
    | SUBCLASS_ORIGIN
    | SERVER_NAME
    | CONNECTION_NAME
    | CONSTRAINT_CATALOG
    | CONSTRAINT_SCHEMA
    | CONSTRAINT_NAME
    | CATALOG_NAME
    | SCHEMA_NAME
    | TABLE_NAME
    | COLUMN_NAME
    | CURSOR_NAME
    | MESSAGE_TEXT
    | MESSAGE_LENGTH
    | MESSAGE_OCTET_LENGTH

<embedded SQL host program> ::=
      <embedded SQL Ada program>
    | <embedded SQL C program>
    | <embedded SQL COBOL program>
    | <embedded SQL Fortran program>
    | <embedded SQL MUMPS program>
    | <embedded SQL Pascal program>
    | <embedded SQL PL/I program>

<embedded SQL Ada program> ::= !! <EMPHASIS>(See the Syntax Rules.)

<embedded SQL C program> ::=
      !! <EMPHASIS>(See the Syntax Rules.)

<embedded SQL COBOL program> ::= !! <EMPHASIS>(See the Syntax Rules.)

<embedded SQL Fortran program> ::=
    !! <EMPHASIS>(See the Syntax Rules.)

<embedded SQL MUMPS program> ::= !! <EMPHASIS>(See the Syntax Rules.)

<embedded SQL Pascal program> ::=
    !! <EMPHASIS>(See the Syntax Rules.)

<embedded SQL PL/I program> ::= !! <EMPHASIS>(See the Syntax Rules.)

<embedded SQL declare section> ::=
      <embedded SQL begin declare>
        [ <embedded character set declaration> ]
        [ <host variable definition>... ]
      <embedded SQL end declare>
    | <embedded SQL MUMPS declare>

<embedded SQL begin declare> ::=
    <SQL prefix> BEGIN DECLARE SECTION
        [ <SQL terminator> ]

<SQL prefix> ::=
      EXEC SQL
    | <ampersand>SQL<left paren>

<SQL terminator> ::=
      END-EXEC
    | <semicolon>
    | <right paren>

<embedded character set declaration> ::=
    SQL NAMES ARE <character set specification>

<host variable definition> ::=
      <Ada variable definition>
    | <C variable definition>
    | <COBOL variable definition>
    | <Fortran variable definition>
    | <MUMPS variable definition>
    | <Pascal variable definition>
    | <PL/I variable definition>

<Ada variable definition> ::=
    <Ada host identifier> [ ( <comma> <Ada host identifier> )... ] :
    <Ada type specification> [ <Ada initial value> ]

<Ada type specification> ::=
      <Ada qualified type specification>
    | <Ada unqualified type specification>

<Ada qualified type specification> ::=
      SQL_STANDARD.CHAR [ CHARACTER SET
         [ IS ] <character set specification> ]
          <left paren> 1 <double period> <length> <right paren>
    | SQL_STANDARD.BIT
          <left paren> 1 <double period> <length> <right paren>
    | SQL_STANDARD.SMALLINT
    | SQL_STANDARD.INT
    | SQL_STANDARD.REAL
    | SQL_STANDARD.DOUBLE_PRECISION
    | SQL_STANDARD.SQLCODE_TYPE
    | SQL_STANDARD.SQLSTATE_TYPE
    | SQL_STANDARD.INDICATOR_TYPE

<Ada unqualified type specification> ::=
      CHAR
          <left paren> 1 <double period> <length> <right paren>
    | BIT
          <left paren> 1 <double period> <length> <right paren>
    | SMALLINT
    | INT
    | REAL
    | DOUBLE_PRECISION
    | SQLCODE_TYPE
    | SQLSTATE_TYPE
    | INDICATOR_TYPE

<Ada initial value> ::=
    <Ada assignment operator> <character representation>...

<Ada assignment operator> ::= <colon><equals operator>

<C variable definition> ::=
      [ <C storage class> ]
      [ <C class modifier> ]
      <C variable specification>
    <semicolon>

<C storage class> ::=
      auto
    | extern
    | static

<C class modifier> ::= const | volatile

<C variable specification> ::=
      <C numeric variable>
    | <C character variable>
    | <C derived variable>

<C numeric variable> ::=
    ( long | short | float | double )
      <C host identifier> [ <C initial value> ]
            [ ( <comma> <C host identifier> [ <C initial value> ] )... ]

<C initial value> ::=
    <equals operator> <character representation>...

<C character variable> ::=
    char [ CHARACTER SET
             [ IS ] <character set specification> ]
      <C host identifier>
        <C array specification> [ <C initial value> ]
        [ ( <comma> <C host identifier>
          <C array specification>
                 [ <C initial value> ] )... ]

<C array specification> ::=
    <left bracket> <length> <right bracket>

<C derived variable> ::=
      <C VARCHAR variable>
    | <C bit variable>

<C VARCHAR variable> ::=
    VARCHAR [ CHARACTER SET [ IS ]
        <character set specification> ]
        <C host identifier>
            <C array specification> [ <C initial value> ]
          [ ( <comma> <C host identifier>
              <C array specification>
                      [ <C initial value> ] )... ]

<C bit variable> ::=
    BIT <C host identifier>
        <C array specification> [ <C initial value> ]
      [ ( <comma> <C host identifier>
        <C array specification>
                   [ <C initial value> ] )... ]

<COBOL variable definition> ::=
    (01|77) <COBOL host identifier> <COBOL type specification>
      [ <character representation>... ] <period>

<COBOL type specification> ::=
      <COBOL character type>
    | <COBOL bit type>
    | <COBOL numeric type>
    | <COBOL integer type>

<COBOL character type> ::=
    [ CHARACTER SET [ IS ]
          <character set specification> ]
    ( PIC | PICTURE ) [ IS ] ( X [ <left paren> <length> <right paren> ] )...

<COBOL bit type> ::=
    ( PIC | PICTURE ) [ IS ]
        ( B [ <left paren> <length> <right paren> ] )...

<COBOL numeric type> ::=
    ( PIC | PICTURE ) [ IS ]
      S <COBOL nines specification>
    [ USAGE [ IS ] ] DISPLAY SIGN LEADING SEPARATE

<COBOL nines specification> ::=
      <COBOL nines> [ V [ <COBOL nines> ] ]
    | V <COBOL nines>

<COBOL nines> ::= ( 9 [ <left paren> <length> <right paren> ] )...

<COBOL integer type> ::=
      <COBOL computational integer>
    | <COBOL binary integer>

<COBOL computational integer> ::=
    ( PIC | PICTURE ) [ IS ] S<COBOL nines>
      [ USAGE [ IS ] ] ( COMP | COMPUTATIONAL )

<COBOL binary integer> ::=
    ( PIC | PICTURE ) [ IS ] S<COBOL nines>
      [ USAGE [ IS ] ] BINARY

<Fortran variable definition> ::=
    <Fortran type specification>
    <Fortran host identifier>
        [ ( <comma> <Fortran host identifier> )... ]

<Fortran type specification> ::=
      CHARACTER [ <asterisk> <length> ]
          [ CHARACTER SET [ IS ]
                <character set specification> ]
    | BIT [ <asterisk> <length> ]
    | INTEGER
    | REAL
    | DOUBLE PRECISION

<MUMPS variable definition> ::=
    ( <MUMPS numeric variable> | <MUMPS character variable> )
        <semicolon>

<MUMPS numeric variable> ::=
    <MUMPS type specification>
      <MUMPS host identifier> [ ( <comma> <MUMPS host identifier> )... ]

<MUMPS type specification> ::=
      INT
    | DEC
          [ <left paren> <precision> [ <comma> <scale> ] <right paren> ]
    | REAL

<MUMPS character variable> ::=
    VARCHAR <MUMPS host identifier> <MUMPS length specification>
      [ ( <comma> <MUMPS host identifier> <MUMPS length specification> )... ]

<MUMPS length specification> ::=
    <left paren> <length> <right paren>

<Pascal variable definition> ::=
    <Pascal host identifier> [ ( <comma> <Pascal host identifier> )... ] <colon
>
      <Pascal type specification> <semicolon>

<Pascal type specification> ::=
      PACKED ARRAY
          <left bracket> 1 <double period> <length> <right bracket>
        OF CHAR
          [ CHARACTER SET [ IS ]
                <character set specification> ]
    | PACKED ARRAY
          <left bracket> 1 <double period> <length> <right bracket>
        OF BIT
    | INTEGER
    | REAL
    | CHAR [ CHARACTER SET
                                [ IS ] <character set specification> ]
    | BIT

<PL/I variable definition> ::=
    (DCL | DECLARE)
        (   <PL/I host identifier>
          | <left paren> <PL/I host identifier>
                [ ( <comma> <PL/I host identifier> )... ] <right paren> )
    <PL/I type specification>
    [ <character representation>... ] <semicolon>

<PL/I type specification> ::=
      ( CHAR | CHARACTER ) [ VARYING ]
          <left paren><length><right paren>
          [ CHARACTER SET
                [ IS ] <character set specification> ]
    | BIT [ VARYING ] <left paren><length><right paren>
    | <PL/I type fixed decimal> <left paren> <precision>
          [ <comma> <scale> ] <right paren>
    | <PL/I type fixed binary> [ <left paren> <precision> <right paren> ]
    | <PL/I type float binary> <left paren> <precision> <right paren>

<PL/I type fixed decimal> ::=
      ( DEC | DECIMAL ) FIXED
    | FIXED ( DEC | DECIMAL )

<PL/I type fixed binary> ::=
      ( BIN | BINARY ) FIXED
    | FIXED ( BIN | BINARY )

<PL/I type float binary> ::=
      ( BIN | BINARY ) FLOAT
    | FLOAT ( BIN | BINARY )

<embedded SQL end declare> ::=
    <SQL prefix> END DECLARE SECTION
        [ <SQL terminator> ]

<embedded SQL MUMPS declare> ::=
    <SQL prefix>
      BEGIN DECLARE SECTION
        [ <embedded character set declaration> ]
        [ <host variable definition>... ]
      END DECLARE SECTION
    <SQL terminator>

<embedded SQL statement> ::=
    <SQL prefix>
      <statement or declaration>
    [ <SQL terminator> ]

<statement or declaration> ::=
      <declare cursor>
    | <dynamic declare cursor>
    | <temporary table declaration>
    | <embedded exception declaration>
    | <SQL procedure statement>

<embedded exception declaration> ::=
    WHENEVER <condition> <condition action>

<condition> ::=
    SQLERROR | NOT FOUND

<condition action> ::=
    CONTINUE | <go to>

<go to> ::=
    ( GOTO | GO TO ) <goto target>

<goto target> ::=
      <host label identifier>
    | <unsigned integer>
    | <host PL/I label variable>

<host label identifier> ::= !!<EMPHASIS>(See the Syntax Rules.)

<host PL/I label variable> ::= !!<EMPHASIS>(See the Syntax Rules.)

<preparable statement> ::=
      <preparable SQL data statement>
    | <preparable SQL schema statement>
    | <preparable SQL transaction statement>
    | <preparable SQL session statement>
    | <preparable implementation-defined statement>

<preparable SQL data statement> ::=
      <delete statement: searched>
    | <dynamic single row select statement>
    | <insert statement>
    | <dynamic select statement>
    | <update statement: searched>
    | <preparable dynamic delete statement: positioned>
    | <preparable dynamic update statement: positioned>

<dynamic single row select statement> ::= <query specification>

<dynamic select statement> ::= <cursor specification>

<preparable dynamic delete statement: positioned> ::=
   DELETE [ FROM <table name> ]
      WHERE CURRENT OF <cursor name>

<preparable dynamic update statement: positioned> ::=
   UPDATE [ <table name> ]
      SET <set clause list>
      WHERE CURRENT OF <cursor name>

<preparable SQL schema statement> ::=
      <SQL schema statement>

<preparable SQL transaction statement> ::=
      <SQL transaction statement>

<preparable SQL session statement> ::=
      <SQL session statement>

<preparable implementation-defined statement> ::=
    !! <EMPHASIS>(See the Syntax Rules.)

<direct SQL statement> ::=
    <directly executable statement> <semicolon>

<directly executable statement> ::=
      <direct SQL data statement>
    | <SQL schema statement>
    | <SQL transaction statement>
    | <SQL connection statement>
    | <SQL session statement>
    | <direct implementation-defined statement>

<direct SQL data statement> ::=
      <delete statement: searched>
    | <direct select statement: multiple rows>
    | <insert statement>
    | <update statement: searched>
    | <temporary table declaration>

<direct select statement: multiple rows> ::=
    <query expression> [ <order by clause> ]

<direct implementation-defined statement> ::=
    !!<EMPHASIS>(See the Syntax Rules)

<SQL object identifier> ::=
    <SQL provenance> <SQL variant>

<SQL provenance> ::= <arc1> <arc2> <arc3>

<arc1> ::= iso | 1 | iso <left paren> 1 <right paren>

<arc2> ::= standard | 0 | standard <left paren> 0 <right paren>

<arc3> ::= 9075

<SQL variant> ::= <SQL edition> <SQL conformance>

<SQL edition> ::= <1987> | <1989> | <1992>

<1987> ::= 0 | edition1987 <left paren> 0 <right paren>

<1989> ::= <1989 base> <1989 package>

<1989 base> ::= 1 | edition1989 <left paren> 1 <right paren>

<1989 package> ::= <integrity no> | <integrity yes>

<integrity no> ::= 0 | IntegrityNo <left paren> 0 <right paren>

<integrity yes> ::= 1 | IntegrityYes <left paren> 1 <right paren>

<1992> ::= 2 | edition1992 <left paren> 2 <right paren>

<SQL conformance> ::= <low> | <intermediate> | <high>

<low> ::= 0 | Low <left paren> 0 <right paren>

<intermediate> ::= 1 | Intermediate <left paren> 1 <right paren>

<high> ::= 2 | High <left paren> 2 <right paren>

34. ¼ҡѧ SQL 

34.1 PostgreSQL 

   SQL Ҳ PostgreSQL ɢSQL ָ src/tutorial Ŀ¼
   
   
34.2  URL ָ

   ѧߵ SQL µطҵ
     * [309]http://w3.one.net/~jhoffman/sqltut.htm
       
   ѣ
     * Jim Hoffman [310]jhoffman@one.net
       
   John Hoffman ҲƼַ
     * SQL Reference
       [311]http://www.contrib.andrew.cmu.edu/~shadow/sql.html
     * Ask the SQL Pro [312]http://www.inquiry.com/techtips/thesqlpro/
     * SQL Pro's Relational DB Useful Sites
       [313]http://www.inquiry.com/techtips/thesqlpro/usefulsites.html
     * Programmer's Source
       [314]http://infoweb.magi.com/~steve/develop.html
     * DBMS Sites [315]http://info.itu.ch/special/wwwfiles ȡ
       compdb.html 
     * DB Ingredients [316]http://www.compapp.dcu.ie/databases/f017.html
     * Web Authoring [317]http://www.stars.com/Tutorial/CGI/
     * Computing Dictionary
       [318]http://wfn-shop.princeton.edu/cgi-bin/foldoc
     * DBMS Lab/Links [319]http://www-ccs.cs.umass.edu/db.html
     * SQL FAQ
       [320]http://epoch.CS.Berkeley.EDU:8000/sequoia/dba/montage/FAQ Go
       here and see file SQL_TOC.html
     * SQL Databases
       [321]http://chaos.mur.csu.edu.au/itc125/cgi/sqldb.html
     * RIT Database Design Page
       [322]http://www.it.rit.edu/~wjs/IT/199602/icsa720/icsa720postings.
       html
     * Database Jump Site [323]http://www.pcslink.com/~ej/dbweb.html
     * Programming Tutorials on the Web
       [324]http://www.eng.uc.edu/~jtilley/tutorial.html
     * Development Resources
       [325]http://www.ndev.com/ndc2/support/resources.htp
     * Query List [326]http://ashok.pair.com/sql.htm
     * IMAGE SQL Miscellaneous
       [327]http://jazz.external.hp.com/training/sqltables/main.html
     * Internet Resource List
       [328]http://www.eit.com/web/netservices.html
       
35. ¼Linux ٰװָ

   ƻ Linux װ PostgreSQLڰװ Linux ʱҪο
   ⸽¼ָʾĵطǰ
     * Salient Features of Linux - Why Linux is better as a database
       server when compared with Windows 95/NT
     * 10 minutes Linux Quick Install Instructions
     * Microsoft-Linux Analogy List
     * Quick Steps to Recompile the Linux Kernel
       
     * ҳ [329]http://www.aldev.8m.com
     * ӳվ̨ [330]http://www.aldev.webjump.com
     * ӳվ̨ [331]http://www.homepages.infoseek.com/~aldev1/index.html
     * ӳվ̨ [332]http://www3.bcity.com/aldev/
     * ӳվ̨ [333]http://www.members.spree.com/technology/aldev/

References

   1. mailto:alavoor@yahoo.com
   2. mailto:a9504480@graduate.hku.hk
   3. mailto:scrappy@postgreSQL.org
   4. http://www.greatbridge.com/
   5. http://www.tcx.se/
   6. http://www.lsl.com/
   7. http://www.cheapbytes.com/
   8. http://www.debian.org/vendors.html
   9. http://www.postgresql.org/
  10. mailto:lamar.owen@wgcr.org
  11. http://www.ramifordistat.net/postgres
  12. http://www.postgresql.org/
  13. http://www.redhat.com/pub/contrib/i386/
  14. ftp://ftp.redhat.com/pub/contrib/i386/
  15. ftp://ftp.postgresql.org/pub/bindist
  16. http://www.postgresql.org/
  17. http://logical.thought.net/postgres95/
  18. http://www.itm.tu-clausthal.de/mirrors/postgres95/
  19. http://s2k-ftp.cs.berkeley.edu:8000/postgres95/
  20. http://xenium.pdi.net/PostgreSQL/
  21. http://s2k-ftp.cs.berkeley.edu:8000/postgres95/
  22. ftp://ftp.postgresql.org/pub
  23. ftp://ftp.chicks.net/pub/postgresql
  24. ftp://ftp.emsi.priv.at/pub/postgres/
  25. ftp://ftp.itm.tu-clausthal.de/pub/mirrors/postgres95
  26. ftp://rocker.sch.bme.hu/pub/mirrors/postgreSQL
  27. ftp://ftp.jaist.ac.jp/pub/dbms/postgres95
  28. ftp://ftp.luga.or.at/pub/postgres95
  29. ftp://postgres95.vnet.net/pub/postgres95
  30. ftp://ftpza.co.za/mirrors/postgres
  31. ftp://sunsite.auc.dk/pub/databases/postgresql
  32. ftp://ftp.task.gda.pl/pub/software/postgresql
  33. ftp://xenium.pdi.net/pub/PostgreSQL
  34. ftp://sunsite.unc.edu/
  35. http://www.ramifordistat.net/postgres
  36. mailto:lamar.owen@wgcr.org
  37. http://www.postgresql.org/
  38. http://www.RPM.org/
  39. http://www.aldev.8m.com/
  40. http://www.aldev.webjump.com/
  41. file://localhost/tmp/zh-sgmltools.32571/PostgreSQL-HOWTO.txt.html#Examples RPM
  42. file://localhost/tmp/zh-sgmltools.32571/PostgreSQL-HOWTO.txt.html#Examples RPM
  43. file://localhost/tmp/zh-sgmltools.32571/PostgreSQL-HOWTO.txt.html#Examples RPM
  44. file://localhost/tmp/zh-sgmltools.32571/PostgreSQL-HOWTO.txt.html#Examples RPM
  45. ftp://ftp.redhat.com/pub/contrib/i386
  46. http://www.blackdown.org/
  47. ftp://ftp.redhat.com/pub/contrib/i386
  48. file://localhost/tmp/zh-sgmltools.32571/PostgreSQL-HOWTO.txt.html#Examples RPM
  49. http://www.insightdist.com/psqlodbc/
  50. http://www.mutinybaysoftware.com/
  51. ftp://ftp.postgresql.org/pub/patches
  52. file://localhost/tmp/zh-sgmltools.32571/PostgreSQL-HOWTO.txt.html#PHP
  53. file://localhost/tmp/zh-sgmltools.32571/PostgreSQL-HOWTO.txt.html#PHP
  54. http://www.ist.co.uk/xd
  55. http://www.troll.no/
  56. ftp://ftp.troll.no/
  57. http://www.kaze.stetson.edu/cdevel/code_crusader/about.html
  58. http://www.metrowerks.com/
  59. http://www.redhat.com/
  60. http://www.cygnus.com/
  61. http://www.inprise.com/
  62. http://www.inprise.com/
  63. file://localhost/tmp/zh-sgmltools.32571/PostgreSQL-HOWTO.txt.html#Perl Database Interface
  64. ftp://ftp.redhat.com/pub/contrib/i386/lesstiff*.rpm
  65. http://www.LinuxMall.com/products/00487.html
  66. ftp://ftp.redhat.com/pub/contrib/i386/jcc*.rpm
  67. http://www.scriptics.com/
  68. http://www.tcltk.com/
  69. http://www.neuron.com/
  70. ftp://ftp.redhat.com/pub/contrib/i386/visualtcl*.rpm
  71. http://sunscript.sun.com/
  72. http://sunscript.sun.com/TclTkCore/
  73. ftp://ftp.sunlabs.com/pub/tcl/tcl8.0a2.tar.Z
  74. ftp://ftp.redhat.com/pub/contrib/i386/free*.rpm
  75. ftp://ftp.redhat.com/pub/contrib/i386/spec*.rpm
  76. http://www.man.ac.uk/~whaley/kj/kanch.html
  77. http://www.redhat.com/
  78. http://www.rpi.edu/~payned/xwpe/
  79. ftp://ftp.redhat.com/pub/contrib/i386/xwpe*.rpm
  80. ftp://ftp.redhat.com/pub/contrib/i386/xwb*.rpm
  81. ftp://ftp.redhat.com/pub/contrib/i386/nedit*.rpm
  82. http://www.insightdist.com/psqlodbc
  83. http://www.postgresql.org/
  84. http://www.iodbc.org/
  85. http://www.openlinksw.com/
  86. http://www.insightdist.com/psqlodbc
  87. http://www.ids.net/~bjepson/freeODBC/
  88. http://www.openlinksw.com/
  89. http://www.demon.co.uk/finder/postgres/index.html
  90. ftp://ftp.ai.mit.edu/people/rst/rst-jdbc.tar.gz
  91. http://www.openlinksw.com/
  92. http://www.retep.org.uk/postgres
  93. http://eagle.eku.edu/tools/jdbc/faq.html
  94. http://splash.javasoft.com/jdbc
  95. http://www.javasoft.com/products/jdk/1.1/docs/guide/jdbc
  96. http://javanese.yoyoweb.com/JDBC/FAQ.txt
  97. file://localhost/tmp/zh-sgmltools.32571/PostgreSQL-HOWTO.txt.html#Testing Java
  98. ftp://ftp.redhat.com/pub/contrib/i386
  99. http://www.blackdown.org/
 100. file://localhost/tmp/zh-sgmltools.32571/PostgreSQL-HOWTO.txt.html#Testing Java
 101. mailto:E.Mergl@bawue.de
 102. ftp://ftp.kciLink.com/pub/PostgresPerl-1.3.tar.gz
 103. http://www.perl.com/perl/index.html
 104. http://reference.perl.com/
 105. http://www.yahoo.com/Computers_and_Internet/Programming_Languages/Perl/
 106. ftp://ftp.redhat.com/pub/contrib/i386
 107. http://www.accessone.com/~jql/perlqt.html
 108. ftp://ftp.redhat.com/pub/contrib/i386
 109. ftp://ftp.redhat.com/pub/contrib/i386
 110. http://reference.perl.com/query.cgi?ui
 111. http://reference.perl.com/query.cgi?database
 112. http://www.perl.com/CPAN-local/modules/by-module/B/
 113. http://www.perl.com/CPAN/authors/id/MERLYN/sh2perl-0.02.tar.gz
 114. mailto:descarte@hermetica.com
 115. http://www.perl.com/CPAN/modules/by-module/DBD/
 116. http://www.perl.com/CPAN
 117. http://www.hermetica.com/technologia/perl/DBI
 118. http://www.fugue.com/dbi/
 119. ftp://ftp.demon.co.uk/pub/perl/db
 120. http://www-ccs.cs.umass.edu/db.html
 121. http://www.odmg.org/odmg93/updates_dbarry.html
 122. http://www.jcc.com/sql_stnd.html
 123. http://www.postgresql.org/
 124. mailto:E.Mergl@bawue.de
 125. http://www.hermetica.com/technologia/perl/DBI/doc/dbispec
 126. http://www.hermetica.com/technologia/perl/DBI/tidbits
 127. http://www.tpj.com/
 128. http://www.fugue.com/dbi
 129. mailto:dbi-announce-request@fugue.com
 130. mailto:dbi-dev-request@fugue.com
 131. mailto:dbi-users-request@fugue.com
 132. http://outside.organic.com/mail-archives/dbi-users/
 133. http://www.rosat.mpe-garching.mpg.de/mailing-lists/PerlDB-Interest
 134. http://www.perl.com/cgi-bin/cpan_mod?module=Devel::CoreStack
 135. http://www.hermetica.com/technologia/perl/DBI/win32
 136. http://www.roth.net/
 137. http://www.apache.org/
 138. http://www.perl.com/cgi-bin/cpan_mod?module=mod_perl
 139. http://www.perl.com/cgi-bin/cpan_mod?module=Apache::DBI
 140. http://www.perl.com/perl/faq/index.html
 141. http://www.hermetica.com/technologia/oracle/oci/orathreads.tar.gz
 142. http://www.perl.co.uk/tpc
 143. file://localhost/tmp/zh-sgmltools.32571/PostgreSQL-HOWTO.txt.html#Testing Perl
 144. http://www.flex.ro/pgaccess
 145. mailto:teo@flex.ro
 146. http://www.troubador.com/~keidav/index.html
 147. mailto:keidav@whidbey.com
 148. http://www.ucolick.org/~de/
 149. http://www.troubador.com/~keidav/index.html
 150. mailto:de@ucolick.org
 151. http://www.mutinybaysoftware.com/
 152. mailto:keidav@mutinybaysoftware.com
 153. http://www.troubador.com/~keidav/index.html
 154. mailto:keidav@whidbey.com
 155. http://www.ucolick.org/~de
 156. http://www.ucolick.org/~de/Tcl/pictures
 157. mailto:de@ucolick.org
 158. http://www.uk.research.att.com/vnc
 159. http://www.warehouse.com/
 160. http://www.networktechinc.com/servswt.html
 161. http://www.scene.demon.co.uk/qswitch.htm
 162. http://www.cybex.com/
 163. http://www.raritan.com/
 164. http://www.real-star.com/kvm.htm
 165. http://www.belkin.com/
 166. http://www.betterbox.com/info.html
 167. http://www.lsl.com/
 168. http://www.cheapbytes.com/
 169. http://www.enhydra.org/
 170. http://www.lutris.com/
 171. http://www.linuxdoc.org/HOWTO/Enterprise-Java-for-Linux-HOWTO.html
 172. http://www.zope.org/
 173. http://www.python.org/
 174. http://www.man.ac.uk/~whaley/ag/appgen.html
 175. ftp://ftp.mcc.ac.uk/pub/linux/ALPHA/AppGEN
 176. mailto:andrew@arthur.smuht.nwest.nhs.uk
 177. http://www.cis-computer.com/software/dbengine/
 178. http://www.neosoft.com/neowebscript/
 179. mailto:emmel@h-e-i.de
 180. http://www.heitml.com/
 181. http://www.h-e-i.deom/
 182. http://www.aolserver.com/
 183. http://photo.net/wtr/aolserver/introduction-1.html
 184. http://www.homeport.org/~shevett/pts/
 185. ftp://ftp.nerosworld.com/pub/SQL/dbf2sql/
 186. ftp://ftp.postgresql.org/pub/incoming/dbf2pg-3.0.tar.gz
 187. mailto:M.Boekhold@et.tudelft.nl
 188. http://www.python.org/
 189. http://mdbtools.sourceforge.net/
 190. http://lists.sourceforge.net/mailman/listinfo/mdbtools-dev
 191. http://www.oswego.edu/Earp
 192. ftp://ftp.oswego.edu/
 193. ftp://ftp.oswego.edu/
 194. http://www.php.net/
 195. http://www.vex.net/php
 196. http://www.fe.de.php.net/
 197. http://www.sk.php.net/
 198. http://php.iquest.net/
 199. mailto:rasmus@lerdorf.on.ca
 200. mailto:asussman@vidya.com
 201. http://www.php.net/
 202. mailto:angio@aros.net
 203. ftp://ftp.aros.net/pub/util/apache/mod_cgi_redirect.c
 204. http://www.druid.net/pygresql/
 205. http://www.druid.net/~darcy/
 206. ftp://ftp.via.ecp.fr/pub/python/contrib/Database/PyGres95.README
 207. mailto:darcy@druid.net
 208. mailto:andre@chimay.via.ecp.fr
 209. mailto:andre@via.ecp.fr
 210. ftp://ftp.python.org/pub/www.python.org/1.5/python1.5b2.tar.gz
 211. ftp://ftp.druid.net/pub/distrib/PyGreSQL-2.1.tgz
 212. ftp://ftp.via.ecp.fr/pub/python/contrib/Database/PyGres95-1.0b.tar.gz
 213. http://www.python.org/
 214. http://epoch.cs.berkeley.edu:8000/postgres95/index.html
 215. ftp://ftp.druid.net/pub/distrib/PyGreSQL-2.1.tgz
 216. http://www.via.ecp.fr/via/products/pygres.html
 217. mailto:majordomo@vex.net
 218. mailto:andre@via.ecp.fr
 219. file://localhost/tmp/zh-sgmltools.32571/PostgreSQL-HOWTO.txt.html#Testing PyGreSQL
 220. http://www.lava.net/beowulf/programming/wdb
 221. http://www.eol.ists.ca/~dunlop/wdb-p95/
 222. mailto:dunlop@eol.ists.ca
 223. file://localhost/tmp/zh-sgmltools.32571/PostgreSQL-HOWTO.txt.html#Testing libpq
 224. ftp://ftp.lysator.liu.se/pub/linus
 225. mailto:linus@epact.se
 226. file://localhost/tmp/zh-sgmltools.32571/PostgreSQL-HOWTO.txt.html#Testing ecpg
 227. mailto:nico@overnet.com.ar
 228. ftp://ftp.overnet.com.ar/pub/utils/linux/bitpgsql.tgz
 229. ftp://ftp.sra.co.jp/pub/cmd/postgres/
 230. http://www.askesis.nl/
 231. http://www.postgresql.org/
 232. file://localhost/tmp/zh-sgmltools.32571/PostgreSQL-HOWTO.txt.html#installpgsql
 233. http://www.cygnus.com/misc/gnu-win32
 234. http://sourceware.cygnus.com/
 235. mailto:horak@mmp.plzen-city.cz
 236. mailto:JKraaijeveld@askesis.nl
 237. mailto:kevlo@FreeBSD.org
 238. http://www.freebsd.org/~kevlo/postgres/portNT.html
 239. ftp://go.cygnus.com/pub/sourceware.cygnus.com/cygwin/latest/full.exe
 240. http://metalab.unc.edu/LDP/HOWTO/Vim-HOWTO.html
 241. ftp://ftp.xemacs.org/pub/xemacs/aux/
 242. http://www.multione.capgemini.fr/tools/pack_ipc
 243. http://www.yahoo.com/
 244. http://www.lycos.com/
 245. http://www.hotmail.com/
 246. http://www.postgresql.org/
 247. mailto:pgsql-questions@postgresql.org
 248. mailto:pgsql-hackers@postgresql.org
 249. mailto:pgsql-ports@postgresql.org
 250. mailto:pgsql-docs@postgresql.org
 251. mailto:pgsql-questions-request@postgresql.org
 252. mailto:pgsql-hackers-request@postgresql.org
 253. mailto:pgsql-ports-request@postgresql.org
 254. mailto:pgsql-docs-request@postgresql.org
 255. http://www.postgresql.org/mhonarc/pgsql-questions
 256. ftp://ftp.postgresql.org/
 257. mailto:majordomo@tlali.iztacala.unam.mx
 258. http://www.postgresql.org/docs
 259. file://localhost/tmp/zh-sgmltools.32571/PostgreSQL-HOWTO.txt.html#Appendix B
 260. http://www.naiua.org/std-orgs.html
 261. http://www.ansi.org/docs
 262. http://www.jcc.com/
 263. http://www.contrib.andrew.cmu.edu/~shadow/sql.html
 264. file://localhost/tmp/zh-sgmltools.32571/PostgreSQL-HOWTO.txt.html#Appendix A
 265. file://localhost/tmp/zh-sgmltools.32571/PostgreSQL-HOWTO.txt.html#SQL 1998
 266. file://localhost/tmp/zh-sgmltools.32571/PostgreSQL-HOWTO.txt.html#Appendix B
 267. ftp://FTP.cs.arizona.edu/tsql/tsql2/
 268. ftp://FTP.cs.arizona.edu/tsql/tsql2/sql3/
 269. mailto:rts@cs.arizona.edu
 270. mailto:boehlen@iesd.auc.dk
 271. http://www.cs.auc.dk/general/DBS/tdb/TimeCenter/Software
 272. mailto:pgsql-questions@postgresql.org
 273. file://localhost/tmp/zh-sgmltools.32571/comp.databases.postgresql.general
 274. file://localhost/tmp/zh-sgmltools.32571/comp.databases.postgresql.hackers
 275. file://localhost/tmp/zh-sgmltools.32571/comp.databases.postgresql.doc
 276. file://localhost/tmp/zh-sgmltools.32571/comp.databases.postgresql.bugs
 277. file://localhost/tmp/zh-sgmltools.32571/linux.postgres
 278. http://www.postgresql.org/
 279. http://www.postresql.org/
 280. http://www.greatbridge.com/
 281. http://www.redhat.com/
 282. http://www.wgs.com/
 283. http://www.ac.com/
 284. http://www.caldera.com/tech-ref/linuxapps/linapps.html
 285. http://www.xnet.com/~blatura/linapps.shtml
 286. http://linas.org/linux/db.html
 287. mailto:linas@fc.net
 288. http://cuiwww.unige.ch/~scg/FreeDB/FreeDB.list.html
 289. http://www.hex.net/~cbbrowne/rdbms.html
 290. mailto:cbbrowne@hex.net
 291. http://SAL.KachinaTech.COM/H/1/
 292. http://SAL.KachinaTech.COM/H/2/
 293. http://SAL.KachinaTech.COM/H/3/
 294. http://bunny.cs.uiuc.edu/sigmod/databaseSoftware/
 295. http://www.postgresql.org/docs/faq-english.shtml
 296. ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/other-formats/
 297. ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO
 298. ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO
 299. http://www.xs4all.nl/~cg/sgmltools/
 300. http://sunsite.unc.edu/LDP/HOWTO/PostgreSQL-HOWTO.html
 301. http://www.caldera.com/LDP/HOWTO/PostgreSQL-HOWTO.html
 302. http://www.WGS.com/LDP/HOWTO/PostgreSQL-HOWTO.html
 303. http://www.cc.gatech.edu/linux/LDP/HOWTO/PostgreSQL-HOWTO.html
 304. http://www.redhat.com/linux-info/ldp/HOWTO/PostgreSQL-HOWTO.html
 305. http://sunsite.unc.edu/LDP/hmirrors.html
 306. http://www.linux.org.tw/CLDP/HOWTO/
 307. http://www.linux.org.tw/CLDP/
 308. http://www.cs.wisc.edu/~ghost
 309. http://w3.one.net/~jhoffman/sqltut.htm
 310. mailto:jhoffman@one.net
 311. http://www.contrib.andrew.cmu.edu/~shadow/sql.html
 312. http://www.inquiry.com/techtips/thesqlpro/
 313. http://www.inquiry.com/techtips/thesqlpro/usefulsites.html
 314. http://infoweb.magi.com/~steve/develop.html
 315. http://info.itu.ch/special/wwwfiles
 316. http://www.compapp.dcu.ie/databases/f017.html
 317. http://www.stars.com/Tutorial/CGI/
 318. http://wfn-shop.princeton.edu/cgi-bin/foldoc
 319. http://www-ccs.cs.umass.edu/db.html
 320. http://epoch.CS.Berkeley.EDU:8000/sequoia/dba/montage/FAQ
 321. http://chaos.mur.csu.edu.au/itc125/cgi/sqldb.html
 322. http://www.it.rit.edu/~wjs/IT/199602/icsa720/icsa720postings.html
 323. http://www.pcslink.com/~ej/dbweb.html
 324. http://www.eng.uc.edu/~jtilley/tutorial.html
 325. http://www.ndev.com/ndc2/support/resources.htp
 326. http://ashok.pair.com/sql.htm
 327. http://jazz.external.hp.com/training/sqltables/main.html
 328. http://www.eit.com/web/netservices.html
 329. http://www.aldev.8m.com/
 330. http://www.aldev.webjump.com/
 331. http://www.homepages.infoseek.com/~aldev1/index.html
 332. http://www3.bcity.com/aldev/
 333. http://www.members.spree.com/technology/aldev/
