Index of /postgresql/FAQ/FAQ_japanese.html |
¸¶Ê¸ºÇ½ª¹¹¿·Æü: Last updated: Tue Mar 20 13:43:40 EDT 2007
¸½ºß¤Î°Ý»ý´ÉÍý¼Ô: Bruce Momjian (bruce@momjian.us)
Maintainer of Japanese Translation: Jun Kuwamura (juk at PostgreSQL.jp)
¤³¤Îʸ½ñ¤ÎºÇ¿·ÈÇ¤Ï http://www.postgresql.org/docs/faqs.FAQ.html ¤Ç¸«¤ë¤³¤È¤¬¤Ç¤¤Þ¤¹¡£
¥×¥é¥Ã¥È¥Û¡¼¥à¤ËÆÃͤμÁÌä¤Ë¤Ä¤¤¤Æ¤Ï:
http://www.postgresql.org/docs/faq/
¤Ë²òÅú¤¬¤¢¤ê¤Þ¤¹¡£
(°Ê²¼¡¢Ìõ¼Ô¤Ë¤è¤ëÃí¼á¤ò [ÌõÃí¡§ ¤È ] ¤È¤Ç°Ï¤ó¤Çµ¤·¤Þ¤¹¡£)
[ÌõÃí¡§
ÆüËܸìÈǤÎFAQ¤Ï¡¢
http://www.postgresql.org/docs/faqs.FAQ_japanese.html
¤Ë¤¢¤ê¤Þ¤¹¡£
ºÇ¿·¤ÎÆüËܸìÈǤˤĤ¤¤Æ¤Ï¡¢¤³¤Îʸ½ñ¤ÎºÇ¸å¤Ë¤¢¤ë¡ÖÆüËܸìÈǤˤĤ¤¤Æ¡×¤ò¤´¤é¤ó¤¯¤À¤µ¤¤¡£
]
PostgreSQL¤ÏPost-Gres-Q-L(¥Ý¥¹¥È¡¦¥°¥ì¥¹¡¦¥¥å¡¼¡¦¥¨¥ë) ¤Èȯ²»¤·¤Þ¤¹¡£
¤Þ¤¿¡¢¤È¤¤Ë¤è¤Ã¤Æ¤Ïñ½ã¤Ë Postgres ¤È¤·¤Æ »²¾È¤µ¤ì¤Þ¤¹¡£¤³¤Îȯ²»¤òʹ¤¤¿¤¤¿Í¤Î¤¿¤á¤Ë¡¢ MP3¥Õ¥©¡¼ ¥Þ¥Ã¥È¤Î²»À¼¥Õ¥¡¥¤¥ë¤¬¤¢¤ê¤Þ¤¹¡£PostgreSQL ¤Ï¥ª¥Ö¥¸¥§¥¯¥È-¥ê¥ì¡¼¥·¥ç¥Ê¥ë¥Ç¡¼¥¿¥Ù¡¼¥¹¥·¥¹¥Æ¥à¤Ç¡¢ ÅÁÅýŪ¤Ê¾¦Íѥǡ¼¥¿¥Ù¡¼¥¹¥·¥¹¥Æ¥à¤Ë¡¢¼¡À¤ÂåDBMS¥·¥¹¥Æ ¥à¤Ë¸«¤é¤ì¤ë¤è¤¦¤Ê²þÎɤ¬»Ü¤µ¤ì¤¿ÆÃħ¤òͤ·¤Þ¤¹¡£PostgreSQL¤Ï¡¢ÌµÎÁ¤Ç ´°Á´¤Ê¥½¡¼¥¹¥³¡¼¥É¤ò¼ê¤ËÆþ¤ì¤ë¤³¤È¤¬¤Ç¤¤Þ¤¹¡£
PostgreSQL ¤Î³«È¯¤Ï¡¢¤Û¤È¤ó¤É¤¬¡¢À¤³¦Ãæ¤Ë¤Ò¤í¤¬¤Ã¤¿¥Ü¥é¥ó¥Æ¥£¥¢¤Î ³«È¯¼Ô¤Ë¤è¤Ã¤Æ¡¢¥¤¥ó¥¿¡¼¥Í¥Ã¥È¤òÄ̤·¤¿¥³¥ß¥å¥Ë¥±¡¼¥·¥ç¥ó¤Ë¤è¤Ã¤Æ¹Ô¤ï ¤ì¤Æ¤¤¤Þ¤¹¡£¥³¥ß¥å¥Ë¥Æ¥£¤Ë¤è¤ë¥×¥í¥¸¥§¥¯¥È¤Ç¤¢¤ë¤¿¤á¡¢¤É¤Î´ë¶È¤ÎÀ©¸æ ¤â¤¦¤±¤Þ¤»¤ó¡£³«È¯¤Ë»²²Ã¤·¤¿¤±¤ì¤Ð¡¢ http://www.postgresql.org/files/documentation/faqs/FAQ_DEV.html ¤Ë¤¢¤ë³«È¯¼Ô¤ÎFAQ¤ò¸«¤Æ¤¯¤À¤µ¤¤¡£
PostgreSQL¤ÎÌçÈÖ¡¢Ãæ±û°Ñ°÷²ñ¡¢¤¢¤ë¤¤¤Ï¡¢¥³¥ó¥È¥í¡¼¥ë¤ò¤¹¤ë²ñ¼Ò¤ò õ¤½¤¦¤È¤·¤Æ¤â¡¢Äü¤á¤¶¤ë¤ò¤¨¤º ---- ¸ºß¤·¤Ê¤¤¤Î¤Ç¤¹¡£²æ¡¹¤Ï¡¢Ãæ¿´ ¤È¤Ê¤ë¥³¥ß¥Ã¥Æ¥£¤ÈCVS¥³¥ß¥Ã¥¿¤ò»ý¤Á¤Þ¤¹¤¬¡¢¤³¤ì¤é¤Î¥°¥ë¡¼¥×¤Ï¥³¥ó ¥È¥í¡¼¥ë¤¹¤ë¤¿¤á¤È¤¤¤¦¤è¤ê¤â¡¢´ÉÍý¾å¤Î¤â¤Î¤Ç¤¹¡£¤³¤³¤Ç¤Ï¡¢¥×¥í¥¸¥§ ¥¯¥È¤Ï¡¢¤À¤ì¤Ç¤â»²²Ã¤¬¤Ç¤¤ë³«È¯¼Ô¤È¥æ¡¼¥¶¤Î¥³¥ß¥å¥Ë¥Æ¥£¤Ë¤è¤êÊý¸þ ÉÕ¤±¤é¤ì¤Þ¤¹¡£ÆɼԤ¬¤ä¤é¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¤³¤È¤Ï¡¢¥á¡¼¥ê¥ó¥°¥ê¥¹¥È¤ò ¥µ¥Ö¥¹¥¯¥é¥¤¥Ö¤·¤Æ¡¢µÄÏÀ¤Ë »²²Ã¤¹¤ë¤³¤È¤Ç¤¹¡£¡ÊDeveloper's FAQ¤Ë¤Ï¡¢PostgreSQL³«È¯¤Ë²Ã¤ï¤êÊý¤Ë¤Ä¤¤¤Æ¤Î¾ðÊ󤬤¢¤ê¤Þ¤¹¡£¡Ë
PostgreSQL ¤Ï²¼µ¤ÎÃøºî¸¢¤Ë½¾¤¤¤Þ¤¹¡£
PostgreSQL¤Ï¸Å¤¯¤«¤é¤ÎBSD¥é¥¤¥»¥ó¥¹¤Î²¼¤ÇÇÛÉÛ¤µ¤ì¤Æ¤¤¤Þ¤¹¡£¤½¤ì ¤Ï´ðËÜŪ¤Ë¤Ï¡¢ÍøÍѼԤ¬¤½¤Î¥³¡¼¥É¤ò¹¥¤¾¡¼ê¤ËÍøÍѤ¹¤ë¤³¤È¤¬µö¤µ¤ì¤Æ ¤¤¤Þ¤¹¡£À©¸Â¤¬¤¢¤ë¤È¤¹¤ì¤Ð¡¢¤³¤Î¥½¥Õ¥È¥¦¥§¥¢¤Ëȼ¤¦¤¤¤«¤Ê¤ëÌäÂê¤Ë¤ª ¤¤¤Æ¤âˡŪ¤ËÀÕǤ¤ò²æ¡¹¤ËÉé¤ï¤»¤ë¤³¤È¤¬¤Ç¤¤Ê¤¤¤È¤¤¤¦¤³¤È¤Ç¤¹¡£ ¤Þ¤¿¡¢¤³¤ÎÃøºî¸¢É½¼¨¤¬¤³¤Î¥½¥Õ¥È¥¦¥§¥¢¤Î¤¹¤Ù¤Æ¤ÎÊ£À½¤Ëɽ¼¨¤¹¤ë¤³¤È ¤âɬÍפǤ¹¡£°Ê²¼¤Ë¡¢²æ¡¹¤¬¼ÂºÝ¤Ë»È¤Ã¤Æ¤¤¤ëBSD»ÈÍѵöÂú½ñ¤ò¼¨¤·¤Þ¤¹¡§
[ÌõÃí¡§ ÀµÊ¸¤Ï±Ñ¸ì¤Ç¤¹¡£»²¹Í¤È¤·¤Æ¡¢Ìõʸ¤òÊ»µ·ÇºÜ¤·¤Þ¤¹¡£ ]
PostgreSQL Data Base Management System
Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group Portions Copyright (c) 1994-1996 Regents of the University of California
Permission to use, copy, modify, and distribute this software and its documentation for any purpose, without fee, and without a written agreement is hereby granted, provided that the above copyright notice and this paragraph and the following two paragraphs appear in all copies.
IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
POSTGRESQL ¥Ç¡¼¥¿¥Ù¡¼¥¹´ÉÍý¥·¥¹¥Æ¥à ÉôʬŪÃøºî¸¢ (c) 1996-2007, PostgreSQL¹ñºÝ³«È¯¥Á¡¼¥à ÉôʬŪÃøºî¸¢ (c) 1994-1996 ¥«¥ê¥Õ¥©¥ë¥Ë¥¢Âç³ØËܹ» ËÜ¥½¥Õ¥È¥¦¥§¥¢¤ª¤è¤Ó¤½¤Îʸ½ñ°ì¼°¤Ï¾åµ¤ÎÃøºî¸¢É½¼¨¤È¡¢¤³¤Îʸ¾Ï ¤ª¤è¤Ó¤³¤ì¤Ë³¤¯Æó¤Ä¤ÎÃÊÍÁ´¤Æ¤ÎÊ£À½¤ËźÉÕ¤µ¤ì¤Æ¤¤¤ë¸Â¤ê¤Ë¤ª¤¤ ¤Æ¡¢»ÈÍÑ¡¢Ê£À½¡¢½¤Àµ¤ª¤è¤ÓÇÛÉդεö²Ä¤ò¡¢¤¤¤«¤Ê¤ëÌÜŪ¤Ç¤¢¤Ã¤Æ¤â¡¢ ̵½þ¤Ç¤«¤ÄƱ°Õ½ñ̵¤·¤Ë¹Ô¤Ê¤¨¤ë¤³¤È¤ò¤³¤³¤Ëǧ¤á¤Þ¤¹¡£ ¥«¥ê¥Õ¥©¥ë¥Ë¥¢Âç³Ø¤Ï¡¢¤¤¤«¤Ê¤ëÅö»ö¼Ô¤Ë¤¿¤¤¤·¤Æ¤â¡¢Íø±×¤Î²õ¼º¤ò ´Þ¤à¡¢Ä¾ÀÜŪ¡¢´ÖÀÜŪ¡¢ÆÃÊÌ¡¢¶öÁ³¤¢¤ë¤¤¤ÏɬÁ³Åª¤Ë¤«¤«¤ï¤é¤ºÀ¸¤¸¤¿ »³²¤Ë¤Ä¤¤¤Æ¡¢¤¿¤È¤¨¥«¥ê¥Õ¥©¥ë¥Ë¥¢Âç³Ø¤¬¤³¤ì¤é¤Î»³²¤Ë¤Ä¤¤¤ÆÁÊÄÉ ¤ò¼õ¤±¤Æ¤¤¤¿¤È¤·¤Æ¤â¡¢°ìÀÚ¤ÎÀÕǤ¤òÉ餤¤Þ¤»¤ó¡£ ¥«¥ê¥Õ¥©¥ë¥Ë¥¢Âç³Ø¤Ï¡¢¾¦ÍÑÌÜŪ¤Ë¤ª¤±¤ë°ÅÌÛ¤ÎÊݾڤȡ¢ÆÃÄêÌÜŪ¤Ç ¤ÎŬ¹çÀ¤Ë´Ø¤·¤Æ¤Ï¤â¤È¤è¤ê¡¢¤³¤ì¤é¤Ë¸Â¤é¤º¡¢¤¤¤«¤Ê¤ëÊݾڤâÊü´þ¤¹ ¤ë¤³¤È¤òÌÀ¸À¤·¤Þ¤¹¡£°Ê²¼¤ËÍÑ°Õ¤µ¤ì¤¿¥½¥Õ¥È¥¦¥§¥¢¤Ï¡Ö¤½¤Î¤Þ¤Þ¡×¤ò ´ðËܸ¶Íý¤È¤·¡¢¥«¥ê¥Õ¥©¥ë¥Ë¥¢Âç³Ø¤Ï¤½¤ì¤ò°Ý»ý¡¢»Ù±ç¡¢¹¹¿·¡¢²þÎɤ¢ ¤ë¤¤¤Ï½¤Àµ¤¹¤ëµÁ̳¤òÉ餤¤Þ¤»¤ó¡£ [ÌõÃí¡§ Ãøºî¸¢¤Ë´Ø¤¹¤ëÀµÊ¸¤Ï¾åµ¤Î±Ñ¸ì¤Ë¤è¤ëɽµ¤Ç¤¹¡£ÆüËܸìÌõ¤Ï¤¢¤¯¤Þ¤Ç »²¹ÍÄøÅ٤Ȥ·¤Æ¤¯¤À¤µ¤¤¡£ ]
°ìÈÌŪ¤Ë¡¢ºÇ¶á¤ÎUnix¸ß´¹¥×¥é¥Ã¥È¥Û¡¼¥à¤Ç¤¢¤ì¤ÐPostgreSQL¤ò²ÔƯ¤µ ¤»¤é¤ì¤ë¤Ï¤º¤Ç¤¹¡£¥ê¥ê¡¼¥¹¤Î»þÅÀ¤Ç¼ÂºÝ¤Ë¥Æ¥¹¥È¤ò¹Ô¤Ê¤Ã¤¿¤³¤È¤ÎÊó¹ð¤¬ ¤Ê¤µ¤ì¤¿¥×¥é¥Ã¥È¥Û¡¼¥à¤Ë¤Ä¤¤¤Æ¤Ï¥¤¥ó¥¹¥È¡¼¥ë¼ê°ú½ñ¤ËÎóµó¤·¤Æ¤¢¤ê¤Þ¤¹¡£
PostgreSQL ¤Ï¡¢Win2000 SP4, WinXP, ¤½¤·¤Æ¡¢Win2003 ¤Ê¤É Microsoft Windows NT¥Ù¡¼¥¹¤Î¥ª¥Ú¥ì¡¼¥Æ¥£¥ó¥°¥·¥¹¥Æ¥à¤Ç¡¢¥Í¥¤¥Æ¥£¥Ö¤ËÁö¤ê¤Þ¤¹¡£ ¤¢¤é¤«¤¸¤á¥Ñ¥Ã¥±¡¼¥¸¤Ë¤µ¤ì¤¿¥¤¥ó¥¹¥È¡¼¥é¤¬ http://pgfoundry.org/projects/pginstaller ¤Ë¤¢¤ê¡¢ÍøÍѤǤ¤Þ¤¹¡£MSDOS¥Ù¡¼¥¹¤ÎWindows¤Î¥Ð¡¼¥¸¥ç¥ó(Win95, Win98, WinMe)¤Ç¤Ï¡¢Cygwin¤ò»È¤Ã¤Æ PostgreSQL ¤òÁö¤é¤»¤ë¤³¤È¤¬¤Ç¤¤Þ¤¹¡£
[ÌõÃí pgInstaller ¤ÎÆþ¼ê¤ÏFTP¥ß¥é¡¼¥µ¥¤¥È¤Î win32 ¥Ç¥£¥ì¥¯¥È¥ê¤«¤é¤â²Äǽ¤Ç¤¹¡£ http://www.postgresql.org/mirrors-ftp.html ¾Ü¤·¤¯¤Ï¡¢¼¡¤Î WindowsÈǤ˴ؤ¹¤ëFAQ¤ÎÏÂÌõ¤ò¤´¤é¤ó¤¯¤À¤µ¤¤¡£ http://old.postgresql.jp/wg/jpugdoc/FAQ_windows.ja.html ]
¼¡¤Î¥µ¥¤¥È¤Ë Novell Netware 6 ¤Ø¤Î°Ü¿¢ÈǤ⤢¤ê¤Þ¤¹¡£ http://forge.novell.com ¤Þ¤¿¡¢OS/2 (eComStation) ¥Ð¡¼¥¸¥ç¥ó¤Ï¡¢ http://hobbes.nmsu.edu/cgi-bin/h-search?sh=1&button=Search&key=postgreSQL&stype=all&sort=type&dir=%2F¤Ë¤¢¤ê¤Þ¤¹¡£
Web¥Ö¥é¥¦¥¶·Ðͳ¤À¤È¡¢ http://www.postgresql.org/ftp/¡¢¤½¤ì¤«¤é¡¢ftp·Ðͳ¤À¤È¡¢ ftp://ftp.PostgreSQL.org/pub/ ¤ò»È¤¤¤Þ¤¹¡£
PostgreSQL ¤ÎºÇ¿·ÈǤϥС¼¥¸¥ç¥ó 8.2.5 ¤Ç¤¹¡£
²æ¡¹¤Ï¡¢1ǯËè¤Ë¥á¥¸¥ã¡¼¥ê¥ê¡¼¥¹¤ò¡¢¿ô¥õ·î¤´¤È¤Î¥Þ¥¤¥Ê¡¼¥ê¥ê¡¼¥¹¤ò ¹Ô¤Ê¤¦¤³¤È¤ò·×²è¤·¤Æ¤¤¤Þ¤¹¡£
[ÌõÃí
¥Ð¡¼¥¸¥ç¥óÈÖ¹æ¤Î x.y.z ¤ÎºÇ½é¤Î x.y ¤¬¥á¥¸¥ã¡¼¥ê¥ê¡¼¥¹¤ÎÈÖ¹æ¤ËÁê
Åö¤·¡¢ºÇ¸å¤Î z ¤¬¥Þ¥¤¥Ê¡¼¥ê¥ê¡¼¥¹¤ÎÈÖ¹æ¤Ë¤Ê¤ê¤Þ¤¹¡£¥á¥¸¥ã¡¼¥ê¥ê¡¼
¥¹¤ÎÈֹ椬Ʊ¤¸¤Ç¤¢¤ì¤Ð¡¢¥Ç¡¼¥¿¥Ù¡¼¥¹¡¦¥¯¥é¥¹¥¿¤Ë¸ß´¹À¤¬¤¢¤ê¤Þ¤¹¡£
]
PostgreSQL ¥³¥ß¥å¥Ë¥Æ¥£¤Ï¿¤¯¤Î¥æ¡¼¥¶¤Î¤¿¤á¤Ë¡¢ÅŻҥ᡼¥ë·Ðͳ¤Î»Ù ±ç¤òÄ󶡤·¤Æ¤¤¤Þ¤¹¡£ÅŻҥ᡼¥ë¥ê¥¹¥È¤ò¥µ¥Ö¥¹¥¯¥é¥¤¥Ö¤¹¤ë¤¿¤á¤Î¥á¥¤¥ó ¤È¤Ê¤ë¥¦¥§¥Ö¥µ¥¤¥È¤Ï http://www.postgresql.org/community/lists/¤Ç¤¹¡£¤³¤ì¤«¤é¡¢»Ï¤á¤ë ¤Î¤Ç¤¢¤ì¤Ð general ¤Þ¤¿¤Ï¡¢bugs ¤È¤¤¤Ã¤¿¥ê¥¹¥È¤¬¤è¤¤¤Ç ¤·¤ç¤¦¡£
¥á¥¸¥ã¡¼¤ÊIRC ¥Á¥ã¥ó¥Í¥ë¤Ï¡¢Freenode (irc.freenode.net)¤Î
#postgresql ¤È¤¤¤¦¥Á¥ã¥ó¥Í¥ë¤Ç¤¹¡£UNIX ¥³¥Þ¥ó¥É¤Ç¤Ï¡¢
irc -c '#PostgreSQL' "$USER" irc.freenode.net
¤ò»È¤Ã¤Æ
»²²Ã¤Ç¤¤Þ¤¹¡£Æ±¤¸¥Í¥Ã¥È¥ï¡¼¥¯¤Ë¡¢¥¹¥Ú¥¤¥ó¸ì¤Î¥Á¥ã¥ó¥Í¥ë
(#postgresql-es)¡¢¥Õ¥é¥ó¥¹¸ì¤Î¥Á¥ã¥ó¥Í¥ë
(#postgresqlfr)¡¢¥Ö¥é¥¸¥ë¸ì¥Á¥ã¥ó¥Í¥ë (#postgresql-br)
¤â¤¢¤ê¤Þ¤¹¡£¤Þ¤¿¡¢EFNet¤Ë¤âPostgreSQL¥Á¥ã¥ó¥Í¥ë¤¬¤¢¤ê¤Þ¤¹¡£
[ÌõÃí:
1999ǯ7·î23Æü¡¢ÆüËܥݥ¹¥È¥°¥ì¥¹¥æ¡¼¥¶¡¼²ñ¡¢Î¬¾ÎJPUG¤¬ÀßΩ¤µ¤ì¤Þ¤·¤¿¡£
JPUG ¤ÏÈó±ÄÍøÁÈ¿¥¤Ç¡¢PostgreSQL¤òÍøÍѤ¹¤ë¿Íã¤ÎÁê¸ß¶¨ÎϤξì¤È¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£
(2006ǯ ÆÃÄêÈó±ÄÍø³èÆ°(NPO)Ë¡¿ÍÆüËÜPostgreSQL¥æ¡¼¥¶²ñ¤Ë¤Ê¤ê¤Þ¤·¤¿¡£
Web²ñ°÷¤ÈÀµ²ñ°÷¤Î²ñÈñ¤Ï̵ÎÁ¤Ç¤¹¤¬¡¢¶¨»¿²ñ°÷¤Î²ñÈñ¤È²ñ°÷¤Î¹×¸¥¤Ç
²ñ¤Ï±¿±Ä¤µ¤ì¤Æ¤¤¤Þ¤¹¡£)
¾Ü¤·¤¯¤Ï¡¢JPUG ¤ÎWeb ¥µ¥¤¥È:
http://www.PostgreSQL.jp/
¤ò¤´¤é¤ó¤¯¤À¤µ¤¤¡£
ÆüËܸì¤ÎIRC¥Á¥ã¥ó¥Í¥ë '#PostgreSQL:*.jp' ¤â¸ºß¤·¤Þ¤¹¡£
]
¾¦ÍÑ¥µ¥Ý¡¼¥È²ñ¼Ò¤Î¥ê¥¹¥È¤Ï http://www.postgresql.org/support/professional_support¤Ë¤¢¤ê¤Þ¤¹¡£
http://www.postgresql.org/support/submitbug ¤ÎPostgreSQL ¥Ð¥°¥Õ¥©¡¼¥à¤òˬ¤ì¤Æ¤¯¤À¤µ¤¤¡£ ¥Ð¥°¥ì¥Ý¡¼¥È¤òÄó½Ð¤¹¤ë»ÅÊý ¤Ë¤Ä¤¤¤Æ¤Î¼ê°ú¤È»Ø¿Ë¤¬¤¢¤ê¤Þ¤¹¡£
¤½¤ì¤ÈƱ»þ¤Ë ftp ¥µ¥¤¥È ftp://ftp.PostgreSQL.org/pub/ ¤Ç¡¢ºÇ¿·¥Ð¡¼¥¸¥ç¥ó¤Î PostgreSQL ¤òõ¤·¤Æ¤ß¤Æ¤¯¤À¤µ¤¤¡£
PostgreSQL¤Ï³ÈÄ¥¤µ¤ì¤¿SQL:2003¤Î¥µ¥Ö¥»¥Ã¥È¤ò¥µ¥Ý¡¼¥È ¤·¤Þ¤¹¡£²æ¡¹¤Î¥Ú¡¼¥¸¤Î TODO ¥ê¥¹¥È¤Ë¡¢ ´ûÃΤΥХ°¤ä·çÍǽ¤ä¾Íè·×²è¤Ë¤Ä¤¤¤Æ¤Îµ½Ò¤¬¤¢¤ê¤Þ¤¹¡£
ÆÃħ¤ÎÍ×µá¤ÏÉáÄ̼¡¤Î¤¤¤º¤ì¤«¤Î²òÅú¤ÎÃæ¤Ë¤¢¤ê¤Þ¤¹¡§
²æ¡¹¤Ï¡¢PostgreSQL ¤Ë´Ø¤·¤Æ¡¢ÅŻҥ᡼¥ë¤ÇľÀÜÂбþ¤·¤Æ TODO ¥ê¥¹¥È¤òºÇ¿·¤Ë¹¹¿·¤·¤Æ¤æ¤¯¤Û¤¦¤¬¤è¤ê¸ú²ÌŪ¤Ç¤¢¤ë¤³¤È¤òÃΤäƤ¤¤Þ¤¹ ¤Î¤Ç¡¢¥Ð¥°ÄÉÀ×¥·¥¹¥Æ¥à¤Ï»È¤¤¤Þ¤»¤ó¡£ ¸½¼Â¤Ë¡¢¤³¤Î¥½¥Õ¥È¥¦¥§¥¢¤ÎÃæ¤Ç¥Ð¥°¤Ï¤½¤ì¤Û¤ÉŤ¯¤Ï¤¤Â³¤±¤Þ¤»¤ó¤·¡¢ ¿¤¯¤Î¥æ¡¼¥¶¤Ë±Æ¶Á¤¹¤ë¥Ð¥°¤ÏÁáµÞ¤Ë½¤Àµ¤µ¤ì¤Þ¤¹¡£PostgreSQL¤Î¥ê¥ê¡¼¥¹ ¤Ç¡¢¤¹¤Ù¤Æ¤ÎÊѹ¹ÅÀ¡¢²þÎÉÅÀ¡¢¤½¤·¤Æ¡¢½¤ÀµÅÀ¤òÃΤꤿ¤±¤ì¤Ð¡¢ CVS ¤Î¥í¥°¥á¥Ã¥»¡¼¥¸¤ò¸«¤Æ¤¯¤À¤µ¤¤¡£¥ê¥ê¡¼¥¹¥Î¡¼¥È¤Ë¤µ¤¨¡¢¤³¤Î¥½¥Õ¥È¥¦¥§¥¢ ¤Ë²Ã¤¨¤é¤ì¤¿¤¹¤Ù¤Æ¤ÎÊѹ¹ÅÀ¤ÏÌÖÍ夵¤ì¤Æ¤¤¤Þ¤»¤ó¡£
ÇÛÉÕ¤ÎÃæ¤Ë¡¢¤¤¤¯¤Ä¤«¤Î¥Þ¥Ë¥å¥¢¥ë¤È¥ª¥ó¥é¥¤¥ó¡¦¥Þ¥Ë¥å¥¢¥ë(¥Þ¥Ë¥å ¥¢¥ë¡¦¥Ú¡¼¥¸)¤ª¤è¤Ó¤¤¤¯¤Ä¤«¤Î¾®¤µ¤Ê¥Æ¥¹¥ÈÎãÂ꤬´Þ¤Þ¤ì¤Þ¤¹¡£ /doc¥Ç¥£¥ì¥¯¥È¥ê¤ò¤´¤é¤ó¤¯¤À¤µ¤¤¡£¤Þ¤¿¡¢¥Þ¥Ë¥å¥¢¥ë¤Ï¡¢ http://www.PostgreSQL.org/docs/¤Ç¥ª¥ó¥é¥¤¥ó¤Ç¤â±ÜÍ÷¤Ç¤¤Þ¤¹¡£
[ÌõÃí:
JPUG ʸ½ñ¡¦½ñÀÒ´ØϢʬ²Ê²ñ¤ÇËÝÌõ¤µ¤ì¤¿¥Þ¥Ë¥å¥¢¥ë¤â¤¢¤ê¤Þ¤¹¡£
http://www.postgresql.jp/document/pg803doc/
¥¤¥ó¥×¥ì¥¹¤«¤é¡¢
PostgreSQL¥ª¥Õ¥£¥·¥ã¥ë¥Þ¥Ë¥å¥¢¥ë¤È¤·¤Æ½ÐÈǤµ¤ì¤Æ¤¤¤Þ¤¹¡£
]
¥ª¥ó¥é¥¤¥ó¤Ç»²¾È¤Ç¤¤ë PostgreSQL ¤ÎËܤâ2ºý¤¢¤ê¤Þ¤¹¡£ http://www.PostgreSQL.org/docs/books/awbook.html
[ÌõÃí:
¤³¤ÎËܤϡ¢JPUG¡ÖPostgreSQL BookËÝÌõʬ²Ê²ñ¡×
¤ÇËÝÌõ¤µ¤ì¡¢¥Ô¥¢¥½¥ó¤«¤é
¡Ö¤Ï¤¸¤á¤Æ¤ÎPostgreSQL¡×¤È¤·¤Æ½ÐÈǤµ¤ì¤Æ¤¤¤Þ¤¹¡£
]
[ÌõÃí:
Ë®Ìõ¤Ï¡Ö¼ÂÁ© PostgreSQL¡×
¤¬¥ª¥é¥¤¥ê¡¼¤«¤é½ÐÈǤµ¤ì¤Æ¤¤¤Þ¤¹¡£
]
[ÌõÃí:
ÆüËܸì¤Î½ñÀÒÅù¤Ë¤Ä¤¤¤Æ¤Ï¡¢ÆüËÜPostgreSQL¥æ¡¼¥¶²ñ¤Î¡¢http://www.postgresql.jp/PostgreSQL/references.html
¤â¤´¤é¤ó¤¯¤À¤µ¤¤¡£
]
¥³¥Þ¥ó¥É¥é¥¤¥ó¤Î¥¯¥é¥¤¥¢¥ó¥È¥×¥í¥°¥é¥àpsql ¤Ë¤â¡¢·¿¡¢ ±é»»»Ò¡¢´Ø¿ô¡¢½¸Ì󡢤½¤Î¾¤Î¾ðÊó¤òÄ´¤Ù¤ë¤¿¤á¤Ë¡¢ÁÇÀ²¤é¤·¤¤ \d ¥³¥Þ¥ó¥É ¤¬¤¤¤¯¤Ä¤«¤¢¤ê¤Þ¤¹¡£ \? ¤òÆþÎϤ¹¤ë¤ÈÍøÍѲÄǽ¤Ê¥³¥Þ¥ó¥É¤¬É½¼¨¤µ¤ì¤Þ¤¹¡£
²æ¡¹¤Î Web ¥µ¥¤¥È¤Ë¤Ï¡¢¤µ¤é¤ËÂô»³¤Îʸ½ñ¤¬¤¢¤ê¤Þ¤¹¡£
¤Þ¤º¡¢ ¾åµ¤Ç½Ò¤Ù¤¿ PostgreSQL ¤Ë¤Ä¤¤¤Æ¤ÎËܤòÆɤळ¤È¤ò¸¡Æ¤¤·¤Æ¤¯¤À¤µ¤¤¡£ ¤â¤¦¤Ò¤È¤Ä¤Ï¡¢ "Teach Yourself SQL in 21 Days, Second Edition" at http://members.tripod.com/er4ebus/sql/index.htm¤Ç¤¹¡£
The Practical SQL Handbook, Bowman Judith S. et al., Addison-Wesley ¤¬Â¿¤¯¤Î¥æ¡¼¥¶¤Ë¹¥É¾¤Ç¤¹¡£ ¤Û¤«¤Ç¤Ï¡¢The Complete Reference SQL, Groff et al., McGraw-Hill ¤â¹¥É¾¤Ç¤¹¡£
ÁÇÀ²¤é¤·¤¤¼ê°ú½ñ¤Ï¡¢
[ÌõÃí:
ÆüËÜPostgreSQL¥æ¡¼¥¶²ñ¤ÎÆüËܸì¤Î»²¹Íʸ¸¥¤Î¾Ò²ð¥Ú¡¼¥¸
http://www.postgresql.jp/PostgreSQL/references.html
¤¬¤¢¤ê¤Þ¤¹¡£
¶áƣľʸ»á¤Î¡Ö½é¿´¼Ô¸þ¤Î£Ä£ÂÀß·×ÆþÌ硦£Ó£Ñ£ÌÆþÌ绲¹Í½ñ¾Ò²ð¡×¤Î¥³¡¼¥Ê¡¼
http://www.shonan.ne.jp/~nkon/ipsql/books_SQL.html
¤¬¤¢¤ê¤Þ¤¹(¤ä¤ä¸Å¤¤2000ǯÈÇ)¡£
ËÙÅÄÎѱѻá¤Î¡ÖPostgreSQLÆüËܸì¥Þ¥Ë¥å¥¢¥ë¡×
http://www.net-newbie.com/
¤Ç¤Ï¥ª¥ó¥é¥¤¥ó¥Þ¥Ë¥å¥¢¥ë¤Î¸¡º÷¤¬¤Ç¤¤Þ¤¹¡£
´Ý»³ÉÔÆóÉ×»á¤ÎUNIX ¥Ç¡¼¥¿¥Ù¡¼¥¹ÆþÌç
http://www.wakhok.ac.jp/DB/DB.html
¤â¥ª¥ó¥é¥¤¥ó¤ÇÆɤळ¤È¤¬¤Ç¤¤Þ¤¹¡£
Nikkei BP IT Pro ¤Ë¤¢¤ëÀаæãÉ×»á¤Î PostgreSQL ¥¦¥©¥Ã¥Á
¤Ç¤ÏËè²ó¿·¤·¤¤¾ðÊó¤ò¤È¤ê¤¢¤²¤Æ¤¤¤Þ¤¹¡£
]
¡Ê³«È¯¼Ô¸þ¤±¤Î¡ËDeveloper's FAQ¤ò¤´¤é¤ó¤¯¤À¤µ¤¤¡£
¥½¥Õ¥È¥¦¥§¥¢¤ò·×¤ëÊýË¡¤Ë¤Ï¤¤¤¯¤Ä¤«¤¢¤ê¤Þ¤¹¡£µ¡Ç½¤ÈÀǽ¤È¿®ÍêÀ¤È ¥µ¥Ý¡¼¥È¤È²Á³Ê¤Ç¤¹¡£
¹ç½£¹ñ¤Î²Æ»þ´Ö¤ÎÊѹ¹¤Ï¡¢PostgreSQL¤Î¥ê¥ê¡¼¥¹8.0.4°Ê¹ß[4+]¤È¡¢¤½¤Î ¸å¤Î¥á¥¸¥ã¡¼¥ê¥ê¡¼¥¹¡¢¤¿¤È¤¨¤Ð 8.1 ¤Ë¤Ï´Þ¤Þ¤ì¤Æ¤¤¤Þ¤¹¡£¥«¥Ê¥À¤È¥ª¡¼ À¾Éô¥¹¥È¥é¥ê¥¢¤ÎÊѹ¹¤Ï¡¢8.0.[10+], 8.1.[6+] ¤ª¤è¤Ó¡¢¤½¤Î¸å¤Î¥á¥¸¥ã¡¼ ¥ê¥ê¡¼¥¹¤Î¤¹¤Ù¤Æ¤Ë´Þ¤Þ¤ì¤Þ¤¹¡£8.0¤è¤êÁ°¤ÎPosrgreSQL¤Ç¤Ï¥ª¥Ú¥ì¡¼¥Æ¥£ ¥ó¥°¥·¥¹¥Æ¥à¤Î¥¿¥¤¥à¥¾¡¼¥ó¥Ç¡¼¥¿¥Ù¡¼¥¹¤ò²Æ»þ´Ö¾ðÊó¤Î¤¿¤á¤Ë»È¤Ã¤Æ¤¤ ¤Þ¤¹¡£
PostgreSQL ¤Î¥¤¥ó¥¹¥È¡¼¥ë¤Ë´Þ¤Þ¤ì¤ëʪ¤ÏC¤ÈÁȹþ¤ß C¤Î¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤À¤±¤Ç¤¹¡£¤½¤Î¾¤Î¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹ ¤ÏÆÈΩ¤·¤¿¥×¥í¥¸¥§¥¯¥È¤Ç¡¢ÊÌ¡¹¤Ë¥À¥¦¥ó¥í¡¼¥É¤µ¤ì¤Þ¤¹¡£Ê¬¤«¤ì¤ë¤³¤È¤Ç¡¢ ¤½¤ì¤¾¤ì¤Î³«È¯¥Á¡¼¥à¤¬Æȼ«¤Î¥ê¥ê¡¼¥¹¥¹¥±¥¸¥å¡¼¥ë¤ò»ý¤Ä¤³¤È¤¬µö¤µ¤ì¤Þ ¤¹¡£
PHP ¤Î¤è¤¦¤Ê¤¤¤¯¤Ä¤«¤Î¥×¥í¥°¥é¥ß¥ó¥°¸À¸ì¤Ï¡¢ PostgreSQL¤Î¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤ò´Þ¤ó¤Ç¤¤¤Þ¤¹¡£Perl, TCL, Python, ¤½¤·¤Æ¡¢¤½¤Î¤Û¤«¤ÎÍøÍѲÄǽ¤Ê¸À¸ì¤Î¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤Ï¡¢ http://gborg.postgresql.org ¤Î Drivers/Interfaces ¤ÎÀá¤ÎÃæ¤È¥¤¥ó¥¿¡¼¥Í¥Ã¥È¤Î¸¡º÷¤Ç¤ß¤Ä¤± ¤é¤ì¤Þ¤¹¡£
¥Ç¡¼¥¿¥Ù¡¼¥¹¤ò΢¤Ë»ý¤Ä Web ¥Ú¡¼¥¸¤Ë¤Ä¤¤¤Æ¤ÎÁÇÀ²¤é¤·¤¤¾Ò²ð¤¬¡¢
http://www.webreview.com¤Ë¤¢¤ê¤Þ¤¹¡£
Web ¤Ø¤Î³ÈÄ¥¤Î¤¿¤á¤Ë¤Ï¡¢PHP(http://www.php.net/) ¤¬Âî±Û¤·¤¿¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤È¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£
[ÌõÃí:
PHP¤Ë´Ø¤¹¤ëÆüËܸì¤Î¾ðÊó¤Ï¡¢2000ǯ4·î19Æü¤Ëȯ¤·¤¿ÆüËÜPHP¥æ¡¼¥¶²ñ¤Î¥µ¥¤¥È
http://www.php.gr.jp/
¤¢¤ë¤¤¤Ï¡¢×¢Àî Îव¤ó¤Î¥µ¥¤¥È
http://www.geocities.jp/rui_hirokawa/php/
¤Ë¤«¤Ê¤ê¤Þ¤È¤á¤é¤ì¤Æ¤¤¤Þ¤¹¡£
]
½èÍý¤¬Ê£»¨¤Ê¾ì¹ç¡¢Â¿¤¯¤Î¿Í¤Ï Perl ¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤È CGI.pm ¤« mod_perl ¤ò»È¤¤¤Þ¤¹¡£
¾¦ÍѤȥª¡¼¥×¥ó¥½¡¼¥¹³«È¯¼Ô¤Ë¤è¤ë¤â¤ÎξÊý¤Ç¡¢PostgreSQL¤Ë¤Ï¿¤¯¤ÎGUI¥Ä¡¼¥ë¤¬ÍøÍѲÄǽ¤Ç¡¢¾ÜºÙ¤Ê¥ê¥¹¥È¤Ï¡¢PostgreSQL¥³¥ß¥å¥Ë¥Æ¥£Ê¸½ñ ¤Ç¤´¤é¤ó¤¯¤À¤µ¤¤¡£
´Êñ¤ÊÊýË¡¤Ï¡¢ configure ¤òÁö¤é¤»¤ë¤È¤¤Ë --prefix ¥ª¥×¥·¥ç ¥ó¤ò»ØÄꤹ¤ë¤³¤È¤Ç¤¹¡£
´ûÄêÃͤǤϡ¢PostgreSQL ¤Ï Unix ¥É¥á¥¤¥ó¥½¥±¥Ã¥È¡¢¤Þ¤¿¤Ï¡¢TCP/IPÀÜ Â³¤Î¥í¡¼¥«¥ë¥Þ¥·¥ó¤«¤é¤ÎÀܳ¤·¤«µö¤·¤Þ¤»¤ó¡£postgresql.conf ¤ÎÃæ¤Î listen_addresses ¤ò½¤Àµ¤·¡¢¤«¤Ä¡¢$PGDATA/pg_hba.conf ¥Õ¥¡¥¤¥ë¤òŬÀڤ˾¤·¤Æ¡¢¥Û¥¹¥È¼çƳ·¿Ç§¾Ú¤ò͸ú¤Ë¤·¤Ê¤¤¤«¤®¤ê¤Ï¡¢Â¾ ¤Î¥Þ¥·¥ó¤«¤é¤ÏÀܳ¤Ç¤¤Ê¤¤¤Ç¤·¤ç¤¦¡£
Àǽ²þÁ±¤Î²ÄǽÀ¤Î¤¢¤ê¤½¤¦¤Ê¼ç¤ÊÎΰ褬3¤Ä¤¢¤ê¤Þ¤¹¡§
[ÌõÃí:
JPUGÍý»öŤÎÊÒ²¬ÍµÀ¸»á¤Ë¤è¤ë¡¢¡Öº£¤¹¤°¤Ç¤¤ëPostgreSQL¥Á¥å¡¼¥Ë¥ó¥°¡×
¤È¤¤¤¦¥³¡¼¥Ê¡¼¤¬ ThinkIT ¥µ¥¤¥È¤Ë¤¢¤ê¡¢¼Âºî¶È¤Î»²¹Í¤Ë¤Ê¤ê¤Þ¤¹¡£
http://www.thinkit.co.jp/free/tech/10/1/1.html
]
¥µ¡¼¥Ð¹½À®ÊÑ¿ô¤Ë¤Ï¿¤¯¤Î log_*
¤¬¤¢¤ê¡¢¥¯¥¨¥ê¤È¥×¥í
¥»¥¹¤ÎÅý·×¤ò½ÐÎϤ¹¤ë¤³¤È¤¬¤Ç¤¡¢¥Ç¥Ð¥°¤ÈÀǽ·×¬¤Ë¤È¤Æ¤âÊØÍø¤Ç¤¹¡£
´ûÄê¤Ç¤ÎÀ©¸Â¤Ç¤¢¤ë 100 ¤Î¥Ç¡¼¥¿¥Ù¡¼¥¹¥»¥Ã¥·¥ç¥ó¤Ë㤷¤Æ¤·¤Þ¤Ã¤Æ ¤¤¤Þ¤¹¡£postmaster¤¬Æ±»þÀܳ¤Ç¤¤ë¥Ð¥Ã¥¯¥¨¥ó¥É¥×¥í¥»¥¹¤ÎÀ©¸Â ¿ô¤òÁý¤ä¤¹É¬Íפ¬¤¢¤ê¤Þ¤¹¡£postgresql.conf ¤ÎÃæ¤Î max_connections ¤ÎÃͤòÊѹ¹¤·¤Æ postmaster¤òºÆµ¯Æ°¤¹¤ë ¤³¤È¤Ç²Äǽ¤Ë¤Ê¤ê¤Þ¤¹¡£
¥Ð¡¼¥¸¥ç¥óÈÖ¹æÉÕ¤±¤ÎÊý¿Ë¤Ë¤Ä¤¤¤Æ¡¢¹¹¿·Á´È̤ˤĤ¤¤Æ¤Î²òÀâ¤Ïhttp://www.postgresql.org/support/versioning ¤ò¡¢ ¤½¤·¤Æ¡¢¥¢¥Ã¥×¥°¥ì¡¼¥É¤Ë¤Ä¤¤¤Æ¤Î°ìÈÌŪ¤ÊÀâÌÀ¤Ï http://www.postgresql.org/docs/current/static/install-upgrading.html ¤ò¤´Í÷¤¯¤À¤µ¤¤¡£
¿·¤·¤¤µ¡Ç½¤òÀ¹¤ê¹þ¤àPostgreSQL¤Î¥á¥¸¥ã¡¼¥ê¥ê¡¼¥¹¤Ï¤À¤¤¤¿¤¤Ç¯¤Ë1²ó ÄøÅٹԤʤ¤¤Þ¤¹¡£¥á¥¸¥ã¡¼¥ê¥ê¡¼¥¹¤Ï¡¢¤¿¤È¤¨¤Ð¡¢8.1¤«¤é8.2¤Ø¤Î¤è¤¦¤Ë¡¢ ¥Ð¡¼¥¸¥ç¥óÈÖ¹æ¤Î1ÈÖÌܤ«2ÈÖÌܤÎÉôʬ¤òÁý¤ä¤·¤Æ¤æ¤¤Þ¤¹¡£
PostgreSQL¤Î¥á¥¸¥ã¡¼¥ê¥ê¡¼¥¹¤ÏÄ̾¥·¥¹¥Æ¥à¥Æ¡¼¥Ö¥ë¤È¥Ç¡¼¥¿¤ÎÆâ Éô¥Õ¥©¡¼¥Þ¥Ã¥È¤òÊѹ¹¤·¤Þ¤¹¡£¤³¤ì¤é¤ÎÊѹ¹¤Ï¤¿¤¤¤Æ¤¤¤ÏÊ£»¨¤Ê¤Î¤Ç¤Ç¡¢¥Ç¡¼ ¥¿¥Õ¥¡¥¤¥ë¤Î¸åÊý¸ß´¹À¤ò°Ý»ý¤·¤¿¤ê¤Ï¤·¤Þ¤»¤ó¡£¥á¥¸¥ã¡¼¥¢¥Ã¥×¥°¥ì¡¼¥É ¤Î¤¿¤á¤Ë¤Ï¡¢¥Ç¡¼¥¿¥Ù¡¼¥¹¤Î¥À¥ó¥×/¥ê¥í¡¼¥É¤¬É¬Íפˤʤê¤Þ¤¹¡£
¥Þ¥¤¥Ê¡¼¥ê¥ê¡¼¥¹¤Ï¡¢¤¿¤È¤¨¤Ð¡¢8.1.5 ¤«¤é8.1.6¤Ø¤Î¤è¤¦¤Ë¡¢¥Ð¡¼¥¸¥ç ¥óÈÖ¹æ¤Î3ÈÖÌܤÎÃͤòÁý¤ä¤·¤Þ¤¹¡£PostgreSQL¥Á¡¼¥à¤Ï¡¢¥Þ¥¤¥Ê¡¼¥ê¥ê¡¼¥¹ ¤ËÂФ·¤Æ¤Ï¡¢¥Ð¥°¥Õ¥£¥¯¥¹¤·¤«¹Ô¤Ê¤¤¤Þ¤»¤ó¡£¤¹¤Ù¤Æ¤Î¥æ¡¼¥¶¤Ï¡¢¤Ç¤¤ë¤À ¤±ºÇ¿·¤Î¥Þ¥¤¥Ê¡¼¥ê¥ê¡¼¥¹¤Ë¹¹¿·¤¹¤Ù¤¤Ç¤¹¡£¥¢¥Ã¥×¥°¥ì¡¼¥É¤Ë¤Ï¡¢¾ï¤Ë¥ê ¥¹¥¯¤¬¤Ä¤¤â¤Î¤Ç¤¹¤«¤é¡¢PostgreSQL¤Î¥Þ¥¤¥Ê¡¼½¤Àµ¥ê¥ê¡¼¥¹¤Ç¤Ï¡¢ÉÑÈË¤Ë È¯À¸¤·¤¿¤ê¡¢¥»¥¥å¥ê¥Æ¥£¤Ë´Ø·¸¤·¤¿¤ê¡¢¥Ç¡¼¥¿¤¬¤Ä¤Ö¤ì¤ë¥Ð¥°¤À¤±¤ò½¤Àµ ¤·¡¢¥¢¥Ã¥×¥°¥ì¡¼¥É¤Î¥ê¥¹¥¯¤òºÇ¾®¸Â¤Ë¤È¤É¤á¤Þ¤¹¡£²æ¡¹¤Î¥³¥ß¥å¥Ë¥Æ¥£¤Ç ¤Ï¡¢¥¢¥Ã¥×¥°¥ì¡¼¥É¤¹¤ë¥ê¥¹¥¯¤è¤ê¤â¡¢¥¢¥Ã¥×¥°¥ì¡¼¥É¤·¤Ê¤¤¥ê¥¹¥¯ ¤Î¤Û¤¦¤¬¹â¤¤¤È¹Í¤¨¤Æ¤¤¤Þ¤¹¡£
¥Þ¥¤¥Ê¡¼¥ê¥ê¡¼¥¹¤Î¥¢¥Ã¥×¥°¥ì¡¼¥É¤Ë¤Ï¥À¥ó¥×¤È¥ê¥¹¥È¥¢¤ÎɬÍפϤʤ¯¡¢ ¥Ç¡¼¥¿¥Ù¡¼¥¹¥µ¡¼¥Ð¤òÄä»ß¤·¤Æ¡¢¥¢¥Ã¥×¥Ç¡¼¥È¤µ¤ì¤¿¥Ð¥¤¥Ê¥ê¤ò¥¤¥ó¥¹¥È¡¼ ¥ë¤·¡¢¥µ¡¼¥Ð¤ò¥ê¥¹¥¿¡¼¥È¤·¤Þ¤¹¡£
PC¥Ï¡¼¥É¥¦¥§¥¢¤Ï¤Û¤È¤ó¤É¸ß´¹À¤¬¤¢¤ê¤Þ¤¹¤Î¤Ç¡¢¤Û¤È¤ó¤É¤Î¿Í¤Ï¡¢¤¹ ¤Ù¤Æ¤ÎPC¥Ï¡¼¥É¥¦¥§¥¢¤¬Æ±¤¸ÉʼÁ¤À¤È»×¤¤¹þ¤à·¹¸þ¤¬¤¢¤ê¤Þ¤¹¡£¤·¤«¤·¡¢¤½ ¤ì¤Ï´Ö°ã¤¤¤Ç¤¹¡£ECC RAM¡¢SCSI¡¢¤ª¤è¤Ó¡¢¹âÉʼÁ¥Þ¥¶¡¼¥Ü¡¼¥É¤Ï¡¢°Â¤¤¥Ï¡¼ ¥É¥¦¥§¥¢¤ËÈæ¤Ù¤ë¤È¡¢¤è¤ê¿®ÍêÀ¤¬¹â¤¯¡¢¤è¤êÀǽ¤âÎɤ¤¤Î¤Ç¤¹¡£ PostgreSQL ¤Ï¤Û¤È¤ó¤É¤Î¥Ï¡¼¥É¥¦¥§¥¢¤Ç²ÔƯ¤·¤Þ¤¹¤¬¡¢¿®ÍêÀ¤äÀǽ¤¬½Å Íפʾì¹ç¤Ï¡¢»ÈÍÑÃæ¤Î¥Ï¡¼¥É¥¦¥§¥¢¤Î¥ª¥×¥·¥ç¥ó¤Ë¤Ä¤¤¤ÆÄ´ºº¤¹¤ë¤³¤È¤¬ ¸ÌÀ¤Ç¤¹¡£²æ¡¹¤Î¥á¡¼¥ê¥ó¥°¥ê¥¹¥È¾å¤Ç¤â¥Ï¡¼¥É¥¦¥§¥¢¥ª¥×¥·¥ç¥ó¤Î¥È¥ì¡¼ ¥É¥ª¥Õ¤Ë¤Ä¤¤¤ÆµÄÏÀ¤¹¤ë¤³¤È¤¬¤Ç¤¤Þ¤¹¡£
¤¿¤Ã¤¿¤Î¿ô¹Ô¤Î¥í¥¦¤ò¼è¤ê½Ð¤¹¤¿¤á¤Ë¡¢²¿¹ÔɬÍפ«¤¬¤ï¤«¤ì¤Ð¡¢ SELECT ¤Î¤È¤¤Ë LIMIT ¤ò»È¤¤¤Þ¤¹¡£ ORDER BY¤Ë¥¤¥ó¥Ç¥Ã¥¯¥¹¤¬¥Þ¥Ã¥Á¤·¤¿¾ì¹ç¡¢¤Þ¤Ã¤¿¤¯¥¯¥¨ ¥ê¤¬¼Â¹Ô¤µ¤ì¤Ê¤¤¤³¤È¤â¤¢¤ê¤Þ¤¹¡£SELECT ¤Î¤È¤¤Ë²¿¹Ô ¤¬É¬Íפ«¤òÃΤé¤Ê¤±¤ì¤Ð¡¢¥«¡¼¥½¥ë¤ò»È¤¤FETCH¤·¤Þ¤¹¡£
¥é¥ó¥À¥à¥í¥¦¤òSELECT¤¹¤ë¤Ë¤Ï¡¢¼¡¤Îʸ¤ò»È¤¤¤Þ¤¹¡§
SELECT col FROM tab ORDER BY random() LIMIT 1;
psql ¤ÎÃæ¤Ç \dt¥³¥Þ¥ó¥É¤ò»È¤Ã¤Æ¥Æ¡¼¥Ö¥ë¤ò¸«¤ë¤³¤È¤¬¤Ç¤ ¤Þ¤¹¡£psql¤ÎÃæ¤Ç \? ¤ò»È¤Ã¤Æ¡¢¥³¥Þ¥ó¥É¤ÎÁ´¥ê¥¹¥È¤òÄ´¤Ù¤ë¤³¤È¤¬¤Ç¤¤Þ ¤¹¡£°ìÊý¤Ç¡¢psql ¤Î¥½¡¼¥¹¥³¡¼¥É¤Ç¡¢¥Ð¥Ã¥¯¥¹¥é¥Ã¥·¥å¥³¥Þ¥ó¥É¤ò ½ÐÎϤ¹¤ë pgsql/src/bin/psql/describe.c ¥Õ¥¡¥¤¥ë¤òÆɤळ¤È¤â¤Ç ¤¤Þ¤¹¡£¤½¤ÎÃæ¤Ë¤Ï¡¢ SQL ¥³¥Þ¥ó¥É¤òÀ¸À®¤¹¤ëÉôʬ¤â´Þ¤Þ ¤ì¤Þ¤¹¡£¤Þ¤¿¡¢ -E ¥ª¥×¥·¥ç¥ó¤òÉÕ¤±¤Æ psql ¤ò³«»Ï¤¹¤ë¤È¡¢ ÆþÎϤµ¤ì¤¿¥³¥Þ¥ó¥É¤ò¼Â¹Ô¤¹¤ë¤¿¤á¤Î¥¯¥¨¥ê¤ò°õ»ú½ÐÎϤ¹¤ë¤è¤¦¤Ë¤Ê¤ê¤Þ¤¹¡£ PostgreSQL¤Ï SQL ½àµò¤Î INFORMATION SCHEMA ¥¤¥ó¥¿¡¼ ¥Õ¥§¡¼¥¹¤òÄ󶡤·¤Þ¤¹¤Î¤Ç¡¢¥Ç¡¼¥¿¥Ù¡¼¥¹¤Ë¤Ä¤¤¤Æ¤Î¾ðÊó¤òÌ䤤¹ç¤ï¤»¤ë¤³ ¤È¤â¤Ç¤¤Þ¤¹¡£
pg_ ¤Ç»Ï¤Þ¤ë¥·¥¹¥Æ¥à¥Æ¡¼¥Ö¥ë¤Ç¤â¤³¤ì¤é¤òµ½Ò¤¹¤ë¤³¤È¤¬¤Ç¤ ¤Þ¤¹¡£
psql -l¤ò»È¤¦¤ÈÁ´¤Æ¤Î¥Ç¡¼¥¿¥Ù¡¼¥¹¤ò¥ê¥¹¥È¤·¤Þ¤¹¡£
¤½¤ì¤È¡¢pgsql/src/tutorial/syscat.source ¤ò»î¤·¤Æ¤ß¤Æ¤¯¤À ¤µ¤¤¡£¤½¤³¤Ë¤Ï¡¢¥Ç¡¼¥¿¥Ù¡¼¥¹¤Î¥·¥¹¥Æ¥à¥Æ¡¼¥Ö¥ë¤«¤é¾ðÊó¤òÆÀ¤ë¤¿¤á¤Ëɬ Í×¤Ê SELECT ʸ¤¬Âô»³¤¢¤ê¤Þ¤¹¡£
¥«¥é¥à¤Î¥Ç¡¼¥¿·¿¤ÎÊѹ¹¤Ï 8.0 °Ê¹ß¤Ç¤Ï¡¢ ALTER TABLE ALTER COLUMN TYPE ¤ò»È¤¦¤³¤È¤Ë¤è¤ê´Öñ¤Ë ¤Ê¤ê¤Þ¤·¤¿¡£
¤½¤ì¤è¤êÁ°¤Î¥Ð¡¼¥¸¥ç¥ó¤Ç¤Ï¡¢°Ê²¼¤Î¤è¤¦¤Ë¤·¤Þ¤¹:
BEGIN; ALTER TABLE tab ADD COLUMN new_col new_data_type; UPDATE tab SET new_col = CAST(old_col AS new_data_type); ALTER TABLE tab DROP COLUMN old_col; COMMIT;
¤³¤ì¤ò¹Ô¤Ê¤Ã¤¿¤È¤¤Ï¡¢Ëõ¾Ã¤µ¤ì¤¿¹Ô¤¬»È¤Ã¤Æ¤¤¤ë¥Ç¥£¥¹¥¯¶õ´Ö¤ò²ó¼ý ¤¹¤ë¤¿¤á¤ËVACUUM FULL tab¤ò¤·¤¿¤Û¤¦¤¬Îɤ¤¤«¤â¤·¤ì¤Þ¤»¤ó¡£
À©¸Â¤Ï°Ê²¼¤Î¤È¤ª¤ê¤Ç¤¹:
¥Ç¡¼¥¿¥Ù¡¼¥¹¤ÎºÇÂ祵¥¤¥º? À©¸Â̵¤· (32 TB ¤Î¥Ç¡¼¥¿¥Ù¡¼¥¹¤â¸ºß¤·¤Þ¤¹) ¥Æ¡¼¥Ö¥ë¤ÎºÇÂ祵¥¤¥º? 32 TB ¥í¥¦¤ÎºÇÂ祵¥¤¥º? 400 GB ¥Õ¥£¡¼¥ë¥É¤ÎºÇÂ祵¥¤¥º? 1 GB ¥Æ¡¼¥Ö¥ëÆâ¤Ç¤ÎºÇÂç¥í¥¦¿ô? À©¸Â̵¤· ¥Æ¡¼¥Ö¥ëÆâ¤Ç¤ÎºÇÂ祫¥é¥à¿ô? ¥«¥é¥à¤Î·¿¤Ë¤è¤Ã¤Æ 250-1600 ¥Æ¡¼¥Ö¥ëÆâ¤Ç¤ÎºÇÂ祤¥ó¥Ç¥Ã¥¯¥¹¿ô? À©¸Â̵¤·
¤â¤Á¤í¤ó¡¢¤³¤ì¤é¤Ï¼ÂºÝ¤Ï̵À©¸Â¤Ç¤Ï¤Ê¤¯¡¢¥Ç¥£¥¹¥¯ÍÆÎ̤ȥá¥â¥ê¡¼¤ä ¥¹¥ï¥Ã¥×¥¹¥Ú¡¼¥¹¤ÎÂ礤µ¤Ë¤è¤êÀ©¸Â¤µ¤ì¤Þ¤¹¡£Àǽ¤Ï¤³¤ì¤é¤ÎÃͤ¬¤³¤È¤Î ¤Û¤«Â礤ʻþ¤ËÀú¤ê¤ò¼õ¤±¤Þ¤¹¡£
ºÇÂç¥Æ¡¼¥Ö¥ë¥µ¥¤¥º¤Î32TB¤Ï¥ª¥Ú¥ì¡¼¥Æ¥£¥ó¥°¥·¥¹¥Æ¥à¤Ë¤è¤ëµðÂç¥Õ¥¡ ¥¤¥ë¤Î¥µ¥Ý¡¼¥È¤ÏɬÍפȤ·¤Þ¤»¤ó¡£µðÂç¤Ê¥Æ¡¼¥Ö¥ë¤ÏÊ£¿ô¤Î1GB¤Î¥Õ¥¡¥¤¥ë ¤Ëʬ¤±¤ÆÊݸ¤µ¤ì¤Þ¤¹¤Î¤Ç¡¢¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤ÎÀ©¸Â¤Ï½ÅÍפǤϤ¢¤ê¤Þ¤»¤ó¡£
¥Ç¥Õ¥©¥ë¥È¤Î¥Ö¥í¥Ã¥¯¥µ¥¤¥º¤ò32k¤ËÁý²Ã¤¹¤ë¤³¤È¤Ç¡¢ºÇÂç¥Æ¡¼¥Ö¥ë¥µ¥¤¥º ¤È¹Ô¥µ¥¤¥º¤ÈºÇÂ祫¥é¥à¿ô¤È¤ò4Çܤˤ¹¤ë¤³¤È¤¬¤Ç¤¤Þ¤¹¡£¤Þ¤¿¡¢ºÇÂç¥Æ¡¼¥Ö¥ë ¥µ¥¤¥º¤Ï¥Æ¡¼¥Ö¥ë¥Ñ¡¼¥Æ¥£¥·¥ç¥ó¤ò»È¤Ã¤ÆÁý¤ä¤¹¤³¤È¤â¤Ç¤¤Þ¤¹¡£
¤Ò¤È¤Ä¤ÎÀ©¸Â¤Ï¡¢Ìó2,000ʸ»ú°Ê¾å¤ÎŤµ¤Î¥«¥é¥à¤Ë¥¤¥ó¥Ç¥Ã¥¯¥¹¤òÉÕ ¤±¤ë¤³¤È¤¬¤Ç¤¤Ê¤¤¤³¤È¤Ç¤¹¡£ ¹¬¤¤¤Ë¤â¡¢¤½¤Î¤è¤¦¤Ê¥¤¥ó¥Ç¥Ã¥¯¥¹¤Ï¼ÂºÝ ¤ÏɬÍפ¢¤ê¤Þ¤»¤ó¡£Ä¹¤¤¥«¥é¥à¤ÎMD5¥Ï¥Ã¥·¥å¤Î´Ø¿ô¥¤¥ó¥Ç¥Ã¥¯¥¹¤Ï°ì°ÕÀ ¤¬¤Ê¤Ë¤è¤ê¤ÎÊݸ±¤Ç¡¢¤Þ¤¿¡¢¥Õ¥ë¥Æ¥¥¹¥È¤Î¥¤¥ó¥Ç¥Ã¥¯¥¹¤Ç¤Ï¥«¥é¥àÆâ¤Î ñ¸ì¤ò¸¡º÷¤¹¤ë¤³¤È¤¬¤Ç¤¤Þ¤¹¡£
ÉáÄ̤Υƥ¥¹¥È¥Õ¥¡¥¤¥ë¤ò PostgreSQL ¤Î¥Ç¡¼¥¿¥Ù¡¼¥¹¤ËÊݸ¤¹¤ë¤Ë¤Ï¡¢ ºÇÂç¤ÇÌó5ÇܤΥǥ£¥¹¥¯ÍÆÎ̤òɬÍפȤ·¤Þ¤¹¡£
ÎãÂê¤È¤·¤Æ¡¢³Æ¹Ô¤ËÀ°¿ô¤È¥Æ¥¥¹¥Èµ½Ò¤ò»ý¤Ä 100,000¹Ô¤Î¥Õ¥¡¥¤¥ë¤ò ¹Í¤¨¤Æ¤ß¤Þ¤·¤ç¤¦¡£¥Æ¥¥¹¥È¤Îʸ»úÎó¤ÎÊ¿¶ÑŤµ¤ò20¥Ð¥¤¥È¤È²¾Äꤹ¤ë¤È¡¢ ¥Õ¥é¥Ã¥È¥Õ¥¡¥¤¥ë¤ÎÂ礤µ¤ÏÌó2.8MB ¤Ç¤¹¡£¤³¤Î¥Ç¡¼¥¿¤ò´Þ¤à PostgreSQL ¥Ç¡¼¥¿¥Ù¡¼¥¹¥Õ¥¡¥¤¥ë¤ÎÂ礤µ¤Ï¼¡¤Î¤è¤¦¤ËÌó5.2MB¤È¸«ÀѤâ¤ë¤³¤È¤¬¤Ç¤ ¤Þ¤¹¡§
24 bytes: ³Æ¥í¥¦¤Î¥Ø¥Ã¥À(³µ»») 24 bytes: À°¿ô(int)¥Õ¥£¡¼¥ë¥É¤È¥Æ¥¥¹¥È(text)¥Õ¥£¡¼¥ë¥É + 4 bytes: ¥Ú¡¼¥¸¾å¤Î¥¿¥Ã¥×¥ë¤Ø¤Î¥Ý¥¤¥ó¥¿ ---------------------------------------- 52 bytes per row PostgreSQL ¤Î¥Ç¡¼¥¿¥Ú¡¼¥¸¥µ¥¤¥º¤Ï 8192¥Ð¥¤¥È(8KB)¤Ê¤Î¤Ç: 8192 bytes per page ------------------- = 146 rows per database page (ÀÚ¤ê¼Î¤Æ) 52 bytes per row 100000 data rows -------------------- = 633 database pages (ÀÚ¤ê¾å¤²) 158 rows per page 633 database pages * 8192 bytes per page = 5,185,536 bytes (5.2 MB)
¥¤¥ó¥Ç¥Ã¥¯¥¹¤Ï¡¢¤³¤ì¤Û¤É¤Î¥ª¡¼¥Ð¥Ø¥Ã¥É¤ÏÍ׵ᤷ¤Þ¤»¤ó¤¬¡¢¥¤¥ó¥Ç¥Ã ¥¯¥¹ÉÕ¤±¤µ¤ì¤ë¥Ç¡¼¥¿¤ò´Þ¤à°Ê¾å¡¢¤½¤ì¤Ê¤ê¤ËÂ礤¯¤Ê¤ê¤Þ¤¹¡£
NULL¤Ï¥Ó¥Ã¥È¥Þ¥Ã¥×¤È¤·¤ÆÊݸ¤µ¤ì¤Æ¤¤¤Æ¡¢¤½¤ì¤é¤¬¤ï ¤º¤«¤Ë¥¹¥Ú¡¼¥¹¤ò»È¤¤¤Þ¤¹¡£
¥¤¥ó¥Ç¥Ã¥¯¥¹¤Ï¡¢¤¹¤Ù¤Æ¤Î¥¯¥¨¥ê¤Ç»È¤ï¤ì¤ë¤ï¤±¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£¥Æ¡¼ ¥Ö¥ë¤¬ºÇ¾®¥µ¥¤¥º¤è¤êÂ礤¯¡¢¥¯¥¨¥ê¤Ç¤½¤Î¤ï¤º¤«¤Ê¥Ñ¡¼¥»¥ó¥Æ¡¼¥¸¤Î¥í¥¦ ¤òÁªÂò¤¹¤ë»þ¤À¤±¡¢¥¤¥ó¥Ç¥Ã¥¯¥¹¤Ï»È¤ï¤ì¤Þ¤¹¡£¤³¤ì¤Ï¥¤¥ó¥Ç¥Ã¥¯¥¹¥¹¥¥ã ¥ó¤Ë¤è¤êµ¯¤³¤µ¤ì¤ë¥é¥ó¥À¥à¤Ê¥Ç¥£¥¹¥¯¥¢¥¯¥»¥¹¤Ï¡¢¥Æ¡¼¥Ö¥ë¤ò¥¹¥È¥ì¡¼¥È ¤ËÆɤà½ç¼¡Áöºº¤è¤ê¤âÃÙ¤¯¤Ê¤ë¤³¤È¤¬¤¢¤ë¤«¤é¤Ç¤¹¡£
¥¤¥ó¥Ç¥Ã¥¯¥¹¤ò»È¤¦¤«¤ò·èÄꤹ¤ë¤¿¤á¤Ë¡¢PostgreSQL ¤Ï¥Æ¡¼¥Ö¥ë¤Ë¤Ä¤¤ ¤Æ¤ÎÅý·×¾ðÊó¤ò»ý¤¿¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó¡£¤³¤ÎÅý·×¾ðÊó¤Ï¡¢ VACUUM ANALYZE¤Þ¤¿¤Ï¡¢Ã±¤Ë ANALYZE ¤ò»È¤Ã ¤Æ¼ý½¸¤¹¤ë¤³¤È¤¬¤Ç¤¤Þ¤¹¡£Åý·×¾ðÊó¤ò»È¤Ã¤Æ¥ª¥×¥Æ¥£¥Þ¥¤¥¶¤Ï¥Æ¡¼¥Ö¥ë¤Î Ãæ¤Ë¤¢¤ë¥í¥¦¿ô¤òÃΤꡢ¥¤¥ó¥Ç¥Ã¥¯¥¹¤ò»È¤¦¤Ù¤¤«¤Î·èÄê¤ò¤è¤êÀµ¤·¤¯¤Ç¤ ¤Þ¤¹¡£Åý·×¾ðÊó¤ÏºÇŬ¤Ê·ë¹ç½ç¤ä·ë¹çÊýË¡¤ò·è¤á¤ë¾å¤Ç¤âµ®½Å¤Ê¤â¤Î¤â¤¢¤ê ¤Þ¤¹¡£Åý·×¾ðÊó¤Î¼ý½¸¤Ï¡¢¥Æ¡¼¥Ö¥ë¤ÎÆâÍƤ¬ÊѤï¤ëËè¤Ë·«ÊÖ¤·¤Ê¤µ¤ì¤ë¤Ù ¤¤Ç¤¹¡£
¥¤¥ó¥Ç¥Ã¥¯¥¹¤Ï¡¢Ä̾ï ORDER BY ¤ä·ë¹ç¤ò¹Ô¤Ê¤¦¤¿¤á ¤Ë¤Ï»È¤ï¤ì¤Þ¤»¤ó¡£½ç¼¡¥¹¥¥ã¥ó¤Ë³¤¯ÌÀ¼¨Åª¥½¡¼¥È¤Ï¡¢µðÂç¤Ê¥Æ¡¼¥Ö¥ë¤Î ¥¤¥ó¥Ç¥Ã¥¯¥¹¥¹¥¥ã¥ó¤è¤ê¤âÉáÄ̤Ϲ⮤Ǥ¹¡£
¤·¤«¤·¡¢ORDER BY¤ÈÁȤ߹ç¤ï¤µ¤ì¤¿LIMIT ¤Ï¡¢¥Æ¡¼¥Ö¥ë¤Î¾®¤µ¤ÊÉôʬ¤òÊÖ¤¹¤¿¤á¤Ë¤¿¤Ó¤¿¤Ó¥¤¥ó¥Ç¥Ã¥¯¥¹¤ò»È¤¦¤Ç¤·¤ç ¤¦¡£¤â¤·¡¢¥ª¥×¥Æ¥£¥Þ¥¤¥¶¤¬´Ö°ã¤Ã¤Æ¥·¡¼¥±¥ó¥·¥ã¥ë¥¹¥¥ã¥ó¤òÁªÂò¤·¤¿¤³
¤È¤Ëµ¿¤¤¤¬¤Ê¤±¤ì¤Ð¡¢SET enable_seqscan TO 'off'
¤ËÀßÄꤷ
¤Æ¡¢¥¯¥¨¥ê¤ò¤â¤¦°ìÅټ¹Ԥ·¡¢¥¤¥ó¥Ç¥Ã¥¯¥¹¥¹¥¥ã¥ó¤¬¤Þ¤Á¤¬¤¤¤Ê¤¯Â®¤¯¤Ê¤Ã
¤Æ¤¤¤ë¤«¤É¤¦¤«¤ò¤ß¤Æ¤¯¤À¤µ¤¤¡£
LIKE ¤¢¤ë¤¤¤Ï ~ ¤Î¤è¤¦¤Ê¥ï¥¤¥ë¥É¥«¡¼¥É±é»» »Ò¤ÏÆÃÊ̤ʴĶ¤Ç¤·¤«»È¤¨¤Þ¤»¤ó¡§
LIKE¥¤¥ó ¥Ç¥¯¥·¥ó¥°¤Ë¤À¤±Æ¯¤¯¤è¤¦¤Ê¡¢ÆÃÊ̤Ê
text_pattern_ops¥¤ ¥ó¥Ç¥Ã¥¯¥¹¤òºîÀ®¤¹¤ë¤³¤È¤â¤Ç¤¤Þ¤¹¡£
8.0¤è¤êÁ°¤Î¥ê¥ê¡¼¥¹¤Ç¤Ï¡¢¥¤¥ó¥Ç¥Ã¥¯¥¹¤Ï¡¢¥Ç¡¼¥¿·¿¤¬¤Á¤ç¤¦¤É¥¤¥ó¥Ç¥Ã ¥¯¥¹¤Î¥«¥é¥à¤Î·¿¤È°ìÃפ·¤Ê¤±¤ì¤Ð¡¢»È¤¨¤Ê¤¤¤³¤È¤¬¤·¤Ð¤·¤Ð¤¢¤ê¤Þ¤·¤¿¡£ ¤ª¤½¤é¤¯¡¢int2, int8, ¤ª¤è¤Ó numeric Åù¤Î¥«¥é¥à¤Î¥¤¥ó¥Ç¥Ã¥¯¥¹¤¬¤½¤¦ ¤Ç¤¹¡£
¥ª¥ó¥é¥¤¥ó¥Þ¥Ë¥å¥¢¥ë¤Ç EXPLAIN ¤ò¸«¤Æ¤¯¤À¤µ¤¤¡£
~±é»»»Ò¤ÏÀµµ¬É½¸½¾È¹ç¤ò¹Ô¤Ê¤¤¡¢~* ¤ÏÂçʸ»ú¤È¾®Ê¸»ú ¤ò¶èÊ̤·¤Ê¤¤(case-insensitive)Àµµ¬É½¸½¾È¹ç¤ò¹Ô¤¤¤Þ¤¹¡£ Âçʸ»ú¤È¾®Ê¸ »ú¤ò¶èÊ̤·¤Ê¤¤ LIKE ±é»»»Ò¤ò ILIKE ¤È ¤¤¤¤¤Þ¤¹¡£
Âçʸ»ú¤È¾®Ê¸»ú¤ò¶èÊ̤·¤Ê¤¤ÅùÃÍÈæ³Ó¤Ï¼¡¤Î¤è¤¦¤Ëɽ¸½¤Ç¤¤ë¡§
SELECT * FROM tab WHERE lower(col) = 'abc';
ɸ½à¥¤¥ó¥Ç¥Ã¥¯¥¹¤Ç¤Ï»È¤ï¤ì¤º¡¢¤·¤«¤·¤Ê¤¬¤é¡¢¤â¤·¡¢¼°¥¤¥ó¥Ç¥Ã¥¯¥¹ ¤òºî¤Ã¤¿¤Ê¤é¤½¤ì¤¬»È¤ï¤ì¤ë¤Ç¤·¤ç¤¦¡£
CREATE INDEX tabindex ON tab (lower(col));
¾åµ¤Î¥¤¥ó¥Ç¥Ã¥¯¥¹¤¬UNIQUE¤ÇºîÀ®¤µ¤ì¤¿¾ì¹ç¡¢¥«¥é¥à ¤ÏÂçʸ»ú¤È¾®Ê¸»ú¤ò³ÊǼ¤Ç¤¤Þ¤¹¤¬¡¢¤½¤Î°ã¤¤¤¬Ê¸»ú¥±¡¼¥¹¤À¤±¤Ç¤¢¤Ã¤Æ¤â Ʊ°ì¤Ë¤Ï¤Ê¤ê¤Þ¤»¤ó¡£¤¢¤¨¤ÆÆÃÄê¤Îʸ»ú¥±¡¼¥¹¤ò¥«¥é¥à¤Ë³ÊǼ¤¹¤ë¤Ë¤Ï CHECKÀ©Ì󤫡¢¥È¥ê¥¬¡¼¤ò»È¤Ã¤Æ¤¯¤À¤µ¤¤¡£
°Ê²¼¤Î¤è¤¦¤Ë¡¢IS NULL ¤È IS NOT NULL¤Ç¡¢¤½¤Î¥«¥é¥à¤ò¥Æ¥¹¥È¤·¤Æ¤ß¤Þ¤¹¡§
SELECT * FROM tab WHERE col IS NULL;NULL¤Î²ÄǽÀ¤Î¤¢¤ë¤â¤Î¤òÏ¢·ë¤¹¤ë¤Ë¤Ï¡¢COALESCE()¤ò ¼¡¤Î¤è¤¦¤Ë»È¤¤¤Þ¤¹¡£
SELECT COALESCE(col1, '') || COALESCE(col2, '') FROM tab
NULL¾õÂ֤ǥ½¡¼¥È¤¹¤ë¤Ë¤Ï¡¢IS NULL ¤È IS NOT NULL ¤Î½¤¾þ»Ò¤ò ORDER BY ¶ç¤ÎÃæ ¤Ç»È¤Ã¤Æ¤ß¤Þ¤¹¡£true ¤Î¤â¤Î¤Ï false ¤Î¤â¤Î¤è¤ê¤â¹â¤¤ÃÍ ¤È¤·¤Æʤ٤é¤ì¤Þ¤¹¤Î¤Ç¡¢¼¡¤ÎÎã¤Ç¤Ï NULL ¤ÎµºÜ¤¬·ë²Ì¥ê¥¹¥È¤Î¾åÉô¤ËÃÖ ¤«¤ì¤Þ¤¹¡£
SELECT * FROM tab ORDER BY (col IS NOT NULL)
·¿ ÆâÉô̾ È÷¹Í VARCHAR(n) varchar ºÇÂçĹ¤Î¥µ¥¤¥º¤ò»ØÄꤹ¤ë¡¢µÍ¤áʪ̵¤· CHAR(n) bpchar »ØÄꤵ¤ì¤¿¸ÇÄêĹ¤È¤Ê¤ë¤è¤¦¤Ë¶õÇò¤¬µÍ¤á¤é¤ì¤ë TEXT text Ťµ¤ËÆÃÊ̤ʾå¸Â¤Ï̵¤· BYTEA bytea ²ÄÊÑĹ¤Î¥Ð¥¤¥ÈÇÛÎó(null-byte safe) "char" char 1ʸ»ú
ÆâÉô̾¤Ë¤ªÌܤˤ«¤«¤ë¤Î¤Ï¡¢¥·¥¹¥Æ¥à¡¦¥«¥¿¥í¥°¤òÄ´¤Ù¤ë¤È¤¤ä¡¢¥¨¥é¡¼ ¥á¥Ã¥»¡¼¥¸¤ò¼õ¤±¼è¤ë¤È¤¤Ç¤¹¡£
¾åµ¤Î·¿¤Î¤¦¤ÁºÇ½é¤Î£´¤Ä¤Î·¿¤Ï "varlena" ·¿¤Ç¤¹(¤¹¤Ê¤ï¤Á¡¢¥Ç¥£¥¹ ¥¯¤ÎºÇ½é¤Î£´¥Ð¥¤¥È¤¬¥Ç¡¼¥¿Ä¹¤Ç¡¢¤½¤ì¤Î¸å¤Ë¼ÂºÝ¤Î¥Ç¡¼¥¿¤¬Â³¤¤Þ¤¹)¡£ ¤³¤Î¤è¤¦¤Ë¼ÂºÝ¤Î¶õ´Ö¤ÏÀë¸À¤µ¤ì¤¿Â礤µ¤è¤ê¤â¾¯¤·Â礤¯¤Ê¤ê¤Þ¤¹¡£¤·¤« ¤·¡¢Ä¹¤¤Ãͤϰµ½Ì¤µ¤ì¤ë¤Î¤Ç¡¢¥Ç¥£¥¹¥¯¾å¤Î¶õ´Ö¤Ï»×¤Ã¤¿¤è¤ê¤â¾®¤µ¤¯¤Ê¤ê¤Þ¤¹¡£
VARCHAR(n) ¤Ï²ÄÊÑŤÎʸ»úÎó¤òÊݸ¤¹¤ë¤Î¤ËºÇŬ¤Ç¤¹ ¤¬¡¢Êݸ¤Ç¤¤ëʸ»úÎó¤ÎŤµ¤ËÀ©¸Â¤¬¤¢¤ê¤Þ¤¹¡£TEXT ¤ÏĹ ¤µ¤ËÀ©¸Â¤Î̵¤¤Ê¸»úÎó¤ÎÊݸ¤Î¤¿¤á¤Î¤â¤Î¤Ç¡¢ºÇÂç¤Ç 1¥®¥¬¥Ð¥¤¥È¤Ç¤¹¡£ CHAR(n)¤Ï¡¢VARCHAR(n)¤¬Í¿¤¨¤é¤ì¤¿Ê¸»ú ¤À¤±¤òÊݸ¤¹¤ë¤Î¤ËÂФ·¡¢¥Ö¥é¥ó¥¯¤òµÍ¤á¹þ¤ó¤Ç¤¤¤Ä¤âƱ¤¸Ä¹¤µ¤Çʸ»úÎó¤ò Êݸ¤¹¤ë¤Î¤ËºÇŬ¤Ç¤¹¡£BYTEA¤Ï¡¢ÉôʬŪ¤Ë NULL ¤Î¥Ð¥¤¥È¤ò´Þ¤à¥Ð¥¤¥Ê¥ê¥Ç¡¼¥¿¤òÊݸ¤¹¤ë¤¿¤á¤Î¤â¤Î ¤Ç¤¹¡£¤³¤ì¤é¤Î¥¿¥¤¥×¤ÏƱ¤¸¤¯¤é¤¤¤ÎÀǽÆÃÀ¤ò¤â¤Á¤Þ¤¹¡£
PostgreSQL ¤Ï SERIAL ¥Ç¡¼¥¿·¿¤ò¥µ¥Ý¡¼¥È¤·¤Þ¤¹¡£¥« ¥é¥à¾å¤Ë¥·¡¼¥±¥ó¥¹¤ò¼«Æ°ºîÀ®¤·¤Þ¤¹¡£¤¿¤È¤¨¤Ð¡¢
CREATE TABLE person ( id SERIAL, name TEXT );¤Ï¼«Æ°Åª¤Ë¼¡¤Î¤è¤¦¤ËËÝÌõ¤µ¤ì¤Þ¤¹:
CREATE SEQUENCE person_id_seq; CREATE TABLE person ( id INT4 NOT NULL DEFAULT nextval('person_id_seq'), name TEXT );
[ÌõÃí¡§
CREATE UNIQUE INDEX person_id_key ON person ( id );
¤Ï¡¢ 7.3 °Ê¹ß¤Ï¼«Æ°Åª¤Ë¤Ï¹Ô¤Ê¤ï¤ì¤Ê¤¯¤Ê¤ê¤Þ¤·¤¿¡£
]
¤Ò¤È¤Ä¤ÎÊýË¡¤Ï¡¢nextval() ´Ø¿ô¤ò»È¤Ã¤Æ¤½¤ÎÃͤòÁÞÆþ¤¹¤ë Á°(before)¤Ë SEQUENCE ¥ª¥Ö¥¸¥§¥¯¥È¤«¤é¼¡¤Î SERIAL Ãͤò¼è¤ê½Ð¤·¡¢¤½¤ì¤«¤é¼ÂºÝ¤ËÁÞÆþ¤ò¤¹¤ë¤³¤È¤Ç¤¹¡£4.11.1 ¤Î¥Æ¡¼¥Ö¥ë¤ÎÎã¤ò»È¤¦¤È¤¹¤ë¤È¡¢µ¿»÷¸À¸ì¤Ç¤Ï ¤³¤Î¤è¤¦¤Ë¤Ê¤ê¤Þ¤¹¡£
new_id = execute("SELECT nextval('person_id_seq')"); execute("INSERT INTO person (id, name) VALUES (new_id, 'Blaise Pascal')");¤½¤¦¤·¤Æ¡¢new_id ¤ËÊݸ¤·¤¿¿·¤·¤¤Ãͤò¾¤Î¥¯¥¨¥ê(¤¿¤È¤¨¤Ð¡¢ person ¥Æ¡¼¥Ö¥ë¤ËÂФ¹¤ë³°Éô¥¡¼(foreign key)¤Î¤è¤¦¤Ë)»È¤¦¤È ¤è¤¤¤Ç¤·¤ç¤¦¡£¼«Æ°Åª¤Ëºî¤é¤ì¤¿SEQUENCE¥ª¥Ö¥¸¥§¥¯¥È¤Î ̾Á°¤Ï¡¢<table>_<serialcolumn>_seq ¤Î¤è¤¦¤Ë¤Ê¤ê¡¢¤³¤Î¤¦¤Á¡¢table ¤È serialcolumn ¤Ï¤½¤ì¤¾ ¤ì¥Æ¡¼¥Ö¥ë¤Î̾Á°¤ÈSERIAL¥«¥é¥à¤Î̾Á°¤Ç¤¹¡£
¤¢¤ë¤¤¤Ï¡¢Í¿¤¨¤é¤ì¤¿SERIALÃͤò¡¢¤½¤ì¤¬´ûÄêÃͤȤ·¤Æ ÁÞÆþ¤µ¤ì¤¿¸å¤Ç(after)¡¢ currval() ´Ø¿ô¤ò»È¤Ã¤Æ¼è¤ê½Ð¤¹ ¤³¤È¤â¤Ç¤¤Þ¤¹¡£¤¿¤È¤¨¤Ð¡¢
execute("INSERT INTO person (name) VALUES ('Blaise Pascal')"); new_id = execute("SELECT currval('person_id_seq')");
¤½¤ì¤Ï¤¢¤ê¤Þ¤»¤ó¡£currval() ¤Ï¡¢¤¹¤Ù¤Æ¤Î¥æ¡¼¥¶¤Ç¤Ï¤¢¤ê¤Þ¤» ¤ó¤¬¡¢ÆɼԤΥ»¥Ã¥·¥ç¥ó¤ËÍ¿¤¨¤é¤ì¤¿¸½ºß¤ÎÃͤòÊÖ¤·¤Þ¤¹¡£
Ʊ»þÀ¤ò²þÁ±¤¹¤ë¤¿¤á¤Ë¡¢¼Â¹ÔÃæ¤Î¥È¥é¥ó¥¶¥¯¥·¥ç¥ó¤Ë¡¢É¬Íפ˱þ¤¸¤Æ¥È ¥é¥ó¥¶¥¯¥·¥ç¥ó¤¬½ªÎ»¤¹¤ë¤Þ¤Ç¥í¥Ã¥¯¤µ¤ì¤Ê¤¤¤è¤¦¥·¡¼¥±¥ó¥¹ÃͤòÍ¿¤¨¤Æ¤¤ ¤Þ¤¹¡£¤³¤Î¤¿¤á¥È¥é¥ó¥¶¥¯¥·¥ç¥ó¤¬ÃæÃǤµ¤ì¤ë¤ÈÈÖ¹æ³ä¤êÅö¤Æ¤Ë¥®¥ã¥Ã¥×¤ò À¸¤¸¤Þ¤¹¡£
¥Æ¡¼¥Ö¥ë¤¬WITH OIDS¤Ç¤Ä¤¯¤é¤ì¤¿¾ì¹ç¤Ï¡¢¤½¤ì¤¾¤ì¤Î ¥í¥¦¤Ë°ì°Õ¤ÊOID¤¬¼è¤é¤ì¤Þ¤¹¡£ OID¤Ï¼«Æ°Åª¤Ë4¥Ð¥¤¥È¤ÎÀ°¿ô¤ÇÍ¿¤¨¤é¤ì¡¢¤½¤ì¤Ï¡¢Á´¥¤¥ó ¥¹¥È¥ì¡¼¥·¥ç¥ó¤òÄ̤·¤Æ°ì°Õ¤ÊÃͤȤʤê¤Þ¤¹¡£¤·¤«¤·¡¢Ìó40²¯¤Ç¥ª¡¼¥Ð¡¼¥Õ ¥í¡¼¤·¡¢¤½¤·¤Æ¡¢OID¤Ï½ÅÊ£¤ò¤·¤Ï¤¸¤á¤Þ¤¹¡£PostgreSQL¤Ï ÆâÉô¥·¥¹¥Æ¥à¥Æ¡¼¥Ö¥ë¤ò°ì½ï¤Ë¥ê¥ó¥¯¤¹¤ë¤¿¤á¤ËOID ¤ò»È ¤¤¤Þ¤¹¡£
¥æ¡¼¥¶¤Î¥Æ¡¼¥Ö¥ë¤Î¥«¥é¥à¤Ë°ì°Õ¤ÎÈÖ¹æ¤òÉÕ¤±¤ë¤¿¤á¤Ë¤Ï¡¢ OID ¤Ç¤Ï¤Ê¤¯ SERIAL ¤ò»È¤¦¤Î¤¬ºÇ¤â¤è¤¤ ¤Ç¤·¤ç¤¦¡£SERIAL¤ÎÏ¢ÈÖ¤Ï1¤Ä¤Î¥Æ¡¼¥Ö¥ëÆâ¤Ç¤Î¤ß°ì°Õ¤Ë¤Ê ¤ë¤«¤é¤Ç¡¢¥ª¡¼¥Ð¡¼¥Õ¥í¡¼¤òµ¯¤³¤·¤Ë¤¯¤¤¤È¹Í¤¨¤é¤ì¤Þ¤¹¡£ 8¥Ð¥¤¥È¤Î¥·¡¼¥±¥ó¥¹ÃͤòÊݸ¤¹¤ë¤¿¤á¤Ë¡¢SERIAL8¤¬¤¢¤ê ¤Þ¤¹¡£
CTID ¤Ï¡¢ÆÃÄê¤ÎʪÍý¥í¥¦¤ò¥Ö¥í¥Ã¥¯¤È¥ª¥Õ¥»¥Ã¥È¤ÎÃÍ ¤Ç¼±Ê̤¹¤ë¤¿¤á¤Ë»È¤ï¤ì¤Þ¤¹¡£CTID¤Ï¡¢¥í¥¦¤¬½¤Àµ¤µ¤ì¤¿ ¤êºÆÆɹþ¤ß¤µ¤ì¤¿¤È¤¤ËÊѤï¤ê¤Þ¤¹¡£¤Þ¤¿¡¢ÊªÍý¥í¥¦¤òº¹¤¹¤¿¤á¤Ë¥¤¥ó¥Ç¥Ã ¥¯¥¹¤ÎµºÜ¤Ë»È¤ï¤ì¤Þ¤¹¡£
¤ª¤½¤é¤¯¡¢¥·¥¹¥Æ¥à¤Î²¾ÁÛ¥á¥â¥ê¡¼¤òÁ´¤Æ»È¤¤²Ì¤¿¤·¤Æ¤·¤Þ¤Ã¤Æ¤¤¤ë²Ä ǽÀ¤¬¤¢¤ë¤«¡¢¥«¡¼¥Í¥ë¤¬¤¢¤ë¥ê¥½¡¼¥¹¤Ë¤Ä¤¤¤Æ¤â¤ÄÀ©¸ÂÃͤ¬Ä㤹¤®¤ë²Äǽ À¤¬¤¢¤ê¤Þ¤¹¡£postmaster ¤ò»ÏÆ°¤¹¤ëÁ°¤Ë¤³¤ì¤ò»î¤·¤Æ¤ß¤Æ¤¯¤À¤µ¤¤¡§
ulimit -d 262144 limit datasize 256m¥·¥§¥ë¤Ë¤è¤Ã¤Æ¡¢¤É¤Á¤é¤«¤Ò¤È¤Ä¤¬À®¸ù¤¹¤ë¤Ç¤·¤ç¤¦¤¬¡¢¤³¤ì¤Ï¥×¥í¥»¥¹¤Î ¥Ç¡¼¥¿¥»¥°¥á¥ó¥ÈÀ©¸Â¤ò¤è¤ê¹â¤¯ÀßÄꤷ¡¢¤¿¤Ö¤ó¥¯¥¨¥ê¤¬´°·ë¤¹¤ë¤è¤¦¤Ë¤Ê ¤ë¤Ç¤·¤ç¤¦¡£¤³¤Î¥³¥Þ¥ó¥É¤Ï¸½¹Ô¤Î¥×¥í¥»¥¹¤È¡¢¤³¤Î¥³¥Þ¥ó¥É¤òÁö¤é¤»¤¿¸å ¤Ëºî¤é¤ì¤ëÁ´¤Æ¤Î¥µ¥Ö¥×¥í¥»¥¹¤Ë¤Ä¤¤¤ÆŬÍѤµ¤ì¤Þ¤¹¡£¥Ð¥Ã¥¯¥¨¥ó¥É¤¬¤È¤Æ ¤â¿¤¯¤Î¥Ç¡¼¥¿¤òÊÖ¤¹¤¿¤á¤ËSQL ¥¯¥é¥¤¥¢¥ó¥È¤ÇÌäÂ꤬³ ¤¤¤Æ¤¤¤ë¤Î¤Ç¤¢¤ì¤Ð¡¢¥¯¥é¥¤¥¢¥ó¥È¤ò³«»Ï¤¹¤ëÁ°¤Ë¤³¤ì¤ò»î¤·¤Æ¤ß¤Æ¤¯¤À¤µ ¤¤¡£
psql ¤«¤é SELECT version();
¤ò¥¿¥¤¥×¤·¤Þ¤¹¡£
CURRENT_TIMESTAMP¤ò»È¤¤¤Þ¤¹:
CREATE TABLE test (x int, modtime TIMESTAMP DEFAULT CURRENT_TIMESTAMP );
PostgreSQL ¤Ï SQL ɸ½à¹½Ê¸¤ò»È¤¦³°Éô·ë¹ç(¥¢¥¦¥¿¡¼¥¸¥ç¥¤¥ó)¤ò¥µ¥Ý¡¼ ¥È¤·¤Þ¤¹¡£¤³¤³¤Ë 2¤Ä¤ÎÎãÂ꤬¤¢¤ê¤Þ¤¹¡£
SELECT * FROM t1 LEFT OUTER JOIN t2 ON (t1.col = t2.col);¤¢¤ë¤¤¤Ï
SELECT * FROM t1 LEFT OUTER JOIN t2 USING (col);¤³¤ì¤é¤Î¾ÝħŪ¤Ê¥¯¥¨¥ê¤Ç¤Ï t1.col ¤ò t2.col ¤È·ë¹ç¤·¤Æ¡¢t1 ¤Î·ë¹ç¤µ¤ì¤Ê¤«¤Ã¤¿¥í¥¦(t2 ¤È°ìÃפ·¤Ê¤«¤Ã¤¿¥í¥¦)¤âÊÖ¤·¤Æ¤¤¤Þ¤¹¡£RIGHT ·ë¹ç¤Ï t2 ¤Î·ë¹ç¤µ¤ì¤Ê¤«¤Ã¤¿¥í¥¦¤ò²Ã¤¨¤ë¤Ç¤·¤ç¤¦¡£FULL ·ë¹ç¤Ï¡¢°ìÃפ·¤¿¥í¥¦¤Ë t1 ¤È t2 ¤«¤é¤Ï·ë¹ç¤µ¤ì¤Ê¤«¤Ã¤¿¥í¥¦¤òÊÖ¤¹¤Ç¤·¤ç¤¦¡£OUTER ¤È¤¤¤¦¸ÀÍդϥª¥×¥·¥ç¥ó¤Ç LEFT, RIGHT, ¤Þ¤¿¤Ï FULL ¤Ê¤É¤Î·ë¹ç¤ò²¾Äꤵ¤ì¤Æ¤¤¤Þ¤¹¡£Ä̾·ë¹ç¤ÏINNER·ë¹ç¤È¸Æ¤Ð¤ì¤Þ¤¹¡£
¸½¹Ô¤Î¥Ç¡¼¥¿¥Ù¡¼¥¹°Ê³°¤Ø¤ÎÌ䤤¹ç¤ï¤»¤ÎÊýË¡¤Ï¤¢¤ê¤Þ¤»¤ó¡£¤È¤¤¤¦¤Î ¤âPostgreSQL¤¬¥Ç¡¼¥¿¥Ù¡¼¥¹»ÅÍͤΥ·¥¹¥Æ¥à¥«¥¿¥í¥°¤òÆɤ߹þ¤à¤¿¤á¤Ç¡¢¤½ ¤³¤Ë¤Ï¡¢¤¿¤È¤¨¤½¤Î¤Õ¤ê¤ò¤¹¤ë¤À¤±¤Ë¤·¤í¡¢¥Ç¡¼¥¿¥Ù¡¼¥¹¤ò±Û¤¨¤ÆÌ䤤¹ç¤ï ¤»¤ò¤¹¤ë¤¹¤Ù¤¬¤¢¤ê¤Þ¤»¤ó¡£
contrib/dblink ¤Ï¥Ç¡¼¥¿¥Ù¡¼¥¹´Ö(cross-database)¤ÎÌ䤤¹ç¤ï ¤»¤ò´Ø¿ô¸Æ½Ð¤·¤Ë¤è¤êµö¤·¤Þ¤¹¡£¤â¤Á¤í¤ó¡¢¥¯¥é¥¤¥¢¥ó¥È¤ÏƱ»þ¤ËÀܳ¤òÊÌ ¤Î¥Ç¡¼¥¿¥Ù¡¼¥¹¤Ø¤âÄ¥¤é¤Ê¤¯¤Æ¤Ï¤Ê¤é¤º¡¢·ë²Ì¤ò¥¯¥é¥¤¥¢¥ó¥È¦¤Ç¥Þ¡¼¥¸¤· ¤Ê¤¯¤Æ¤Ï¤Ê¤ê¤Þ¤»¤ó¡£
½¸¹ç¤òÊÖ¤¹´Ø¿ô(Set Returning Functions): http://www.postgresql.org/docs/techdocs.17
¤ò»È¤¦¤È´Êñ¤Ç¤¹¡£PL/PgSQL ¤Ï´Ø¿ô¥¹¥¯¥ê¥×¥È¤ò¥¥ã¥Ã¥·¥å¤·¡¢ÉÔ¹¬¤Ë¤â¤½¤ÎÉûºîÍѤǡ¢ PL/PgSQL´Ø¿ô¤¬°ì»þ¥Æ¡¼¥Ö¥ë¤Ë¥¢¥¯¥»¥¹¤¹¤ë¾ì¹ç¡¢¸å¤Ç¤½¤Î¥Æ¡¼¥Ö¥ë¤ò¾Ã¤· ¤Æºî¤ê¤Ê¤ª¤µ¤ì¡¢´Ø¿ô¤¬¤â¤¦°ìÅٸƤӽФµ¤ì¤ë¤È¡¢¤½¤Î´Ø¿ô¤Ï¥¥ã¥Ã¥·¥å¤· ¤Æ¤¤¤ë´Ø¿ô¤ÎÆâÍƤϤޤÀ¸Å¤¤°ì»þ¥Æ¡¼¥Ö¥ë¤òº¹¤·¼¨¤·¤¿¤Þ¤Þ¤À¤«¤é¤Ç¤¹¡£ ¤³¤Î¡¢²ò·èºö¤È¤·¤Æ¡¢PL/PgSQL¤ÎÃæ¤Ç EXECUTE ¤ò°ì»þ¥Æ¡¼ ¥Ö¥ë¤Ø¤Î¥¢¥¯¥»¥¹¤Î¤¿¤á¤Ë»È¤¤¤Þ¤¹¡£¤½¤¦¤¹¤ë¤È¡¢¥¯¥¨¥ê¤ÏËè²ó¥Ñ¡¼¥¹¤ò¤ä ¤êľ¤·¤µ¤ì¤ë¤è¤¦¤Ë¤Ê¤ê¤Þ¤¹¡£
¡Ö¥ì¥×¥ê¥±¡¼¥·¥ç¥ó¡×¤È°ì¸À¤Ç¤¤¤¤¤Þ¤¹¤¬¡¢¥ì¥×¥ê¥±¡¼¥·¥ç¥ó¤ò¤¹¤ë ¤¿¤á¤Îµ»½Ñ¤Ï¤¤¤¯¤Ä¤«¤¢¤ê¡¢¤½¤ì¤¾¤ì¡¢ÍøÅÀ¤È·çÅÀ¤¬¤¢¤ê¤Þ¤¹¡£
¥Þ¥¹¥¿¡¿¥¹¥ì¡¼¥Ö¤Î¥ì¥×¥ê¥±¡¼¥·¥ç¥ó¤Ï¡¢Æɤߡ¿½ñ¤¤Î¥¯¥¨¥ê¤ò¼õ¤±¼è ¤ë¥·¥ó¥°¥ë¥Þ¥¹¥¿¤¬²Äǽ¤Ç¡¢¥¹¥ì¡¼¥Ö¤Ç¤Ï Æɤߡ¿SELECT¤Î Ì䤤¹ç¤ï¤»¤À¤±¤ò¼õ¤±ÉÕ¤±¤ë¤³¤È¤¬¤Ç¤¤Þ¤¹¡£ºÇ¤â¿Íµ¤¤¬¤¢¤ë¡¢¥Õ¥ê¡¼¤ÇÍø ÍѤǤ¤ë¡¢¥Þ¥¹¥¿¡Ý¥¹¥ì¡¼¥Ö¤ÎPostgreSQL¥ì¥×¥ê¥±¡¼¥·¥ç¥ó¥½¥ê¥å¡¼¥·¥ç¥ó ¤Ï¡¢ Slony-I ¤Ç¤¹¡£
¥Þ¥ë¥Á¡Ý¥Þ¥¹¥¿¤Î¥ì¥×¥ê¥±¡¼¥·¥ç¥ó¤Ï¡¢Æɤߡ¿½ñ¤¤Î¥¯¥¨¥ê¤ò¼õ¤±¤È ¤ê¡¢Ê£¿ô¤Î¥ì¥×¥ê¥±¡¼¥È¤µ¤»¤ë¥³¥ó¥Ô¥å¡¼¥¿¤ËÁ÷¤ë¤³¤È¤¬¤Ç¤¤Þ¤¹¡£¤³¤Îµ¡ ǽ¤Ï¡¢¥µ¡¼¥Ð´Ö¤ÎÊѹ¹¤ÎƱ´ü¤¬É¬Íפʤ¿¤á¡¢Àǽ¤Ë½ÅÂç¤Ê¾×·â¤òÍ¿¤¨¤Þ¤¹¡£ PGCluster ¤Ï¡¢ ¤³¤Î¤è¤¦¤Ê¥½¥ê¥å¡¼¥·¥ç¥ó¤È¤·¤ÆPostgreSQL¤Î¤¿¤á¤Ë¥Õ¥ê¡¼¤ÇÍøÍѤǤ¤ë¤â ¤Î¤È¤·¤Æ¡¢ºÇ¤â¿Íµ¤¤¬¤¢¤ê¤Þ¤¹¡£
¤³¤Î¾¤Ë¤â¡¢¾¦ÍѤä¥Ï¡¼¥É¥¦¥§¥¢¡Ý¥Ù¡¼¥¹¤Î¥ì¥×¥ê¥±¡¼¥·¥ç¥ó¥½¥ê¥å¡¼ ¥·¥ç¥ó¤¬¤¤¤í¤¤¤í¤Ê¥ì¥×¥ê¥±¡¼¥·¥ç¥ó¥â¥Ç¥ë¤ò¥µ¥Ý¡¼¥È¤·¤Æ¤¤¤Þ¤¹¡£
ǧ¼±¤µ¤ì¤¿Ì¾Á°¤Î¤â¤Ã¤È¤â°ìÈÌŪ¤Ê¸¶°ø¤Ï¡¢¥Æ¡¼¥Ö¥ë¤òºîÀ®¤¹¤ëºÝ¤Ë¡¢ ¥Æ¡¼¥Ö¥ë¤ä¥«¥é¥à¤ò°Ï¤¦Æó½Å°úÍÑÉä¤Î»ÈÍѤǤ¹¡£ Æó½Å°úÍÑÉä¤ò»È¤¦¤È¡¢¥Æ¡¼¥Ö¥ë¤È¥«¥é¥à¤Î̾Á°¡Ê¼±Ê̻ҤȤ¤¤¤¤Þ¤¹¡Ë¤ÏÂçʸ»ú¤È¾®Ê¸»ú¤Î¶èÊÌ ¤ò¤·¤Æ³ÊǼ¤µ¤ì¤Þ¤¹¡£¤·¤¿¤¬¤Ã¤Æ¡¢pgAdmin¤Î¤è¤¦¤Ë¥Æ¡¼¥Ö¥ëºîÀ®¤Î¤È¤¤Ë ¼«Æ°Åª¤ËÆó½Å°úÍÑÉä¤ò»È¤¦¤â¤Î¤Ï¥¯¥¨¥ê¤ÎÃæ¤Ç¤½¤ì¤é¤Î̾Á°¤ò»È¤¦¤È¤¤Ë Æó½Å°úÍÑÉä¤òÉÕ¤±¤Ê¤¯¤Æ¤Ï¤Ê¤é¤Ê¤¤¤³¤È¤ò°ÕÌ£¤·¤Þ¤¹¡£¤³¤Î¤¿¤á¡¢¼±ÊÌ»Ò ¤òǧ¼±¤µ¤»¤ë¤¿¤á¤Ë¤Ï°Ê²¼¤Î¤¤¤º¤ì¤«¤ò¿´¤¬¤±¤Þ¤¹¡£
createdb -E¥³¥Þ¥ó¥É¥ª¥×¥·¥ç¥ó¤Ë UTF8 ¤¢¤ë¤¤¤Ï EUC_JP ¤Î¥¨¥ó¥³¡¼¥Ç¥£¥ó¥°¤ò»ØÄꤷ¤Æ¥Ç¡¼¥¿¥Ù¡¼¥¹¤òºîÀ®¤¹¤«¡¢¼¡¤Î¤è¤¦¤Ë ¥¨¥ó¥³¡¼¥Ç¥£¥ó¥°¤ò»ØÄꤷ¤Æ¥Ç¡¼¥¿¥Ù¡¼¥¹¤òºîÀ®¤·¤Æ¤¯¤À¤µ¤¤¡£
CREATE DATABASE dbname WITH ENCODING 'UTF8'; ¤â¤·¤¯¤Ï¡¢ CREATE DATABASE dbname WITH ENCODING 'EUC_JP';
psql¤ÎÃæ¤Ç¥¯¥é¥¤¥¢¥ó¥È¤Î¥¨¥ó¥³¡¼¥Ç¥£¥ó¥°¤ò»ØÄꤷ¤Æ¤¯¤À¤µ¤¤¡£
SET client_encoding TO 'SJIS'
PostgreSQL¥Ç¡¼¥¿¥Ù¡¼¥¹¤Î¥¨¥ó¥³¡¼¥Ç¥£¥ó¥°¤Ë»È¤¨¤ëÆüËܸìʸ»ú¥³¡¼¥É ¤Ï EUC_JP ¤« UTF-8(UNICODE) ¤Ç¤¢¤ë¤¿¤á¡¢Shift-JISɽ¼¨¤Î¥³¥Þ¥ó¥É¥×¥í ¥ó¥×¥È¤«¤é¤Ï¡¢client_encoding¤òÀßÄꤷ¤Æ¤ª¤«¤Ê¤¤¤È¡¢ÆüËܸì¤òɽ¼¨¤¹¤ë ºÝ¤Ëʸ»ú²½¤±¤¬¤ª¤¤Þ¤¹¡£
[ÌõÃí¡§
ÆüËܸìÈǤÎÀ½ºî¤Ë¤Ä¤¤¤Æ¤Ï°Ê²¼¤ÎÄ̤ê¤Ç¤¹¡£
ºÇ½ª¹¹¿·Æü: 2007ǯ09·î13Æü
ËÝÌõ¼Ô: ·¬Â¼ ½á (Jun Kuwamura <juk at PostgreSQL.jp>)
¤³¤ÎFAQ¤ÎÏÂÌõ¤ÎºîÀ®¤Ë¤¢¤¿¤ê¶¨ÎϤò¤·¤Æ¤¯¤À¤µ¤Ã¤¿Êý¡¹(·É¾Î¤Ïά¤µ¤»¤Æ¤¤¤¿¤À¤¤Þ¤¹):
ÅÄÃç Ì(Minoru TANAKA <Tanaka.Minoru at keiken.co.jp>)
Àаæ ãÉ×(Tatsuo ISHII <ishii at sraoss.co.jp>)
óîÆ£ ÃοÍ(Tomohito SAITOH <tomos at elelab.nsc.co.jp>)
ÇϾì È¥(Hajime BABA <baba at kusastro.kyoto-u.ac.jp>)
²¬ËÜ °ì¹¬(Kazuyuki OKAMOTO <kaz-okamoto at hitachi-system.co.jp>)
¾®¿û ¾¼°ì(Shoichi Kosuge <s-kosuge at str.hitachi.co.jp>)
»³²¼ µÁÇ·(Yoshiyuki YAMASHITA <dica at eurus.dti.ne.jp>)
¶ ¿¿ÂÀϺ(Sintaro SAKAI <s_sakai at mxn.mesh.ne.jp>)
À¸±Û ¾»¸Ê(Masami OGOSHI <ogochan at zetabits.com>)
ÀÐÀî ½Ó¹Ô(Toshiyuki ISHIKAWA <tosiyuki at gol.com>)
ËÜÅÄ Ìй(Shigehiro HONDA <fwif0083 at mb.infoweb.ne.jp>)
¤»¤» ¤¸¤å¤ó(Jun SESE <sesejun at linet.gr.jp>)
¿Àë ±Ñ¹§(Hidetaka KAMIYA <hkamiya at catvmics.ne.jp>)
¿û¸¶ ÆØ(Atsushi SUGAWARA <asugawar at f3.dion.ne.jp>)
°ðÍÕ ¹áÍý(Kaori Inaba <i-kaori at sra.co.jp>)
¤ò¤Ï¤¸¤á¡¢¥Ý¥¹¥È¥°¥ì¥¹¤Ë´Ø¤¹¤ëÏÃÂêËÉÙ¤ÊÆüËܸìPostgreSQL¥á¡¼¥ê¥ó¥°¥ê¥¹¥È¡¢
ÏÂÌõ¤Î¤¤Ã¤«¤±¤òºî¤Ã¤Æ¤¯¤ì¤¿¤ê¡¢¤¤¤Ä¤â¥Á¥§¥Ã¥¯¤ò¤·¤Æ¤¯¤ì¤ë
JF(Linux Japanese FAQ)¥×¥í¥¸¥§¥¯¥È¡¢FreeBSD ¥É¥¥å¥á¥ó¥Æ¡¼¥·¥ç¥ó¥×¥í¥¸¥§¥¯¥È
¤ÎÊý¡¹¡¢¤½¤ì¤«¤é¡¢Ä¾Àܤ¢¤ë¤¤¤Ï´ÖÀÜŪ¤Ë¤«¤«¤ï¤Ã¤Æ¤¯¤À¤µ¤ë¤¹¤Ù¤Æ¤Î¥ª¡¼¥×¥ó¥½¡¼¥¹
¥³¥ß¥å¥Ë¥Æ¥£¤Î¤ß¤Ê¤µ¤Þ¤Ë´¶¼Õ¤¤¤¿¤·¤Þ¤¹¡£
¤³¤ÎËÝÌõʸ½ñ¤Ï ËÜ²È "Frequently Asked Questions" ¤Î¥Ú¡¼¥¸¤Ë "Japanese FAQ"
¤È¤¤¤¦¹àÌܤǤ¢¤ê¤Þ¤¹¡£
¤Þ¤¿¡¢ºÇ¿·ÈǤϰʲ¼¤Î¥µ¥¤¥È¤Ë¤¢¤ê¤Þ¤¹¡£
http://www.PostgreSQL.jp/wg/jpugdoc/ ¡ÖJPUGʸ½ñ¡¦½ñÀÒ´ØϢʬ²Ê²ñ¡×
http://www.linux.or.jp/JF/JFdocs/INDEX-database.html ¡ÖLinux JF¥×¥í¥¸¥§¥¯¥È¡×
http://www.linet.gr.jp/~juk/pgsql/ ¡ÖPostgreSQL Notes for Japanese¡×¡ÊËÝÌõ¼Ô¥Ú¡¼¥¸¡Ë
¤Ê¤ª¡¢¤³¤ÎÏÂÌõ¤Ë´Ø¤¹¤ë¤´°Õ¸«¡¦¤´¼ÁÌä¤Ï(juk at PostgreSQL.jp)¤Þ¤Ç¤ª´ó¤»¤¯¤À¤µ¤¤¡£
¡Ê¢¨ ¥á¡¼¥ë¥¢¥É¥ì¥¹¤Î " at " ¤ÏŬÀڤ˾¤·¤Æ¤¯¤À¤µ¤¤¡£È¾³Ñ¤Î "@" ¤Ç¤¹¡£¡Ë
]
HIVE: All information for read only. Please respect copyright! |