PostgreSQL(¥Ý¥¹¥È¥°¥ì¥¹¡¦¥¥å¡¼¡¦¥¨¥ë)¤Ë¤Ä¤¤¤Æ¤è¤¯¤¢¤ë¼ÁÌä¤È¤½¤Î²òÅú(FAQ) ¸¶Ê¸ºÇ½ª¹¹¿·Æü: Sun Jan 9 14:44:04 EST 2005 ¸½ºß¤Î°Ý»ý´ÉÍý¼Ô: Bruce Momjian (pgman@candle.pha.pa.us) Maintainer of Japanese Translation: Jun Kuwamura (juk at PostgreSQL.jp) ¤³¤Îʸ½ñ¤ÎºÇ¿·ÈÇ¤Ï http://www.postgresql.org/files/documentation/faqs/FAQ.html ¤Ç¸«¤ë¤³¤È¤¬¤Ç¤¤Þ¤¹¡£ ¥×¥é¥Ã¥È¥Û¡¼¥à¤ËÆÃͤμÁÌä¤Ë¤Ä¤¤¤Æ¤Ï: http://www.postgresql.org/docs/faq/ ¤Ë²óÅú¤¬¤¢¤ê¤Þ¤¹¡£ (°Ê²¼¡¢Ìõ¼Ô¤Ë¤è¤ëÃí¼á¤ò [ÌõÃí¡§ ¤È ] ¤È¤Ç°Ï¤ó¤Çµ¤·¤Þ¤¹¡£) [ÌõÃí¡§ ÆüËܸìÈÇÀ½ºî¤Ë¤Ä¤¤¤Æ¤Î¥á¥â¤ÏºÇ¸åÈø¤Ø°ÜÆ°¤·¤Þ¤·¤¿¡£ ÆüËܸìÈǤΤ³¤Îʸ½ñ¤Ï ËÜ²È "Docs" ¤Î "Frequently Asked Questions" ¤Î ¤È¤³¤í¤Ë "Japanese FAQ" ¤È¤¤¤¦¸«½Ð¤Ç¤¢¤ê¤Þ¤¹¡£¤Þ¤¿¡¢°Ê²¼¤Î¥µ¥¤¥È¤Ë¤â ¤¢¤ê¤Þ¤¹¡£ http://www.PostgreSQL.jp/wg/jpugdoc/ http://www.rccm.co.jp/~juk/pgsql/ http://www.linux.or.jp/JF/ ¤³¤ÎÏÂÌõ¤Ë¤Ä¤¤¤Æ¤ªµ¤¤Å¤¤ÎÅÀ¤Ï(juk at PostgreSQL.jp)¤Þ¤Ç¥á¡¼¥ë¤Ç¤ª´ó¤»²¼¤µ¤¤¡£ 2005ǯ01·î12Æü ·¬Â¼ ½á ] _________________________________________________________________ °ìÈÌŪ¤Ê¼ÁÌä 1.1) PostgreSQL¤È¤Ï²¿¤Ç¤¹¤«¡© ²¿¤ÈÆɤߤޤ¹¤«¡© 1.2) PostgreSQL¤ÎÃøºî¸¢¤Ï¤É¤¦¤Ê¤Ã¤Æ¤Þ¤¹¤«¡© 1.3) PostgreSQL¤ÎÆ°ºî¤¹¤ëUnix¥×¥é¥Ã¥È¥Û¡¼¥à¤Ï¡© 1.4) Unix°Ê³°¤Î°Ü¿¢ÈǤǻȤ¨¤ë¤â¤Î¤Ï¡© 1.5) PostgreSQL¤Ï¤É¤³¤«¤éÆþ¼ê¤Ç¤¤Þ¤¹¤«¡© 1.6) ¥µ¥Ý¡¼¥È¤Ï¤É¤³¤Ç¼õ¤±¤é¤ì¤Þ¤¹¤«¡© 1.7) ºÇ¿·ÈǤϤɤì¤Ç¤¹¤« 1.8) ¤É¤Î¤è¤¦¤Êʸ½ñ¤¬¤¢¤ê¤Þ¤¹¤«¡© 1.9) ´ûÃΤΥХ°¤ä̤¤À̵¤¤µ¡Ç½¤Ï¤É¤¦¤ä¤Ã¤Æ¸«¤Ä¤±¤Þ¤¹¤«¡© 1.10) SQL¤Ï¤É¤¦¤¹¤ì¤Ð³Ø¤Ù¤Þ¤¹¤«¡© 1.11) PostgreSQL¤ÏÀ¾Îñ2000ǯÌäÂê(Y2K)¤ËÂбþ¤·¤Æ¤¤¤Þ¤¹¤«¡© 1.12) ³«È¯¥Á¡¼¥à¤Ë¤Ï¤É¤Î¤è¤¦¤Ë»²²Ã¤·¤Þ¤¹¤«¡© 1.13) ¥Ð¥°¥ì¥Ý¡¼¥È¤Ï¤É¤Î¤è¤¦¤Ëȯ¿®¤·¤Þ¤¹¤«¡© 1.14) ¾¤ÎDBMS¤ÈÈæ¤Ù¤ÆPostgreSQL¤Ï¤É¤¦¤Ê¤Î¤Ç¤¹¤«¡© 1.15) PostgreSQL¤ò»ñ¶âÌ̤DZç½õ¤¹¤ë¤Ë¤Ï¤É¤¦¤¹¤ì¤Ð¤è¤¤¤Ç¤¹¤«¡© ¥æ¡¼¥¶¡¼¡¦¥¯¥é¥¤¥¢¥ó¥È¤Î¼ÁÌä 2.1) PostgreSQL ¤Î ODBC ¥É¥é¥¤¥Ð¡¼¤Ï¤¢¤ê¤Þ¤¹¤«¡© 2.2) PostgreSQL ¤ò Web ¥Ú¡¼¥¸¤ÈÏ¢·È¤µ¤»¤ë¤Ë¤Ï¤É¤ó¤Ê¥Ä¡¼¥ë¤¬¤¢¤ê¤Þ¤¹¤«¡© 2.3) PostgreSQL ¤Ë¥°¥é¥Õ¥£¥«¥ë¡¦¥æ¡¼¥¶¥¤¥ó¥¿¡¼¥Õ¥§¥¤¥¹¤Ï¤¢¤ê¤Þ¤¹¤«¡© 2.4) ¤É¤Î¤è¤¦¤Ê¸À¸ì¤Ç PostgreSQL ¤ÈÄÌ¿®¤Ç¤¤¹¤«¡© ´ÉÍý¾å¤Î¼ÁÌä 3.1) ¤É¤Î¤è¤¦¤Ë¤¹¤ì¤Ð /usr/local/pgsql °Ê³°¤Î¾ì½ê¤Ë¥¤¥ó¥¹¥È¡¼¥ë¤Ç¤­ ¤Þ¤¹¤«¡© 3.2) postmaster ¤òÁö¤é¤»¤ë¤È¡¢ Bad System Call ¤È¤«¥³¥¢¡¦¥À¥ó¥×¤·¤¿¤È¤Î¥á¥Ã¥»¡¼¥¸¤¬½Ð¤Þ¤¹¡£¤Ê¤¼¤Ç¤¹¤«¡© 3.3) postmaster ¤òÁö¤é¤»¤è¤¦¤È¤¹¤ë¤È¡¢ IpcMemoryCreate ¥¨¥é¡¼¤¬½Ð¤Þ¤¹¡£¤Ê¤¼¤Ç¤¹¤«¡© 3.4) postmaster¤òÁö¤é¤»¤è¤¦¤È¤¹¤ë¤È¡¢ IpcSemaphoreCreate ¥¨¥é¡¼¤¬½Ð¤Þ¤¹¡£¤Ê¤¼¤Ç¤¹¤«¡© 3.5) ¾¤Î¥Û¥¹¥È¤«¤é¤ÎÀܳ¤Ï¤É¤Î¤è¤¦¤ËÀ©¸æ¤·¤Þ¤¹¤«¡© 3.6) ¤è¤êÎɤ¤À­ ǽ¤òÆÀ¤ë¤¿¤á¤Ë¤Ï¡¢¥Ç¡¼¥¿¥Ù¡¼¥¹¡¦¥¨¥ó¥¸¥ó¤ò¤É¤Î¤è¤¦¤ËÄ´À°¤¹¤ì¤ÐÎɤ¤¤Ç¤¹ ¤«¡© 3.7) ¤É¤Î¤è¤¦¤Ê¥Ç¥Ð¥°µ¡Ç½¤¬»È¤¨¤Þ¤¹¤«¡© 3.8) Àܳ¤·¤è¤¦¤È¤¹¤ë¤È¤¤Ë 'Sorry, too many clients' ¤¬½Ð¤ë¤Î¤Ï¤Ê¤¼¤Ç¤¹¤«¡© 3.9) pgsql_tmp ¥Ç¥£¥ì¥¯¥È¥ê¤ÎÃæ¤Ë¤Ï²¿¤¬¤¢¤ê¤Þ¤¹¤«¡© 3.10) PostgreSQL¤Î¥á¥¸¥ã¡¼¥ê¥ê¡¼¥¹¤ò¥¢¥Ã¥×¥Ç¡¼¥È¤¹¤ë¤Î¤Ë¥À¥ó¥×¤È¥ê¥¹¥È¥¢¤ò¤· ¤Ê¤¯¤Æ¤Ï¤Ê¤é¤Ê¤¤¤Î¤Ï¤Ê¤¼¤Ç¤¹¤«¡© 3.11) ¥Ï¡¼¥É¥¦¥§¥¢¤Ë¤Ï¤É¤ó¤Ê¥³¥ó¥Ô¥å¡¼¥¿¤ò»È¤¨¤Ð¤è¤¤¤Ç¤¹¤«¡© Áàºî¾å¤Î¼ÁÌä 4.1) ¥Ð¥¤¥Ê¥ê¡¦¥«¡¼¥½¥ë¤ÈÄ̾參¡¼¥½¥ë¤È¤Î°ã¤¤¤Ï²¿¤Ç¤¹¤«¡© 4.2) ºÇ½é¤Î¿ô¥í¥¦¤Î¤ß¤ò select ¤¹¤ë¤Ë¤Ï¤É¤¦¤·¤Þ¤¹¤«¡© ¥é¥ó¥À¥à¤Ê¥í¥¦¡© 4.3) ¥Æ¡¼¥Ö¥ë¤ä¤½¤Î¾¤Î¾ðÊó¤Î¥ê¥¹¥È¤ò psql ¤Ç¸«¤ë¤Ë¤Ï¤É¤¦¤·¤Þ¤¹¤«¡© 4.4) ¥Æ¡¼¥Ö¥ë¤«¤é¥«¥é¥à¤Îºï½ü¡¢¤¢¤ë¤¤¤Ï¡¢¥Ç¡¼¥¿·¿¤òÊѹ¹¤¹¤ë¤Ë¤Ï¤É¤¦¤·¤Þ¤¹¤« ¡© 4.5) ¥í¥¦¡¢¥Æ¡¼¥Ö¥ë¡¢¥Ç¡¼¥¿¥Ù¡¼¥¹¤ÎºÇÂ祵¥¤¥º¤Ï¡© 4.6) °ìÈÌŪ¤Ê¥Æ¥­ ¥¹¥È¥Õ¥¡¥¤¥ë¤«¤é¥Ç¡¼¥¿¤òÊݸ¤¹¤ë¤Ë¤Ï¡¢¥Ç¡¼¥¿¥Ù¡¼¥¹¤Î¥Ç¥£¥¹¥¯ÍÆÎ̤ϤɤΠ¤¯¤é¤¤É¬ÍפǤ¹¤«¡© 4.7) ÄêµÁ¤µ¤ì¤¿¥Æ¡¼¥Ö¥ë¡¢¥¤¥ó¥Ç¥Ã¥¯¥¹¡¢¥Ç¡¼¥¿¥Ù¡¼¥¹¡¢¤ª¤è¤Ó¡¢¥æ¡¼¥¶¤ò¤É¤Î¤è ¤¦¤Ë¤·¤Æ¸«¤Ä¤±½Ð¤·¤Þ¤¹¤«¡© 4.8) Ì䤤¹ç¤ï¤»¤¬ÃÙ¤¤¤¦¤¨¡¢¥¤¥ó¥Ç¥Ã¥¯¥¹¤ò»È¤Ã¤Æ¤¤¤ëÍͻҤ¬¤¢¤ê¤Þ¤»¤ó¡£¤Ê¤¼¤Ç ¤¹¤«¡© 4.9) Ì䤤¹ç¤ï¤»¥ª¥Ö¥Æ¥£¥Þ¥¤¥¶¤¬¤É¤Î¤è¤¦¤ËÌ䤤¹ç¤ï¤»¤òɾ²Á¤¹¤ë¤«¤ò¸«¤ë¤Ë¤Ï¤É ¤¦¤·¤Þ¤¹¤«¡© 4.10) R-tree ¥¤¥ó¥Ç¥Ã¥¯¥¹¤È¤Ï²¿¤Ç¤¹¤«¡© 4.11) °äÅÁŪÌ䤤¹ç¤ï¤»ºÇŬ²½¤È¤Ï²¿¤Ç¤¹¤«¡© 4.12) Àµµ¬É½¸½¤Ç¤Î¸¡º÷¤äÂçʸ»ú¤È¾®Ê¸»ú¤È¤ò¶èÊ̤·¤Ê¤¤Àµµ¬É½¸½¸¡º÷¤Ï¤É¤Î¤è¤¦¤Ë ¼Â¸½¤·¤Þ¤¹¤«¡©Âçʸ»ú¤È¾®Ê¸»ú¤È¤ò¶èÊ̤·¤Ê¤¤¸¡º÷¤Î¤¿¤á¤Î¥¤¥ó¥Ç¥Ã¥¯¥¹¤Ï¤É ¤Î¤è¤¦¤Ë»È¤¤¤Þ¤¹¤«¡© 4.13) Ì䤤¹ç¤ï¤»¤ÎÃæ¤Ç¡¢¥Õ¥£¡¼¥ë¥É¤¬ NULL ¤Ç¤¢¤ë¤³¤È¤ò¸¡½Ð¤¹¤ë¤Ë¤Ï¤É¤¦¤·¤Þ¤¹¤«¡© 4.14) ¿§¡¹¤Êʸ»ú·¿¤Î¤½¤ì¤¾¤ì¤Î°ã¤¤¤Ï²¿¤Ç¤¹¤«¡© 4.15.1) ÄÌÈÖ(serial)¡¿¼«Æ°Áýʬ¥Õ¥£¡¼¥ë¥É¤Ï¤É¤Î¤è¤¦¤Ë¤Ä¤¯¤ê¤Þ¤¹¤«¡© 4.15.2) SERIAL¥Ç¡¼¥¿·¿¤ËÁÞÆþ¤µ¤ì¤ëÃͤϡ¢¤É¤¦¤¹¤ì¤ÐÆÀ¤é¤ì¤Þ¤¹¤«¡© 4.15.3) currval() ¤Ï¾¤Î¥æ¡¼¥¶¤È¤Î¶¥¹ç¾õÂ֤˴٤뤳¤È¤Ï¤Ê¤¤¤Ç¤¹¤«¡© 4.15.4) ¥È¥é¥ó¥¶¥¯¥·¥ç¥ó¤¬ÃæÃǤ·¤¿¤È¤­ ¤Ë¤â¤¦¤¤¤Á¤É¥·¡¼¥±¥ó¥¹Èֹ椬»È¤ï¤ì¤Ê¤¤¤Î¤Ï¤Ê¤¼¤Ç¤¹¤«¡©¥·¡¼¥±¥ó¥¹¡¿SERI AL¥«¥é¥à¤Ë¶õ¤¤¬¤¢¤ë¤Î¤Ï¤Ê¤¼¤Ç¤¹¤«¡© 4.16) OID ¤È¤Ï²¿¤Ç¤¹¤«¡© TID ¤È¤Ï²¿¤Ç¤¹¤«¡© 4.17) PostgreSQL ¤Ç»È¤ï¤ì¤ë¤¤¤¯¤Ä¤«¤ÎÍѸì¤Î°ÕÌ£¤Ï²¿¤Ç¤¹¤«¡© 4.18) ¥¨¥é¡¼¥á¥Ã¥»¡¼¥¸ "ERROR: Memory exhausted in AllocSetAlloc()"¤¬½Ð¤ë¤Î¤Ï¤Ê¤¼¤Ç¤¹¤«¡© 4.19) ¤É¤Î¥Ð¡¼¥¸¥ç¥ó¤Î PostgreSQL ¤òÁö¤é¤»¤Æ¤¤¤ë¤Î¤«¤òÄ´¤Ù¤ë¤Ë¤Ï¤É¤¦¤·¤Þ¤¹¤«¡© 4.20) ¥é¡¼¥¸¥ª¥Ö¥¸¥§¥¯¥È¤ÎÁàºî¤Ç¡¢invalid large obj descriptor¤È½Ð¤ë¤Î¤Ï¤Ê¤¼¤Ç¤¹¤«¡© 4.21) ¸½ºß¤Î»þ¹ï¤¬¥Ç¥Õ¥©¥ë¥È¤È¤Ê¤ë¤è¤¦¤Ê¥«¥é¥à¤Ï¤É¤Î¤è¤¦¤Ë¤Ä¤¯¤ê¤Þ¤¹¤«¡© 4.22) ¤Ê¤¼¡¢IN¤ò»È¤¦ÉûÌ䤤¹ç¤ï¤»¤¬¤È¤Æ¤âÃÙ¤¤¤Î¤Ç¤¹¤«¡© 4.23) ³°Éô·ë¹ç(outer join)¤Ï¤É¤Î¤è¤¦¤Ë¼Â¸½¤·¤Þ¤¹¤«? 4.24) Ê£¿ô¤Î¥Ç¡¼¥¿¥Ù¡¼¥¹¤ò»È¤¦Ì䤤¹ç¤ï¤»¤Ï¤É¤Î¤è¤¦¤Ë¤¹¤ì¤Ð¤Ç¤¤Þ¤¹¤«¡© 4.25) ´Ø¿ô¤ÇÊ£¿ô¤Î¥í¥¦¤Þ¤¿¤Ï¥«¥é¥à¤òÊÖ¤¹¤Ë¤Ï¤É¤¦¤·¤Þ¤¹¤«¡© 4.26) ¤Ê¤¼¡¢PL/PgSQL ´Ø¿ô¤ÎÃ椫¤é°ì»þ¥Æ¡¼¥Ö¥ë¤ò³Î¼Â¤Ë create/drop ¤¹¤ë¤³¤È¤¬¤Ç¤¤Ê¤¤¤Î¤Ç¤·¤ç¤¦¤«¡© 4.27) ¤É¤Î¤è¤¦¤Ê°Å¹æ²½¥ª¥×¥·¥ç¥ó¤òÍøÍѤǤ¤Þ¤¹¤«? PostgreSQL¤Î³ÈÄ¥¤Ë¤Ä¤¤¤Æ¤Î¼ÁÌä 5.1) ¼«Ê¬¤Ç½ñ¤¤¤¿¥æ¡¼¥¶ÄêµÁ´Ø¿ô¤ò psql ¤ÎÃæ¤Ç¼Â¹Ô¤¹¤ë¤È¥³¥¢¡¦¥À¥ó¥×¤·¤Æ¤·¤Þ¤¦¤Î¤Ï¤Ê¤¼¤Ç¤¹¤«¡© 5.2) PostgreSQL ÍѤ˽ñ¤¤¤¿¤Á¤ç¤Ã¤ÈÁÇŨ¤Ê¿·¤·¤¤·¿¤ä´Ø¿ô¤òÄ󶡤·¤Æ¥×¥í¥¸¥§¥¯¥È¤Ë¹×¸¥¤·¤¿ ¤¤¤Î¤Ç¤¹¤¬¡© 5.3) ¥¿¥×¥ë¤òÊÖ¤¹ C¸À¸ì¤Î´Ø¿ô¤Ï¤É¤Î¤è¤¦¤Ë½ñ¤¤Þ¤¹¤«¡© 5.4) ¥½¡¼¥¹¡¦¥Õ¥¡¥¤¥ë¤òÊѹ¹¤·¤Þ¤·¤¿¡£ºÆ¥³¥ó¥Ñ¥¤¥ë¤·¤Æ¤âÊѲ½¤¬¸«¤é¤ì¤Ê¤¤¤Î¤Ï ¤Ê¤¼¤Ç¤¹¤«¡© _________________________________________________________________ °ìÈÌŪ¤Ê¼ÁÌä 1.1) PostgreSQL ¤È¤Ï²¿¤Ç¤¹¤«¡© ²¿¤ÈÆɤߤޤ¹¤«¡© PostgreSQL¤ÏPost-Gres-Q-L(¥Ý¥¹¥È - ¥°¥ì¥¹ - ¥¥å¡¼ - ¥¨¥ë) ¤Èȯ²»¤·¤Þ¤¹¡£ PostgreSQL ¤Ï¼¡À¤Âå DBMS ¸¦µæÍѤΥץí¥È¥¿¥¤¥×¤Ç¤¢¤Ã¤¿ POSTGRES ¥Ç¡¼¥¿¥Ù¡¼¥¹´ÉÍý¥·¥¹¥Æ¥à¤Î²þÎÉÈǤǤ¹¡Ê¤³¤Î¤¿¤á¡¢º£¤Ç¤â¤È¤¤É¤­ "Postgres" ¤È¸Æ¤Ð¤ì¤ë¤³¤È¤¬¤¢¤ê¤Þ¤¹¡Ë¡£PostgreSQL ¤Ï POSTGRES ¤Î¶¯ÎϤʥǡ¼¥¿¡¦¥â¥Ç¥ë¤ÈË­ É٤ʥǡ¼¥¿¡¦¥¿¥¤¥×(·¿)¤òÊÝ»ý¤·¤Ê¤¬¤é¡¢POSTGRES ¤Ç»È¤ï¤ì¤¿ PostQuel Ì䤤¹ç¤ï¤»¸À¸ì¤ò¡¢³ÈÄ¥¤·¤¿ SQL ¤Î¥µ¥Ö¥»¥Ã¥È¤ËÃÖ¤­ ´¹¤¨¤Æ¤¤¤Þ¤¹¡£PostgreSQL ¤Ï̵ÎÁ¤Ç´°Á´¤Ê¥½¡¼¥¹¤òÍøÍѤǤ¤Þ¤¹¡£ PostgreSQL ¤Î³«È¯¤Ï¡¢PostgreSQL ³«È¯¥á¡¼¥ê¥ó¥°¥ê¥¹¥È¤Ë»²²Ã¤·¤Æ¤¤¤ë³«È¯¼Ôã¤Î¥Á¡¼¥à¤Ç¤¹¤Ù¤Æ¹Ô¤Ê¤ï¤ì¤Æ¤¤ ¤Þ¤¹¡£¸½ºß¤ÎºÂĹ¤Ï Marc G. Fournier (scrappy@PostgreSQL.org )¤Ç¤¹¡£(²¼µ¤Î1.6Àá¤Ë»²²Ã¤Î»ÅÊý¤¬¤¢¤ê¤Þ¤¹¡£)¸½ºß¡¢¤³¤Î¥Á¡¼¥à¤¬ PostgreSQL ³«È¯¤Î¤¹¤Ù¤Æ¤ÎÌÌÅݤò¤ß¤Æ¤¤¤Þ¤¹¡£¤³¤Î¥Á¡¼¥à¤Ï¥³¥ß¥å¥Ë¥Æ¥£¥×¥í¥¸¥§¥¯¥È¤Ç ¤¢¤ê¡¢¤¤¤«¤Ê¤ë´ë¶È¤Ë¤è¤Ã¤Æ¤âÀ©¸æ¤ò¼õ¤±¤Þ¤»¤ó¡£»²²Ã¤·¤¿¤±¤ì¤Ð¡¢ http://www.postgresql.org/files/documentation/faqs/FAQ_DEV.html ¤Ë¤¢¤ë³«È¯¼Ô¸þ¤±¤ÎFAQ¤ò¸«¤Æ¤¯¤À¤µ¤¤¡£ Postgres95-1.01 ¤ÎÃ濴Ū¤Ê³«È¯¼Ô¤Ï Andrew Yu ¤È Jolly Chen ¤Ç¤·¤¿¤¬¡¢¤½¤Î¾ÂçÀª¤Î¿Í¡¹¤¬¤³¤Î¥³¡¼¥É¤Î°Ü¿¢¡¢¥Æ¥¹¥È¡¢¥Ç¥Ð¥°¡¢¤ª¤è¤Ó¡¢ ²þÎɤ˻²²Ã¤·¤Þ¤·¤¿¡£PostgreSQL ¤ÎÇÉÀ¸¸µ¥³¡¼¥É¤Ç¤¢¤ë Postgres ¤Ï¥«¥ê¥Õ¥©¥ë¥Ë¥¢Âç³Ø¥Ð¡¼¥¯¥ì¥¤¹»¤Ë¤ª¤¤¤Æ¡¢ Michael Stonebraker ¶µ¼ø¤Î»Ø´ø¤Î¤â¤È¡¢Â¿¤¯¤Î³ØÀ¸¡¢Â´¶ÈÀ¸¡¢ËÜ¿¦¤Î¥×¥í¥°¥é¥Þ¤¿¤Á¤ÎÅØÎϤˤè¤ê ºî¤é¤ì¤Þ¤·¤¿¡£ ¥Ð¡¼¥¯¥ì¥¤¤Ë¤ª¤±¤ë¤³¤Î¥½¥Õ¥È¥¦¥§¥¢¤Î¤â¤È¤Î̾Á°¤Ï Postgres ¤Ç¤·¤¿¤¬¡¢SQL ¤Îµ¡Ç½¤¬Äɲ䵤줿 1995 ǯ¤Ë¤½¤Î̾Á°¤Ï Postgres95 ¤ËÊѹ¹¤µ¤ì¡¢1996 ǯ¤Î½ª¤ê¤Ë¤½¤Î̾Á°¤Ï PostgreSQL ¤ËÊѹ¹¤µ¤ì¤Þ¤·¤¿¡£ 1.2) PostgreSQL ¤ÎÃøºî¸¢¤Ï¤É¤¦¤Ê¤Ã¤Æ¤Þ¤¹¤«¡© PostgreSQL ¤Ï²¼µ¤ÎÃøºî¸¢¤Ë½¾¤¤¤Þ¤¹¡£ [ÌõÃí¡§ ÀµÊ¸¤Ï±Ñ¸ì¤Ç¤¹¡£»²¹Í¤È¤·¤Æ¡¢Ìõʸ¤òÊ»µ·ÇºÜ¤·¤Þ¤¹¡£ ] PostgreSQL Data Base Management System Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group Portions Copyright (c) 1994-6 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-2004, PostgreSQL¹ñºÝ³«È¯¥Á¡¼¥à ÉôʬŪÃøºî¸¢ (c) 1994-6 ¥«¥ê¥Õ¥©¥ë¥Ë¥¢Âç³ØËܹ» ËÜ¥½¥Õ¥È¥¦¥§¥¢¤ª¤è¤Ó¤½¤Îʸ½ñ°ì¼°¤Ï¾åµ¤ÎÃøºî¸¢É½¼¨¤È¡¢¤³¤Îʸ¾Ï ¤ª¤è¤Ó¤³¤ì¤Ë³¤¯Æó¤Ä¤ÎÃÊÍÁ´¤Æ¤ÎÊ£À½¤ËźÉÕ¤µ¤ì¤Æ¤¤¤ë¸Â¤ê¤Ë¤ª¤¤ ¤Æ¡¢»ÈÍÑ¡¢Ê£À½¡¢½¤Àµ¤ª¤è¤ÓÇÛÉդεö²Ä¤ò¡¢¤¤¤«¤Ê¤ëÌÜŪ¤Ç¤¢¤Ã¤Æ¤â¡¢ ̵½þ¤Ç¤«¤ÄƱ°Õ½ñ̵¤·¤Ë¹Ô¤Ê¤¨¤ë¤³¤È¤ò¤³¤³¤Ëǧ¤á¤Þ¤¹¡£ ¥«¥ê¥Õ¥©¥ë¥Ë¥¢Âç³Ø¤Ï¡¢¤¤¤«¤Ê¤ëÅö»ö¼Ô¤Ë¤¿¤¤¤·¤Æ¤â¡¢Íø±×¤Î²õ¼º¤ò ´Þ¤à¡¢Ä¾ÀÜŪ¡¢´ÖÀÜŪ¡¢ÆÃÊÌ¡¢¶öÁ³¤¢¤ë¤¤¤ÏɬÁ³Åª¤Ë¤«¤«¤ï¤é¤ºÀ¸¤¸¤¿ »³²¤Ë¤Ä¤¤¤Æ¡¢¤¿¤È¤¨¥«¥ê¥Õ¥©¥ë¥Ë¥¢Âç³Ø¤¬¤³¤ì¤é¤Î»³²¤Ë¤Ä¤¤¤ÆÁÊÄÉ ¤ò¼õ¤±¤Æ¤¤¤¿¤È¤·¤Æ¤â¡¢°ìÀÚ¤ÎÀÕǤ¤òÉ餤¤Þ¤»¤ó¡£ ¥«¥ê¥Õ¥©¥ë¥Ë¥¢Âç³Ø¤Ï¡¢¾¦ÍÑÌÜŪ¤Ë¤ª¤±¤ë°ÅÌÛ¤ÎÊݾڤȡ¢ÆÃÄêÌÜŪ¤Ç ¤ÎŬ¹çÀ¤Ë´Ø¤·¤Æ¤Ï¤â¤È¤è¤ê¡¢¤³¤ì¤é¤Ë¸Â¤é¤º¡¢¤¤¤«¤Ê¤ëÊݾڤâÊü´þ¤¹ ¤ë¤³¤È¤òÌÀ¸À¤·¤Þ¤¹¡£°Ê²¼¤ËÍÑ°Õ¤µ¤ì¤¿¥½¥Õ¥È¥¦¥§¥¢¤Ï¡Ö¤½¤Î¤Þ¤Þ¡×¤ò ´ðËܸ¶Íý¤È¤·¡¢¥«¥ê¥Õ¥©¥ë¥Ë¥¢Âç³Ø¤Ï¤½¤ì¤ò°Ý»ý¡¢»Ù±ç¡¢¹¹¿·¡¢²þÎɤ¢ ¤ë¤¤¤Ï½¤Àµ¤¹¤ëµÁ̳¤òÉ餤¤Þ¤»¤ó¡£ [ÌõÃí¡§ Ãøºî¸¢¤Ë´Ø¤¹¤ëÀµÊ¸¤Ï¾åµ¤Î±Ñ¸ì¤Ë¤è¤ëɽµ¤Ç¤¹¡£ÆüËܸìÌõ¤Ï¤¢¤¯¤Þ¤Ç »²¹Í¤Ç¤¹¡£ ] ¾åµ¤ÏBSD¥é¥¤¥»¥ó¥¹¤Ç¸Å¤¥ª¡¼¥×¥ó¥½¡¼¥¹¤Î¥é¥¤¥»¥ó¥¹¤Ç¤¹¡£¥½¡¼¥¹¥³¡¼¥É ¤¬¤É¤Î¤è¤¦¤Ë»È¤ï¤ì¤è¤¦¤È¤âÀ©¸Â¤·¤Þ¤»¤ó¡£¹¥¤Þ¤·¤¤¤³¤È¤Ê¤Î¤Ç¡¢²æ¡¹¤â¤½¤ì ¤ò ÊѤ¨¤ë¤Ä¤â¤ê¤Ï¤¢¤ê¤Þ¤»¤ó¡£ 1.3) PostgreSQL ¤ÎÆ°ºî´Ä¶¤Ï¡© °ìÈÌŪ¤Ë¡¢ºÇ¶á¤ÎUnix¸ß´¹¥×¥é¥Ã¥È¥Û¡¼¥à¤Ç¤¢¤ì¤ÐPostgreSQL¤ò²ÔƯ¤µ¤»¤é¤ì ¤ë¤Ï¤º¤Ç¤¹¡£¥ê¥ê¡¼¥¹¤Î»þÅÀ¤Ç¼ÂºÝ¤Ë¥Æ¥¹¥È¤ò¹Ô¤Ê¤Ã¤¿¤³¤È¤ÎÊó¹ð¤¬¤Ê¤µ¤ì¤¿ ¥×¥é¥Ã¥È¥Û¡¼¥à¤Ë¤Ä¤¤¤Æ¤Ï¥¤¥ó¥¹¥È¡¼¥ë¼ê°ú½ñ¤ËÎóµó¤·¤Æ¤¢¤ê¤Þ¤¹¡£ 1.4) Unix°Ê³°¤Î°Ü¿¢ÈǤǻȤ¨¤ë¤â¤Î¤Ï¡© ¥Ð¡¼¥¸¥ç¥ó8.0¤Ë¤Ê¤ê¡¢PostgreSQL ¤Ï¡¢Win2000, WinXP, Win2003¤Ê¤É¤Î Microsoft Windows NT¥Ù¡¼¥¹¤Î¥ª¥Ú¥ì¡¼¥Æ¥£¥ó¥°¥·¥¹¥Æ¥à¤Ç¥Í¥¤¥Æ¥£¥Ö¤ËÁö¤ë¤è¤¦¤Ë¤Ê¤ê¤Þ¤·¤¿¡£ ¥Ñ¥Ã¥±¡¼¥¸¤Ë¤Ê¤Ã¤¿¥¤¥ó¥¹¥È¡¼¥é¤¬¡¢http://pgfoundry.org/projects/pginst aller¤«¤éÆþ¼ê¤Ç¤¤Þ¤¹¡£ Windows (Win95, Win98, WinMe)¤Ê¤É¡¢MSDOS¥Ù¡¼¥¹¤Î¥Ð¡¼¥¸¥ç¥ó¤Ç¤Ï¡¢Cygwin ¤ò»È¤Ã¤ÆPostgreSQL¤òÁö¤é¤»¤ë¤³¤È¤¬¤Ç¤¤Þ¤¹¡£ [ÌõÃí pgInstaller ¤ÎÆþ¼ê¤ÏFTP¥ß¥é¡¼¥µ¥¤¥È¤Î win32 ¥Ç¥£¥ì¥¯¥È¥ê¤«¤é¤â²Äǽ¤Ç¤¹¡£ http://www.postgresql.org/mirrors-ftp.html ] ¼¡¤Î¥µ¥¤¥È¤Ë Novell Netware 6 ¤Ø¤Î°Ü¿¢¤â¤¢¤ê¤Þ¤¹¡£ http://forge.novell.com ¤Þ¤¿¡¢OS/2 (eComStation) ¥Ð¡¼¥¸¥ç¥ó¤Ï¡¢ http://hobbes.nmsu.edu/cgi-bin/h-search?sh=1&button=Search&key=postgre SQL&stype=all&sort=type&dir=%2F¤Ë¤¢¤ê¤Þ¤¹¡£ 1.5) PostgreSQL ¤Ï¤É¤³¤«¤éÆþ¼ê¤Ç¤¤Þ¤¹¤«¡© PostgreSQL ¤ÎÂ縵¤Î anonymous ftp ¥µ¥¤¥È¤Ï ftp://ftp.PostgreSQL.org/pub/ ¤Ç¤¹¡£ ¥ß¥é¡¼¥µ¥¤¥È¤Ë¤Ä¤¤¤Æ¤Ï¡¢²æ¡¹¤Î¥á¥¤¥ó Web ¥Ú¡¼¥¸¤ò¤´Í÷²¼¤µ¤¤¡£ [ÌõÃí: °Ê²¼¤ÏÆüËܤΥߥ顼¥µ¥¤¥È¤Ç¤¹: Japan: ftp://ftp.jp.postgresql.org/ Japan: ftp://mirror.nucba.ac.jp/mirror/PostgreSQL/pub/ Japan: ftp://ring.ip-kyoto.ad.jp/pub/misc/db/PostgreSQL/ Japan: ftp://ring.crl.go.jp/pub/misc/db/PostgreSQL/ Japan: ftp://ring.saitama-u.ac.jp/pub/misc/db/PostgreSQL/ Japan: ftp://ring.astem.or.jp/pub/misc/db/PostgreSQL/ Japan: ftp://ring.exp.fujixerox.co.jp/pub/misc/db/PostgreSQL/ Japan: ftp://ring.jah.ne.jp/pub/misc/db/PostgreSQL/ Japan: ftp://ring.etl.go.jp.jp/pub/misc/db/PostgreSQL/ Japan: ftp://ring.asahi-net.or.jp/pub/misc/db/PostgreSQL/ Japan: ftp://ring.so-net.ne.jp/pub/misc/db/PostgreSQL/ Japan: ftp://ring.aist.go.jp/pub/misc/db/PostgreSQL/ ] 1.6) ¥µ¥Ý¡¼¥È¤Ï¤É¤³¤Ç¼õ¤±¤é¤ì¤Þ¤¹¤«¡© ¼çÍפʥ᡼¥ê¥ó¥°¡¦¥ê¥¹¥È¤Ï: pgsql-general@PostgreSQL.org¤Ç¤¹¡£PostgreSQL ¤Ë´Ø¤¹¤ë¤³¤È¤Ç¤¢¤ì¤ÐµÄÏÀ¤¬¤Ç¤­ ¤Þ¤¹¡£¤³¤Î¥ê¥¹¥È¤Ø¤Î»²²Ã¤Ï¡¢ÅŻҥ᡼¥ë¤ÎËÜʸ(Subject ¹Ô¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó)¤Ë¼¡¤Î£²¹Ô¤ò½ñ¤¤¤Æ¡¢ subscribe end pgsql-general-request@PostgreSQL.org ¤ØÁ÷¤Ã¤Æ²¼¤µ¤¤¡£ ¥À¥¤¥¸¥§¥¹¥ÈÈǤΥ᡼¥ê¥ó¥°¡¦¥ê¥¹¥È¤â¤¢¤ê¤Þ¤¹¡£¤³¤Î¥ê¥¹¥È¤Ø¤Î»²²Ã¤Ï "ËÜʸ"¤Ë¡§ subscribe end ¤È½ñ¤¤¤Æ pgsql-general-digest-request@PostgreSQL.org ¤ØÅŻҥ᡼¥ë¤òÁ÷¤Ã¤Æ²¼¤µ¤¤¡£ ¥À¥¤¥¸¥§¥¹¥ÈÈǤϡ¢¥á¥¤¥ó¥ê¥¹¥È¤Ç¼õ¿®¤¹¤ë¥á¥Ã¥»¡¼¥¸¤¬ 30k ÄøÅÙί¤ëËè¤Ë¥À¥¤¥¸¥§¥¹¥ÈÈǥꥹ¥È¤Î¥á¥ó¥Ð¡¼¤ËÁ÷ÉÕ¤µ¤ì¤Þ¤¹¡£ ¥Ð¥°¥ì¥Ý¡¼¥ÈÍѤΥ᡼¥ê¥ó¥°¥ê¥¹¥È¤â¤¢¤ê¤Þ¤¹¡£¤³¤Î¥ê¥¹¥È¤Ø¤Î»²²Ã¤Ï "ËÜʸ" ¤Ë¡§ subscribe end ¤È½ñ¤¤¤Æpgsql-bugs-request@PostgreSQL.org ¤ØÅŻҥ᡼¥ë¤òÁ÷¤Ã¤Æ²¼¤µ¤¤¡£ ³«È¯¼Ô¤ÎµÄÏÀ¤Î¤¿¤á¤Î¥á¡¼¥ê¥ó¥°¥ê¥¹¥È¤âÍøÍѤǤ­ ¤Þ¤¹¡£¤³¤Î¥ê¥¹¥È¤Ø¤Î»²²Ã¤ÏÅŻҥ᡼¥ë¤ÎËÜʸ¤Ë¡§ subscribe end ¤È½ñ¤¤¤Æ¡¢pgsql-hackers-request@PostgreSQL.org¤ØÅŻҥ᡼¥ë¤òÁ÷¤Ã¤Æ²¼¤µ ¤¤¡£ PostgreSQL ¤Ë¤Ä¤¤¤Æ¤â¤Ã¤È¾Ü¤·¤¯ÃΤꤿ¤±¤ì¤Ð¡¢¼¡¤Î PostgreSQL WWW¥Û¡¼¥à¥Ú¡¼¥¸¤«¤é¤¿¤É¤ì¤Þ¤¹¡§ http://www.PostgreSQL.org ¥á¥¸¥ã¡¼¤ÊIRC ¥Á¥ã¥ó¥Í¥ë¤Ï¡¢Freenode (irc.freenode.net)¤Î #PostgreSQL ¤È¤¤¤¦¥Á¥ã¥ó¥Í¥ë¤Ç¤¹¡£ UNIX ¥³¥Þ¥ó¥É¤Ç¡¢ irc -c '#PostgreSQL' "$USER" irc.freenode.net. ¤ò»È¤Ã¤Æ»²²Ã¤Ç¤¤Þ¤¹¡£ Ʊ¤¸¥Í¥Ã¥È¥ï¡¼¥¯¤Ë¡¢¥¹¥Ú¥¤¥ó¸ì¤Î¥Á¥ã¥ó¥Í¥ë(#postgresql-es)¤â¤¢ ¤ê¡¢¥Õ¥é¥ó¥¹¸ì¤Î¥Á¥ã¥ó¥Í¥ë(#postgresqlfr)¤â¤¢¤ê¤Þ¤¹¡£ EFNet¤Ë¤âPostgreSQL¥Á¥ã¥ó¥Í¥ë¤¬¤¢¤ê¤Þ¤¹¡£ [ÌõÃí: 1999ǯ7·î23Æü¡¢ÆüËܥݥ¹¥È¥°¥ì¥¹¥æ¡¼¥¶¡¼²ñ¡¢Î¬¾ÎJPUG¤¬ÀßΩ¤µ¤ì¤Þ¤·¤¿¡£ JPUG ¤ÏÈó±ÄÍøÁÈ¿¥¤Ç¡¢PostgreSQL¤òÍøÍѤ¹¤ë¿Íã¤ÎÁê¸ß¶¨ÎϤξì¤È¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£ (2003ǯ5·î17Æü¡¢¡ÖÆüËÜPostgreSQL¥æ¡¼¥¶²ñ¡×¤Ë̾¾Î¤ò²þ¤á¤Þ¤·¤¿¡£) Àµ²ñ°÷¤Î²ñÈñ¤Ï̵ÎÁ¤Ç¤¹¤¬¡¢¶¨»¿²ñ°÷¤Î²ñÈñ¤È²ñ°÷¤ÎÀѶËŪ¤Ê¹×¸¥¤¬²ñ¤Î±¿±Ä¤ò½õ¤±¤Æ¤¤¤Þ¤¹¡£ ¾Ü¤·¤¯¤Ï¡¢JPUG ¤ÎWeb ¥µ¥¤¥È: http://www.PostgreSQL.jp/ ¤ò¤´Í÷¤¯¤À¤µ¤¤¡£²ñ°÷ÅÐÏ¿¤â²Äǽ¤È¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£ ÆüËܸì¤ÎIRC¥Á¥ã¥ó¥Í¥ë '#PostgreSQL*jp' ¤â¸ºß¤·¤Þ¤¹¡£ ¾¦ÍÑ¥µ¥Ý¡¼¥È²ñ¼Ò¤Î¥ê¥¹¥È¤Ïhttp://techdocs.postgresql.org/companies.php ¤Ë¤¢¤ê¤Þ¤¹¡£ 1.7) ºÇ¿·ÈǤϤɤì¤Ç¤¹¤« PostgreSQL ¤ÎºÇ¿·ÈǤϥС¼¥¸¥ç¥ó 7.4.6 ¤Ç¤¹¡£ ²æ¡¹¤Ï¡¢6¡Á8¥«·îËè¤Ë¥á¥¸¥ã¡¼¥ê¥ê¡¼¥¹¤ò¹Ô¤Ê¤¦¤³¤È¤ò·×²è¤·¤Æ¤¤¤Þ¤¹¡£ 1.8) ¤É¤Î¤è¤¦¤Êʸ½ñ¤¬¤¢¤ê¤Þ¤¹¤«¡© ÇÛÉÕ¤ÎÃæ¤Ë¡¢¤¤¤¯¤Ä¤«¤Î¥Þ¥Ë¥å¥¢¥ë¤È¥ª¥ó¥é¥¤¥ó¡¦¥Þ¥Ë¥å¥¢¥ë(¥Þ¥Ë¥å¥¢¥ë¡¦¥ Ú¡¼¥¸)¤ª¤è¤Ó¤¤¤¯¤Ä¤«¤Î¾®¤µ¤Ê¥Æ¥¹¥ÈÎãÂ꤬´Þ¤Þ¤ì¤Þ¤¹¡£/doc ¥Ç¥£¥ì¥¯¥È¥ê¤ò¤´Í÷²¼¤µ¤¤¡£¤Þ¤¿¡¢¥Þ¥Ë¥å¥¢¥ë¤Ï¡¢http://www.ca.PostgreSQL .org/docs/¤Ç¥ª¥ó¥é¥¤¥ó¤Ç¤â±ÜÍ÷¤Ç¤¤Þ¤¹¡£ [ÌõÃí: ¡Ê³ô¡ËSRA¤ÈÆüËÜPostgreSQL¥æ¡¼¥¶²ñ¤ÇËÝÌõ¤µ¤ì¡¢ ¡ÖPostgreSQL ¥ª¥Õ¥£¥·¥ã¥ë¥Þ¥Ë¥å¥¢¥ë¡× ¤È¤·¤Æ½ÐÈǤµ¤ì¤Æ¤¤¤Þ¤¹¡£ ] ¥ª¥ó¥é¥¤¥ó¤Ç»²¾È¤Ç¤¤ë PostgreSQL ¤ÎËܤâ2ºý¤¢¤ê¤Þ¤¹¡£http://www.PostgreSQL.org/docs/awbook.html [ÌõÃí: ÆüËܥݥ¹¥È¥°¥ì¥¹¥æ¡¼¥¶¡¼²ñ¤Î ¡ÖPostgreSQL BookËÝÌõʬ²Ê²ñ¡× ¤Ë¤ÆËÝÌõ¤µ¤ì¤Þ¤·¤¿¡£ ] ¤ª¤è¤Ó¡¢ http://www.commandprompt.com/ppbook/ ¤Ç¤¹¡£ ¹ØÆþ²Äǽ¤Ê½ñÀÒ¤ÎÌÜÏ¿¤Ï¡¢http://techdocs.PostgreSQL.org/techdocs/bookre views.php ¤Ë¤¢¤ê¤Þ¤¹¡£ PostgreSQL µ»½Ñ¾ðÊóµ­ »ö¤â¡¢http://techdocs.PostgreSQL.org/ ¤Ë¤¢¤ê¤Þ¤¹¡£ [ÌõÃí: ÏÂÌõʸ½ñ¤Ï¡¢ÆüËܥݥ¹¥È¥°¥ì¥¹¥æ¡¼¥¶¡¼²ñ¤Îhttp://www.postgresql.jp/docum ent/ ¤ò¤´¤é¤ó²¼¤µ¤¤¡£ ] ¥³¥Þ¥ó¥É¥é¥¤¥ó¤Î¥¯¥é¥¤¥¢¥ó¥È¥×¥í¥°¥é¥àpsql ¤â¡¢·¿¡¢±é»»»Ò¡¢´Ø¿ô¡¢½¸Ì󡢤½¤Î¾¤Î¾ðÊó¤ò¤ª¸«¤»¤¹¤ë¡¢¤¤¤¯¤Ä¤«¤ÎÁÇÀ²¤é ¤·¤¤ \d ¥³¥Þ¥ó¥É¤ò»ý¤Á¤Þ¤¹¡£ - \? ¤ò»È¤¦¤ÈÍøÍѲÄǽ¤Ê¥³¥Þ¥ó¥É¤¬É½¼¨¤µ¤ì¤Þ¤¹¡£ ²æ¡¹¤Î Web ¥µ¥¤¥È¤Ë¤Ï¡¢¤â¤Ã¤ÈÂô»³¤Îʸ½ñ¤¬¤¢¤ê¤Þ¤¹¡£ 1.9) ´ûÃΤΥХ°¤ä̤¤À̵¤¤µ¡Ç½¤Ï¤É¤¦¤ä¤Ã¤Æ¸«¤Ä¤±¤Þ¤¹¤«¡© PostgreSQL¤Ï³ÈÄ¥¤µ¤ì¤¿SQL-92¤Î¥µ¥Ö¥»¥Ã¥È¤ò¥µ¥Ý¡¼¥È¤·¤Þ¤¹¡£ ²æ¡¹¤Î¥Ú¡¼¥¸¤Î TODO ¥ê¥¹¥È¤Ë¡¢´ûÃΤΥХ°¤ä·çÍǽ¤ä¾­ Íè·×²è¤Ë¤Ä¤¤¤Æ¤Îµ½Ò¤¬¤¢¤ê¤Þ¤¹¡£ 1.10) SQL ¤Ï¤É¤¦¤¹¤ì¤Ð³Ø¤Ù¤Þ¤¹¤«¡© http://www.PostgreSQL.org/docs/awbook.html ¤Ë¤¢¤ëPostgreSQLËÜ¤Ç SQL ¤ò¶µ¤¨¤Æ¤¤¤Þ¤¹¡£ [ÌõÃí: ÆüËܥݥ¹¥È¥°¥ì¥¹¥æ¡¼¥¶¡¼²ñ¤Î ¡ÖPostgreSQL BookËÝÌõʬ²Ê²ñ¡× ¤Ë¤ÆËÝÌõ¤µ¤ì½ÐÈǤµ¤ì¤Æ¤¤¤Þ¤¹¡£ ] ¤½¤Î¾¤Ë¤â PostgreSQLËܤȤ·¤Æ¡¢http://www.commandprompt.com/ppbook ¤¬¤¢¤ê¤Þ¤¹¡£ ÁÇÀ²¤é¤·¤¤¼ê°ú½ñ¤Ï¡¢http://www.intermedia.net/support/sql/sqltut.shtm, http://ourworld.compuserve.com/homepages/graeme_birchall/HTM_COOK.HTM, ¤½¤·¤Æ¡¢http://sqlcourse.com ¤Ë¤¢¤ê¤Þ¤¹¡£ ¤½¤Î¾¤Ç¤Ï¡¢ "Teach Yourself SQL in 21 Days, Second Edition" ¤¬ 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 ¤Î¤è¤¦¤Ê¤Î¤â¤¢¤ê¤Þ¤¹¡£ [ÌõÃí: ÀаæãÉ×»á¤Ë¤è¤ëÆüËܸì¤Î»²¹Íʸ¸¥¤Î¾Ò²ð¥Ú¡¼¥¸ http://www.SRA.co.jp/people/t-ishii/PostgreSQL/doc-jp/index.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 ¤â¥ª¥ó¥é¥¤¥ó¤ÇÆɤळ¤È¤¬¤Ç¤¤Þ¤¹¡£ ] 1.11) PostgreSQL¤ÏÀ¾Îñ2000ǯÌäÂê(Y2K)¤ËÂбþ¤·¤Æ¤¤¤Þ¤¹¤«¡© Âбþ¤·¤Æ¤Þ¤¹¡£À¾Îñ2000ǯ¤è¤ê¸å¤ÎÆüÉդ⡢µª¸µÁ°2000ǯ¤è¤êÁ°¤ÎÆüÉդ⡢´Ê ñ¤Ë°·¤¨¤Þ¤¹¡£ 1.12) ³«È¯¥Á¡¼¥à¤Ë¤Ï¤É¤Î¤è¤¦¤Ë»²²Ã¤·¤Þ¤¹¤«¡© ¤Þ¤ººÇ½é(£±ÈÖÌÜ)¤Ë¡¢ºÇ¿·¤Î¥½¡¼¥¹¤ò¥À¥¦¥ó¥í¡¼¥É¤·¡¢²æ¡¹¤Î Web ¥µ¥¤¥È¤«ÇÛÉۤ˴ޤޤì¤Æ¤¤¤ëPostgreSQL Developers¤Îʸ½ñ¤òÆɤߤޤ¹¡£ £²ÈÖÌܤˡ¢pgsql-hackers ¤È pgsql-patches ¥á¡¼¥ê¥ó¥°¡¦¥ê¥¹¥È¤ò¹ØÆÉ(subscribe)¤·¤Þ¤¹¡£ £³ÈÖÌܤˡ¢¹âÉʼÁ¤Î¥Ñ¥Ã¥Á¤òpgsql-patches¤Ëȯ¿®¤·¤Þ¤¹¡£ ¤ª¤è¤½½½¿Í¤Á¤ç¤Ã¤È¤Î¿Í㤬¡¢PostgreSQL CVS¥¢¡¼¥«¥¤¥Ö¤Ë¥³¥ß¥Ã¥È¤¹¤ë¸¢¸Â¤ò»ý¤Ã¤Æ¤¤¤Þ¤¹¡£ ¤½¤Î¤½¤ì¤¾¤ì¤Î¿Í㤬Âô»³¤Î¹âÉʼÁ¤Ê¥Ñ¥Ã¥Á¤òȯ¿®¤¹¤ë¤Î¤Ç¡¢¸½ºß¥³¥ß¥Ã¥¿¡¼ ¤È¤Ê¤Ã¤Æ¤¤¤ë¿Íã¤Ï¤½¤ì¤ËÄɤ¤ÉÕ¤¯¤Î¤¬ÂçÊѤǤ¹¤¬¡¢²æ¡¹¤ÏÈà¤é¤¬¥³¥ß¥Ã¥È¤· ¤¿¥Ñ¥Ã¥Á¤Ï¹âÉʼÁ¤Ç¤¢¤ë¤È³Î¿®¤·¤Æ¤¤¤Þ¤¹¡£ 1.13) ¥Ð¥°¥ì¥Ý¡¼¥È¤Ï¤É¤Î¤è¤¦¤Ëȯ¿®¤·¤Þ¤¹¤«¡© http://www.postgresql.org/support/submitbug ¤ÎPostgreSQL ¥Ð¥°¥Õ¥©¡¼¥à¤òˬ¤ì¤Æ²¼¤µ¤¤¡£ ¥Ð¥°¥ì¥Ý¡¼¥È¤òÄó½Ð¤¹¤ë»ÅÊý¤Ë¤Ä¤¤¤Æ¤Î¼ê°ú¤È»Ø¿Ë¤¬¤¢¤ê¤Þ¤¹¡£ ¤½¤ì¤ÈƱ»þ¤Ë ftp ¥µ¥¤¥È ftp://ftp.PostgreSQL.org/pub/¤Ç¡¢¤â¤Ã¤È¿·¤·¤¤¥Ð¡¼¥¸¥ç¥ó¤Î PostgreSQL ¤¢¤ë¤¤¤Ï¥Ñ¥Ã¥Á¤ò¤µ¤¬¤·¤Æ¤ß¤Æ²¼¤µ¤¤¡£ 1.14) ¾¤ÎDBMS¤ÈÈæ¤Ù¤ÆPostgreSQL¤Ï¤É¤¦¤Ê¤Î¤Ç¤¹¤«¡© ¥½¥Õ¥È¥¦¥§¥¢¤ò·×¤ëÊýË¡¤Ë¤Ï¤¤¤¯¤Ä¤«¤¢¤ê¤Þ¤¹¡£µ¡Ç½¤ÈÀǽ¤È¿®ÍêÀ­ ¤È¥µ¥Ý¡¼¥È¤È²Á³Ê¤Ç¤¹¡£ µ¡Ç½(Features) PostgreSQL¤Ï¡¢¥È¥é¥ó¥¶¥¯¥·¥ç¥ó¡¢ÉûÌ䤤¹ç¤ï¤»¡¢¥È¥ê¥¬¡¼¡¢¥Ó¥å¡¼¡ ¢³°Éô¥¡¼À°¹çÀ­ »²¾È¡¢¤ª¤è¤Ó¡¢ÀöÎý¤µ¤ì¤¿¥í¥Ã¥¯µ¡¹½¤Ê¤É¡¢Â絬ÌϾ¦ÍÑDBMS¤¬»ý¤Äµ¡Ç ½¤ò¤Û¤È¤ó¤É»ý¤Ã¤Æ¤¤¤Þ¤¹¡£¤µ¤é¤Ë PostgreSQL¤Ï¡¢¥æ¡¼¥¶ÄêµÁ·¿¡¢·Ñ¾µ¡¢¥ë¡¼¥ë¡¢¤½¤ì¤«¤é¡¢¥í¥Ã¥¯¶¥¹ç¤ ò½Ì¾®¤¹¤ë¥Þ¥ë¥Á¥Ð¡¼¥¸¥ç¥óƱ»þÀ­ À©¸æ¤Ê¤É¡¢¾¦ÍÑDBMS¤â»ý¤Á¹ç¤ï¤»¤Ê¤¤¤è¤¦¤Êµ¡Ç½¤ò¤¤¤¯¤Ä¤«»ý¤Á¹ç¤ï¤ »¤Æ¤¤¤Þ¤¹¡£ Àǽ(Performance) PostgreSQL¤Ï¾¤Î¾¦ÍѤ¢¤ë¤¤¤Ï¥ª¡¼¥×¥ó¥½¡¼¥¹¤Î¥Ç¡¼¥¿¥Ù¡¼¥¹¤È¸ß³Ñ¤ ÎÀ­ ǽ¤â»ý¤Á¤Þ¤¹¡£¤¢¤ëÌ̤ǤϤè¤êÁᤫ¤Ã¤¿¤ê¡¢¤Û¤«¤ÎÌ̤ǤϤè¤êÃÙ¤«¤Ã¤ ¿¤ê¤·¤Þ¤¹¡£MySQL¤Ê¤É¤ÎÆò½·¿¥Ç¡¼¥¿¥Ù¡¼¥¹¡¦¥·¥¹¥Æ¥à¤Ë¤¯¤é¤Ù¤Æ¡¢P ostgreSQL ¤ÏÊ£¿ô¥æ¡¼¥¶¤äÊ£»¨¤ÊÌ䤤¹ç¤ï¤»¡¢¤Þ¤¿¡¢ read/write Ì䤤¹ç¤ï¤»¤Î¥í¡¼¥É¤¬¤è¤ê¹â®¤Ç¤¹¡£MySQL¤Ï¾¯¤Ê¤¤¥æ¡¼¥¶¤Ç¤Îñ½ã¤Ê SELECT Ì䤤¹ç¤ï¤»¤Ç¤Ï¹â®¤Ç¤¹¡£¤â¤Á¤í¤ó¡¢MySQL¤Ë¤Ï¾åµ­ ¤ÎFeatures¤ÎÀá¤Ë¼¨¤¹¤è¤¦¤Êµ¡Ç½¤Ï¤Û¤È¤ó¤É¤¢¤ê¤Þ¤»¤ó¡£²æ¡¹¤Ï¡¢Pos tgreSQL¤Ë½ÀÆðÀ¤Èµ¡Ç½À¤òÁȤ߹þ¤ß¤Ê¤¬¤é¤â¡¢À䤨¤ºÀ­ ǽ¤Î²þÁ±¤ò³¤±¤Æ¤¤¤Þ¤¹¡£ ¿®ÍêÀ(Reliability) ²æ¡¹¤Ï¡¢DBMS¤Î¿®ÍêÀ­ ¤¬¹â¤¯¤Ê¤¯¤Æ¤Ï¤½¤Î²ÁÃͤ¬Ìµ¤¤¤³¤È¤òÍý²ò¤·¤Æ¤Þ¤¹¡£½½Ê¬¥Æ¥¹¥È¤·¤Æ¡ ¢°ÂÄꤷ¤¿¥³¡¼¥É¤ò¥Ð¥°¤òºÇ¾®¤Ë¤·¤Æ¤«¤é¥ê¥ê¡¼¥¹¤¹¤ë¤è¤¦¤ËÅؤá¤Æ¤Þ ¤¹¡£¤½¤ì¤¾¤ì¤Î¥ê¥ê¡¼¥¹¤Ï¾¯¤Ê¤¯¤È¤â1¥«·î°Ê¾å¤Î¥Ù¡¼¥¿¡¦¥Æ¥¹¥È¤ò¹Ô ¤Ê¤¤¡¢¤³¤ì¤Þ¤Ç¤Î¥ê¥ê¡¼¥¹¤ÎÍúÎò¤¬¡¢À½ÉÊÈǤȤ·¤Æ°ÂÄꤷ¤¿·ø¸Ç¤Ê¥ê¥ ꡼¥¹¤Ç¤¢¤ë¤³¤È¤òʪ¸ì¤Ã¤Æ¤¤¤Þ¤¹¡£¤³¤ÎʬÌî¤Ç¤Ï¡¢Â¾¤Î¥Ç¡¼¥¿¥Ù¡¼¥¹ ¤ÈÈæ¤Ù¤Æ¤â½¿§¤¬¤Ê¤¤¤³¤È¤Ë¼«¿®¤ò»ý¤Ã¤Æ¤¤¤Þ¤¹¡£ ¥µ¥Ý¡¼¥È(Support) ²æ¡¹¤Î¥á¡¼¥ê¥ó¥°¥ê¥¹¥È¤Ï¡¢Áø¶ø¤¹¤ë¤¤¤«¤Ê¤ëÌäÂê¤Ë¤Ä¤¤¤Æ¤â²ò·è¤Ø¤ μê½õ¤±¤ò¤·¤Æ¤¯¤ì¤ë¡¢³«È¯¼Ô¤ä¥æ¡¼¥¶¤ÎÂ礭 ¤Ê½¸¤Þ¤ê¤Ø¤ÎÀÜÅÀ¤òÄ󶡤·¤Æ¤¤¤Þ¤¹¡£²æ¡¹¤ÏÌäÂê¤Î²ò·è¤òÊݾڤ¹¤ë¤³¤ ȤϤǤ­ ¤Þ¤»¤ó¤¬¡¢¾¦Íѥǡ¼¥¿¥Ù¡¼¥¹¤Ç¤¢¤Ã¤Æ¤â¾ï¤Ë²ò·è¤µ¤ì¤ë¤ï¤±¤Ç¤Ï¤¢¤ê¤ Þ¤»¤ó¡£³«È¯¼Ô¤ä¡¢¥æ¡¼¥¶¡¦¥³¥ß¥å¥Ë¥Æ¥£¡¢¥Þ¥Ë¥å¥¢¥ëÎà¡¢¤½¤ì¤Ë¡¢¥½ ¡¼¥¹¥³¡¼¥É¤Ê¤É¤ØľÀÜ¥¢¥¯¥»¥¹¤Ç¤­ ¤ë¤³¤È¤Ë¤è¤Ã¤Æ¡¢PostgreSQL¤Î¥µ¥Ý¡¼¥È¤Ï¡¢Â¾¤ÎDBMS¥µ¥Ý¡¼¥È¤è¤ê¤âÍ ¥¤ì¤¿¤â¤Î¤È¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£¸æÍ×˾¤ËÅú¤¨¤Æ¡¢»öÊÁËè¤Î¾¦ÍÑ¥µ¥Ý¡¼¥È¤Ê ¤É¤â¤¢¤ê¤Þ¤¹¡ÊFAQ1.6Àá¤ò¤´Í÷²¼¤µ¤¤¡Ë¡£ ²Á³Ê(Price) PostgreSQL¤ÎÍøÍѤϡ¢¾¦ÍѤǤâÈó¾¦ÍѤǤ⡢¤¹¤Ù¤Æ̵ÎÁ¤Ç¤¹¡£¾åµ­ ¤Ë¼¨¤·¤Æ¤¢¤ëBSD¥¹¥¿¥¤¥ë¤Î»ÈÍѵöÂú¤Ë³°¤ì¤Ê¤¤¸Â¤ê¡¢PostgreSQL¤Î¥³ ¡¼¥É¤òÀ©¸Â̵¤·¤Ç¾¦ÉʤËÁȤ߹þ¤à¤³¤È¤¬¤Ç¤¤Þ¤¹¡£ 1.15) PostgreSQL¤ò»ñ¶âÌ̤DZç½õ¤¹¤ë¤Ë¤Ï¤É¤¦¤¹¤ì¤Ð¤è¤¤¤Ç¤¹¤«¡© PostgreSQL¤Ï¡¢²æ¡¹¤¬»Ï¤á¤¿ 1996ǯ°ÊÍè¡¢ºÇ¹â¥¯¥é¥¹¤Î¾ðÊó´ðÈפò»ý¤Ã¤Æ¤¤ ¤Þ¤¹¡£¤³¤ì¤Ï¤¹¤Ù¤Æ¡¢Marc Fournie¤µ¤ó¤Î¤ª¤«¤²¤Ç¡¢Èà¤Ï¤³¤Î´ðÈפòÁϤê½Ð¤·¡¢²¿Ç¯¤Ë¤â¤ï¤¿¤Ã¤Æ´ÉÍý¤·¤ Ƥ¤Þ¤·¤¿¡£ ¼Á¤ÎÎɤ¤´ðÈפϡ¢¥ª¡¼¥×¥ó¥½¡¼¥¹¡¦¥×¥í¥¸¥§¥¯¥È¤Ë¤È¤Ã¤Æ¤Ï¤È¤Æ¤âÂçÀڤʤâ¤Î ¤Ç¡¢¥×¥í¥¸¥§¥¯¥È¤¬Á°¿Ê¤¹¤ëÀª¤¤¤ò¼º¤Ã¤ÆʬÎö¤¹¤ë¤Î¤ò²óÈò¤·¤Þ¤¹¡£ ¤â¤Á¤í¤ó¡¢¤³¤Î´ðÈפϰ¤¤¤â¤Î¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£°Ý»ý¤·Â³¤±¤ë¤¿¤á¤Ë¤ÏËè·î¤¢ ¤ë¤¤¤Ï°ì»þŪ¤Ë·ÐÈñ¤¬¤«¤«¤ê¤Þ¤¹¡£¤â¤·¡¢¤¢¤Ê¤¿¤ä¤¢¤Ê¤¿¤Î²ñ¼Ò¤Ë¡¢¤³¤¦¤·¤¿ ÅØÎϤΤ¿¤á¤Î»ñ¶â¤Î±ç½õ¤ò»Ü¤¹¤³¤È¤¬¤Ç¤­ ¤ë¤è¤¦¤Ç¤·¤¿¤é¡¢http://store.pgsql.com/shopping/¤«¤é´óÉÕ¤ò¤ª´ê¤¤¤·¤Þ¤¹ ¡£ ¤Þ¤¿¡¢Web¥Ú¡¼¥¸¤Ë¤Ï PostgreSQL,Inc ¤È¤¢¤ê¤Þ¤¹¤¬¡¢¤½¤³¤Î "¹×¸¥(contributions)"¤È¤¤¤¦¹àÌܤϡ¢ PostgreSQL ¥×¥í¥¸¥§¥¯¥È¤ò»Ù±ç¤¹¤ë¤À¤±¤Î¤¿¤á¤Ç¡¢·è¤·¤ÆÆÃÄê¤Î²ñ¼Ò¤Î¤¿¤á¤Î»ñ¶â¤Ç¤Ï¤¢ ¤ê¤Þ¤»¤ó¡£¤â¤·¡¢¾®ÀÚ¼ê(check)¤ÎÊý¤¬ÅÔ¹ç¤è¤±¤ì¤ÐÏ¢ÍíÀè¤Î½»½ê¤Ø¤ªÁ÷¤ê²¼¤ µ¤¤¡£ ¤µ¤é¤Ë¡¢PostgreSQL¤ò»È¤Ã¤¿À®¸ù»öÎã¤ò¤ª»ý¤Á¤Ç¤¢¤ì¤Ð¡¢¤¼¤Ò¡¢¤ï¤ì¤ï¤ì¤Î »öÎã¾Ò²ð¥ê¥¹¥È pgsql-advocacy@postgresql.org ¤Ø¤ªÁ÷¤ê¤¯¤À¤µ¤¤¡£ _________________________________________________________________ ¥æ¡¼¥¶¡¼¡¦¥¯¥é¥¤¥¢¥ó¥È¤Î¼ÁÌä 2.1) PostgreSQL ¤Î¤¿¤á¤Î ODBC ¥É¥é¥¤¥Ð¡¼¤Ï¤¢¤ê¤Þ¤¹¤«¡© PsqlODBC ¤È OpenLink ODBC ¤ÎÆó¤Ä¤Î ODBC ¥É¥é¥¤¥Ð¡¼¤¬ÍøÍѲÄǽ¤Ç¤¹¡£ PsqlODBC ¤Ï¼¡¤Î¾ì½ê¤«¤é¥À¥¦¥ó¥í¡¼¥É¤Ç¤¤Þ¤¹¡£ http://gborg.postgresql.org/project/psqlodbc/projdisplay.php OpenLink ODBC ¤Ï http://www.openlinksw.com/¤«¤éÆþ¼ê¤Ç¤¤Þ¤¹¡£É¸½àŪ¤Ê ODBC ¥¯¥é¥¤¥¢¥ó¥È¡¦¥½¥Õ¥È¥¦¥§¥¢¤Ç»È¤¨¤Þ¤¹¤Î¤Ç¡¢»Ù±ç¤·¤Æ¤¤¤ë¤¹¤Ù¤Æ¤Î¥×¥é¥Ã¥È ¥Û¡¼¥à(Win, Mac, Unix, VMS)¤«¤é PostgreSQL ¤Î ODBC ¤¬ÍøÍѤǤ¤Þ¤¹¡£ ¤¿¤Ö¤óÈà¤é¤Ï¡¢¾¦ÍÑÉʼÁ¤Î¥µ¥Ý¡¼¥È¤ÎɬÍפʿ͡¹¤ËÇä¤Ã¤Æ¤¤¤ë¤È»×¤¤¤Þ¤¹¤¬¡¢ ¥Õ¥ê¡¼¥¦¥§¥¢ÈǤϤ¤¤Ä¤Ç¤âÆþ¼ê²Äǽ¤Î¤è¤¦¤Ç¤¹¡£¼ÁÌä¤Ï¡¢postgres95@openlin k.co.uk ¤ØÁ÷¤Ã¤Æ²¼¤µ¤¤¡£ Programmer's Guide ¤Î ODBC ¤Î¾Ï¤â¤´Í÷¤¯¤À¤µ¤¤¡£ 2.2) PostgreSQL ¤ò Web ¥Ú¡¼¥¸¤ÈÏ¢·È¤µ¤»¤ë¤Ë¤Ï¤É¤ó¤Ê¥Ä¡¼¥ë¤¬¤¢¤ê¤Þ¤¹¤«¡© ¥Ç¡¼¥¿¥Ù¡¼¥¹¤ò΢¤Ë»ý¤Ä 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 ¤ò»È¤¤¤Þ¤¹¡£ [ÌõÃí: WDB ¤Ï¡¢Web ¤«¤é DataBase ¤Ø¤Î Perl ¤Î Interface ¤Ç¤¹¡£ wdb-p95 ¤Ø¤Î¥ê¥ó¥¯¤ÏÀÚ¤ì¤Æ¤·¤Þ¤Ã¤Æ¤¤¤Þ¤¹¡£¤ª¤½¤é¤¯¡¢Perl DBI ·Ðͳ¤Ç DBD::Pg ¤ÎÍøÍѤ¬²Äǽ¤È»×¤ï¤ì¤Þ¤¹¡£ ¸½ºß¡¢WDBI ¤È¤¤¤¦Ì¾Á°¤Ë¤Ê¤Ã¤Æ¤¤¤ë¤â¤Î http://www.egroups.com/list/wdb-users/ ¤È¡¢WDB¤Î̾Á°¤Î¤Þ¤Þ¤Î¤â¤Î http://www.i-con.dk/wdb/ ¤È¤¬¤¢¤ê¤Þ¤¹¡£¤½¤Î·Ð°Þ¤Ï¤è¤¯¤ï¤«¤ê¤Þ¤»¤ó¡£ ] 2.3) PostgreSQL ¤Ë¥°¥é¥Õ¥£¥«¥ë¡¦¥æ¡¼¥¶¥¤¥ó¥¿¡¼¥Õ¥§¥¤¥¹¤Ï¤¢¤ê¤Þ¤¹¤«¡© ¤â¤Á¤í¤ó¡¢PostgreSQL ¤Ø¤Î¥°¥é¥Õ¥£¥«¥ë¥¤¥ó¥¿¡¼¥Õ¥§¥¤¥¹¤¬¤¤¤¯¤Ä¤«¤¢¤ê¤Þ¤¹¡£ ¤½¤ÎÃæ¤ËPgAccess http://www.pgaccess.org ¤â´Þ¤Þ¤ì¤Þ¤¹¡£ PgAdmin III (http://www.pgadmin.org)¤â¤¢¤ê¤Þ¤¹¡£ RHDB Admin (http://sources.redhat.com/rhdb/ )¡¢TORA (http://www.globecom.net/tora/ (ÉôʬŪ¤Ë¾¦ÍÑ)) ¤ª¤è¤Ó¡¢ Rekall ( http://www.thekompany.com/products/rekall/, proprietary)¤â¤¢¤ê¤Þ ¤¹¡£ PhpPgAdmin ( http://phppgadmin.sourceforge.net/ ) ¤ÏPostgreSQL¤Ø¤ÎWeb¥Ù¡¼¥¹¤Î ¥¤¥ó¥¿¡¼¥Õ¥§¥¤¥¹¤òÄ󶡤·¤Þ¤¹¡£ ¤è¤ê¾ÜºÙ¤Ê¥ê¥¹¥È¤Ë¤Ä¤¤¤Æ¤Ï¡¢http://techdocs.postgresql.org/guides/GUIT ools ¤ò¤´Í÷¤¯¤À¤µ¤¤¡£ 2.4) ¤É¤Î¤è¤¦¤Ê¸À¸ì¤Ç PostgreSQL ¤ÈÄÌ¿®¤Ç¤¤¹¤«¡© ¿Íµ¤¤Î¤¢¤ë¤Û¤È¤ó¤É¤Î¸À¸ì¤ÏPostgreSQL¤Ø¤Î¥¤¥ó¥¿¡¼¥Õ¥§¥¤¥¹¤ò»ý¤Ã¤Æ¤¤¤Þ¤¹ ¡£ ¤¢¤Ê¤¿¤¬»È¤¦¥×¥í¥°¥é¥ß¥ó¥°¸À¸ì¤Î³ÈÄ¥¥â¥¸¥å¡¼¥ë¤Î¥ê¥¹¥È¤òÇÁ¤¤¤Æ¤ß¤Æ¤¯¤À ¤µ¤¤¡£ °Ê²¼¤Î¥¤¥ó¥¿¡¼¥Õ¥§¥¤¥¹¤ÏPostgreSQL¤ÎÇÛÉۤ˴ޤޤì¤Æ¤¤¤Þ¤¹¡£ * C (libpq) * Ëä¤á¹þ¤ßC (ecpg) * Java (jdbc) * Python (PyGreSQL) * TCL (libpgtcl) ¤½¤Î¾¤ÎÍøÍѲÄǽ¤Ê¥¤¥ó¥¿¡¼¥Õ¥§¥¤¥¹¤Ï http://gborg.postgresql.org ¤ÎDrivers/Interfaces¤Î¥»¥¯¥·¥ç¥ó¤Ë¤¢¤ê¤Þ¤¹¡£ [ÌõÃí¡§ ±Ê°Â¸ç»Ë¤µ¤ó¤Ï Palm ÈǤΠlibpq ¤ò³«È¯¤µ¤ì¤Þ¤·¤¿¡£ http://www.snaga.org/libpq/ ] _________________________________________________________________ ´ÉÍý¾å¤Î¼ÁÌä 3.1) ¤É¤Î¤è¤¦¤Ë¤¹¤ì¤Ð /usr/local/pgsql °Ê³°¤Î¾ì½ê¤Ë¥¤¥ó¥¹¥È¡¼¥ë¤Ç¤¤Þ¤¹¤«¡© ´Êñ¤ÊÊýË¡¤Ï¡¢ configure ¤òÁö¤é¤»¤ë¤È¤¤Ë --prefix ¥ª¥×¥·¥ç¥ó¤ò»ØÄꤹ¤ë¤³¤È¤Ç¤¹¡£ 3.2) postmaster ¤òÁö¤é¤»¤ë¤È¡¢Bad System Call ¤È¤«¥³¥¢¡¦¥À¥ó¥×¤·¤¿¤È¤Î¥á¥Ã¥»¡¼¥¸¤¬½Ð¤Þ¤¹¡£¤Ê¤¼¤Ç¤¹¤«¡© ¤µ¤Þ¤¶¤Þ¤ÊÌäÂ꤬¹Í¤¨¤é¤ì¤Þ¤¹¤¬¡¢¤Þ¤ººÇ½é¤Ë¤¢¤Ê¤¿¤Î¥«¡¼¥Í¥ë¤Ë System V IPC ¤Î³ÈÄ¥¤¬¥¤¥ó¥¹¥È¡¼¥ë¤µ¤ì¤Æ¤¤¤ë¤«¤ò³Îǧ¤·¤Æ¸«¤Æ¤¯¤À¤µ¤¤¡£PostgreSQL ¤Ï¥«¡¼¥Í¥ë¤Ë¤è¤ë¶¦Í¥á¥â¥ê¡¼¤È¥»¥Þ¥Õ¥©¤Î¥µ¥Ý¡¼¥È¤òɬÍפȤ·¤Þ¤¹¡£ 3.3) postmaster ¤òÁö¤é¤»¤è¤¦¤È¤¹¤ë¤È¡¢IpcMemoryCreate ¥¨¥é¡¼¤¬½Ð¤Þ¤¹¡£¤Ê¤¼¤Ç¤¹¤«¡© ¥«¡¼¥Í¥ë¤¬¶¦Í­ ¥á¥â¥ê¡¼¤ò»ý¤ÄÀßÄê¤Ë¤Ê¤Ã¤Æ¤¤¤Ê¤«¤Ã¤¿¤«¡¢¤Ç¤Ê¤±¤ì¤Ð¡¢¥«¡¼¥Í¥ë¤ËÂФ·¤Æ»È ¤¨¤ë¶¦Í¥á¥â¥ê¡¼¤ÎÂ礤µ¤òÂ礤¯ÀßÄꤹ¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£¶ñÂÎŪ¤ÊÂ礭 ¤µ¤Ï¡¢»È¤Ã¤Æ¤¤¤ë¥¢¡¼¥¥Æ¥¯¥Á¥ã¤Èpostmaster ¤òÁö¤é¤»¤ë¤È¤­ ¤ËÀßÄꤹ¤ë¥Ð¥Ã¥Õ¥¡¤Î¿ô¤È¥Ð¥Ã¥¯¥¨¥ó¥É¥×¥í¥»¥¹¤Ë°Í¸¤·¤Þ¤¹¡£¤Û¤È¤ó¤É¤Î¥· ¥¹¥Æ¥à¤Ç¤Ï¡¢´ûÄêÃͤΥХåե¡¥µ¥¤¥º¤Î¤Þ¤Þ¤Ç¡¢¾¯¤Ê¤¯¤È¤âÌó1MB¤¬É¬ÍפǤ¹¡ £ PostgreSQL Administrator's Guide/Server Run-time Environment/Managing Kernel Resources ¤Ë¶¦Í­ ¥á¥â¥ê¡¼¤È¥»¥Þ¥Õ¥©¤Ë¤Ä¤¤¤Æ¤Î¾ðÊó¤Î¾ÜºÙ¤¬¤¢¤ê¤Þ¤¹¤Î¤Ç¤´Í÷¤¯¤À¤µ¤¤¡£ 3.4) postmaster¤òÁö¤é¤»¤è¤¦¤È¤¹¤ë¤È¡¢IpcSemaphoreCreate ¥¨¥é¡¼¤¬½Ð¤Þ¤¹¡£¤Ê¤¼¤Ç¤¹¤«¡© ¤â¤·¥¨¥é¡¼¥á¥Ã¥»¡¼¥¸¤¬IpcSemaphoreCreate: semget failed (No space left on device)¤Ç¤¢¤ì¤Ð¡¢¥«¡¼¥Í¥ë¤¬½½Ê¬¤Ê¥»¥Þ¥Õ¥©¤ò»È¤¨¤ë¤è¤¦¤Ë¹½À®¤µ¤ì¤Æ¤¤¤Þ¤ »¤ó¡£Postgres¤ÏÀøºßŪ¤Ê¥Ð¥Ã¥¯¥¨¥ó¥É¥×¥í¥»¥¹Ëè¤Ë°ì¤Ä¤Î¥»¥Þ¥Õ¥©¤òɬÍפȤ ·¤Þ¤¹¡£¤È¤ê¤¢¤¨¤º¤Î²ò·èºö¤Ïpostmaster¤òµ¯Æ°¤¹¤ë¤È¤­ ¤Ë¡¢¥Ð¥Ã¥¯¥¨¥ó¥É¥×¥í¥»¥¹¤Î¿ô¤ò¤è¤ê¾¯¤Ê¤¯À©¸Â¤ò¤¹¤ë¤³¤È¤Ç¤¹¡£´ûÄêÃͤÎ32 ¤è¤ê¾®¤µ¤Ê¿ô¤Î¥Ñ¥é¥á¡¼¥¿¤ò-N¤Ç»È¤¤¤Þ¤¹¡£¤è¤ê¹±µ×Ū¤Ê²ò·èºö¤Ï¡¢¥«¡¼¥Í¥ë ¤ÎSEMMNS ¤È SEMMNI ¥Ñ¥é¥á¡¼¥¿¤òÁý¤ä¤¹¤³¤È¤Ç¤¹¡£ ÁàºîÉÔǽ¤Î¥»¥Þ¥Õ¥©¤â²áÅ٤ʥǡ¼¥¿¥Ù¡¼¥¹¥¢¥¯¥»¥¹¤Î´Ö¤Ë¥¯¥é¥Ã¥·¥å¤ò µ¯¤³¤¹²ÄǽÀ¤¬¤¢¤ê¤Þ¤¹¡£ ¤â¤·¡¢¥¨¥é¡¼¥á¥Ã¥»¡¼¥¸¤¬¤Ê¤Ë¤«Â¾¤Î¤â¤Î¤Ç¤¢¤ì¤Ð¡¢¥«¡¼¥Í¥ë¤Î¹½À®¤Ç¤Þ¤Ã¤¿ ¤¯¥»¥Þ¥Õ¥©¤Î¥µ¥Ý¡¼¥È¤ò¤·¤Æ¤¤¤Ê¤¤¤«¤â¤·¤ì¤Þ¤»¤ó¡£ PostgreSQL Administrator's Guide ¤Ë¶¦Í­ ¥á¥â¥ê¡¼¤È¥»¥Þ¥Õ¥©¤Ë¤Ä¤¤¤Æ¤Î¾ðÊó¤Î¾ÜºÙ¤¬¤¢¤ê¤Þ¤¹¡£ 3.5) ¾¤Î¥Û¥¹¥È¤«¤é¤ÎÀܳ¤Ï¤É¤Î¤è¤¦¤ËÀ©¸æ¤·¤Þ¤¹¤«¡© ´ûÄêÃͤǤϡ¢PostgreSQL ¤Ï Unix ¥É¥á¥¤¥ó¥½¥±¥Ã¥È¡¢¤Þ¤¿¤Ï¡¢TCP/IPÀܳ¤Î¥í¡¼¥«¥ë¥Þ¥·¥ó¤«¤é¤ÎÀܳ¤·¤«µö¤· ¤Þ¤»¤ó¡£postgresql.conf ¤ÎÃæ¤Î listen_addresses ¤ò½¤Àµ¤·¡¢¤«¤Ä¡¢$PGDATA/pg_hba.conf ¥Õ¥¡¥¤¥ë¤òŬÀڤ˾¤·¤Æ¡¢¥Û¥¹¥È¼çƳ·¿Ç§¾Ú¤òÍ­ ¸ú¤Ë¤·¤Ê¤¤¤«¤®¤ê¤Ï¡¢Â¾¤Î¥Þ¥·¥ó¤«¤é¤ÏÀܳ¤Ç¤¤Ê¤¤¤Ç¤·¤ç¤¦¡£ 3.6) ¤è¤êÎɤ¤À­ ǽ¤òÆÀ¤ë¤¿¤á¤Ë¤Ï¡¢¥Ç¡¼¥¿¥Ù¡¼¥¹¡¦¥¨¥ó¥¸¥ó¤ò¤É¤Î¤è¤¦¤ËÄ´À°¤¹¤ì¤ÐÎɤ¤¤Ç¤¹¤«¡© ³Î¤«¤Ë¥¤¥ó¥Ç¥Ã¥¯¥¹¤ÏÌ䤤¹ç¤ï¤»¤Î®ÅÙ¤òÁý¤·¤Þ¤¹¡£EXPLAIN ANALYZE¥³¥Þ¥ó¥É¤Ç PostgreSQL ¤¬¤É¤Î¤è¤¦¤Ë¤¢¤Ê¤¿¤ÎÌ䤤¹ç¤ï¤»¤òËÝÌõ¤·¤Æ¤¤¤ë¤«¤ò¸«¤ë¤³¤È¤¬¤Ç¤­ ¡¢¤½¤·¤Æ¡¢¤É¤Î¥¤¥ó¥Ç¥Ã¥¯¥¹¤¬»È¤ï¤ì¤Æ¤¤¤ë¤«¤ò¸«¤ë¤³¤È¤¬¤Ç¤¤Þ¤¹¡£ ¤â¤· INSERT ¤ò¿ÍѤ·¤Æ¤¤¤ë¾ì¹ç¤Ï¡¢COPY ¥³¥Þ¥ó¥É¤ò»È¤Ã¤ÆÂ礭 ¤Ê¥Ð¥Ã¥Á½èÍý¤Ç¤½¤ì¤ò¹Ô¤Ê¤¦¤³¤È¤ò¸¡Æ¤¤·¤Æ²¼¤µ¤¤¡£¤³¤ì¤Ï¡¢INSERT ¤òÊÌ¡¹¤Ë¹Ô¤Ê¤¦¤è¤ê¤â¤Ã¤È¹â®¤Ç¤¹¡£¼¡¤Ë¡¢BEGIN WORK/COMMIT ¤Î¥È¥é¥ó¥¶¥¯¥·¥ç¥ó¡¦¥Ö¥í¥Ã¥¯¤ÎÃæ¤Ë̵¤¤Ê¸¤Ï¡¢¤½¤ì¤é¼«¿È¤¬¤½¤ì¤¾¤ì¤Î¥È¥é ¥ó¥¶¥¯¥·¥ç¥ó¤ËÆþ¤Ã¤Æ¤¤¤ë¤È¸«¤Ê¤µ¤ì¤Þ¤¹¡£¤¤¤¯¤Ä¤«¤Îʸ¤ò°ì¤Ä¤Î¥È¥é¥ó¥¶¥¯ ¥·¥ç¥ó¡¦¥Ö¥í¥Ã¥¯¤ÎÃæ¤Ç¹Ô¤Ê¤¦¤³¤È¤ò¹Í¤¨¤Æ²¼¤µ¤¤¡£¤³¤ì¤Ë¤è¤ê¥È¥é¥ó¥¶¥¯¥· ¥ç¥ó¤Î¥ª¡¼¥Ð¡¼¥Ø¥Ã¥É¤¬¸º¤ê¤Þ¤¹¡£¤Þ¤¿¡¢Â礭 ¤Ê¥Ç¡¼¥¿¤ÎÊѹ¹¤ò¹Ô¤Ê¤¦ºÝ¤Ï¥¤¥ó¥Ç¥Ã¥¯¥¹¤ò°ìÅÙ³°¤·¤Æ¡¢ºî¤êľ¤¹¤³¤È¤ò¹Í¤¨ ¤Æ¤ß¤Æ²¼¤µ¤¤¡£ Administration Guide/Server Run-time Environment/Run-time Configuration¤Ë¤Ï¡¢ ¥Á¥å¡¼¥Ë¥ó¥°¤Î¥ª¥×¥·¥ç¥ó¤¬¤¤¤¯¤Ä¤«¤¢¤ê¤Þ¤¹¡£fsync¥ª¥×¥·¥ç¥ó¤Çfsync() ¤ò̵¸ú¤Ë¤¹¤ë¤³¤È¤¬¤Ç¤¤Þ¤¹¡£¤³¤ì¤Ë¤è¤Ã¤Æ¡¢³Æ¥È¥é¥ó¥¶¥¯¥·¥ç¥óËè¤Ë fsync() ¤Ç¥Ç¥£¥¹¥¯¤ò¹¹¿·¤¹¤ë¤Î¤ò»ß¤á¤µ¤»¤Þ¤¹¡£ shared_buffers¥ª¥×¥·¥ç¥ó¤ò»È¤Ã¤Æ¥Ð¥Ã¥¯¥¨¥ó¥É¡¦¥×¥í¥»¥¹¤Ë¤è¤ê»È¤ï¤ì¤ë¶¦ Í¥á¥â¥ê¡¼¡¦¥Ð¥Ã¥Õ¥¡¤òÂ礤¯¤¹¤ë¤³¤È¤â¤Ç¤­ ¤Þ¤¹¡£¤â¤·¡¢¤³¤Î¥Ñ¥é¥á¡¼¥¿¤ò¹â¤¯¤·¤¹¤®¤ë¤È¡¢¥«¡¼¥Í¥ë¤Î¶¦Í­ ¥á¥â¥ê¡¼¶õ´Ö¤ÎÀ©¸ÂÃͤò±Û¤¨¤Æ¤·¤Þ¤¦¤¿¤á¤Ë postmaster ¤¬Áö¤é¤Ê¤¯¤Ê¤ë¤Ç¤·¤ç¤¦¡£´ûÄêÃͤǤϡ¢¤½¤ì¤¾¤ì¤Î¥Ð¥Ã¥Õ¥¡¤ÎÂ礤µ¤Ï 8K ¤Ç¡¢¥Ð¥Ã¥Õ¥¡¿ô¤Ï 1000 ¤Ç¤¹¡£ sort_mem (PostgreSQL 8.0¤«¤é¤Ï: work_mem)¥ª¥×¥·¥ç¥ó¤ò»È¤Ã¤Æ¡¢¤½¤ì¤¾¤ì¤Î¥Ð¥Ã¥¯¥¨¥ó¥É¡¦¥×¥í¥»¥¹¤¬°ì»þŪ¤ ÊʤÙÂؤ¨¤Ë¤è¤Ã¤Æ»È¤¦¥á¥â¥ê¡¼¤ÎºÇÂ祵¥¤¥º¤òÁý¤ä¤¹¤³¤È¤â¤Ç¤¤Þ¤¹¡£ ´ûÄêÃÍ¤Ï 1024 (¤¹¤Ê¤ï¤Á¡¢1MB)¤Ç¤¹¡£ ¤Þ¤¿¡¢CLUSTER ¥³¥Þ¥ó¥É¤ò»È¤Ã¤Æ¡¢¥Æ¡¼¥Ö¥ë¤Î¥Ç¡¼¥¿¤ò¥¤¥ó¥Ç¥Ã¥¯¥¹¤Ë¹ç¤ï¤»¤ë¤¿¤á¤Ë¥°¥ë¡¼ ¥×²½¤¹¤ë¤³¤È¤â¤Ç¤¤Þ¤¹¡£¾Ü¤·¤¯¤Ï¡¢¥ª¥ó¥é¥¤¥ó¥Þ¥Ë¥å¥¢¥ë¤Ç CLUSTER ¤ò¸«¤Æ²¼¤µ¤¤¡£ 3.7) ¤É¤Î¤è¤¦¤Ê¥Ç¥Ð¥°µ¡Ç½¤¬»È¤¨¤Þ¤¹¤«¡© PostgreSQL ¤Ï¡¢¥Ç¥Ð¥°¤Î¤¿¤á¤Ë°ÕÌ£¤Î¤¢¤ë¡¢¾õÂÖ¾ðÊó¤òÊó¹ð¤¹¤ë¤¤¤¯¤Ä¤«¤Îµ¡Ç½¤ò»ý¤Á¤Þ ¤¹¡£ ¤Þ¤º¡¢--enable-cassert ¥ª¥×¥·¥ç¥ó¤Ç configure ¤òÁö¤é¤»¤Þ¤¹¡£¤½¤¦¤·¤Æ¥³¥ó¥Ñ¥¤¥ë¤¹¤ë¤³¤È¤Ë¤è¤ê¡¢Âô»³¤Î assert() ¤¬¡¢¥Ð¥Ã¥¯¥¨¥ó¥É¤Î¿ÊĽ¾õ¶·¤ò´Æ»ë¤·¡¢²¿¤«Í½´ü¤»¤Ì¤³¤È¤¬µ¯¤­ ¤ë¤È¥×¥í¥°¥é¥à¤òÄä»ß¤¹¤ë¤è¤¦¤Ë¤Ê¤ê¤Þ¤¹¡£ postmaster ¤È postgres ¤ÎξÊý¤Ç¤¤¤¯¤Ä¤«¤Î¥Ç¥Ð¥°¡¦¥ª¥×¥·¥ç¥ó¤ÎÍøÍѤ¬¤Ç¤¤Þ¤¹¡£¤Þ¤º¡¢¼¡¤Î¤è¤¦¤Ë postmaster ¤òµ¯Æ°¤¹¤ë¤È¤­ ¤Ï¤¤¤Ä¤Ç¤â¡¢É¸½à½ÐÎϤȥ¨¥é¡¼½ÐÎϤò¥í¥°¡¦¥Õ¥¡¥¤¥ë¤ËÁ÷¤ë¤è¤¦¤Ë¤·¤Æ¤¢¤ë¤³ ¤È¤ò³Î¤«¤á¤Æ²¼¤µ¤¤¡£ cd /usr/local/pgsql ./bin/postmaster >server.log 2>&1 & ¤³¤ì¤Ë¤è¤ê PostgreSQL ¤ÎºÇ¾åÉô¤Î¥Ç¥£¥ì¥¯¥È¥ê¤Ë server.log ¥Õ¥¡¥¤¥ë¤¬ÃÖ¤«¤ì¤Þ¤¹¡£¤³¤Î¥Õ¥¡¥¤¥ë¤Ï¥µ¡¼¥Ð¡¼¤¬Áø¶ø¤·¤¿ÌäÂê¤ä¥¨¥é¡¼¤Ë¤Ä ¤¤¤ÆÍÍѤʾðÊó¤ò´Þ¤ß¤Þ¤¹¡£Postmaster ¤Ï¹¹¤Ë¾ÜºÙ¤Ê¾ðÊó¤òÊó¹ð¤¹¤ë¤¿¤á¤Î -d ¥ª¥×¥·¥ç¥ó¤ò»ý¤Á¤Þ¤¹¡£¤½¤Î -d ¥ª¥×¥·¥ç¥ó¤Ï¡¢¥Ç¥Ð¥°¡¦¥ì¥Ù¥ë¤ò»ØÄꤷ¤Þ¤¹¡£¹â¤¤¥Ç¥Ð¥°¡¦¥ì¥Ù¥ë¤Ç¤Ï¡¢Â礭 ¤Ê¥í¥°¥Õ¥¡¥¤¥ë¤òÀ¸À®¤¹¤ë¤³¤È¤ËÃí°Õ¤·¤Ê¤¯¤Æ¤Ï¤Ê¤ê¤Þ¤»¤ó¡£ ¤â¤·¡¢postmaster¤¬Áö¤Ã¤Æ¤¤¤Ê¤±¤ì¤Ð¡¢postgres¥Ð¥Ã¥¯¥¨¥ó¥É¤ò¥³¥Þ¥ó¥É¥é¥¤ ¥ó¤«¤éÁö¤é¤»¤ë¤³¤È¤¬¤Ç¤¡¢Ä¾ÀÜSQLʸ¤ò¥¿¥¤¥×¤¹¤ë¤³¤È¤¬¤Ç¤­ ¤Þ¤¹¡£¤³¤Î¤ä¤ê¤«¤¿¤Ï¡¢¥Ç¥Ð¥°ÌÜŪ¤Î¤È¤­ ¤À¤±¤ª¾©¤á¤·¤Þ¤¹¡£¥»¥ß¥³¥í¥ó¤Ç¤Ï¤Ê¤¯¡¢²þ¹Ô¤¬Ì䤤¹ç¤ï¤»¤Î½ª¤ê¤Ë¤Ê¤ë¤³¤È ¤ËÃí°Õ¤·¤Æ¤¯¤À¤µ¤¤¡£¤â¤·¡¢¥Ç¥Ð¥°¥·¥ó¥Ü¥ë¤òÆþ¤ì¤Æ¥³¥ó¥Ñ¥¤¥ë¤·¤Æ¤¤¤ì¤Ð¡¢ ¥Ç¥Ð¥Ã¥¬¤ò»È¤Ã¤Æ²¿¤¬µ¯¤¤Æ¤¤¤ë¤«¤ò¸«¤ë¤³¤È¤¬¤Ç¤¤Þ¤¹¡£postmaster ¤«¤é¥Ð¥Ã¥¯¥¨¥ó¥É¤ò³«»Ï¤·¤¿¤ï¤±¤Ç¤Ï¤Ê¤¤¤Î¤Ç¡¢ÆÈΩ¤Ê´Ä¶­ ¤ÇÁö¤Ã¤Æ¤¤¤ë¤Î¤Ç¤Ï¤Ê¤¯¥í¥Ã¥¯¡¿¥Ð¥Ã¥¯¥¨¥ó¥É¤È¤ÎÂÐÏäÎÌäÂ꤬½ÅÊ£¤¹¤ë¤³¤È ¤Ï¤¢¤ê¤Þ¤»¤ó¡£ ¤â¤·¡¢postmaster¤¬Áö¤Ã¤Æ¤¤¤ì¤Ð¡¢¤¢¤ë¥¦¥£¥ó¥É¥¦¤Çpsql¤ò³«»Ï¤¹¤ë¤È¡¢SELE CT pg_backend_pid()¤ò»È¤Ã¤Æ¡¢psql ¤Ç»È¤ï¤ì¤ë postgres ¥×¥í¥»¥¹¤ÎPID¤¬¸«¤Ä¤«¤ê¤Þ¤¹¡£ ¥Ç¥Ð¥Ã¥¬¤ò»È¤Ã¤Æpostgres¤ÎPID¤Ë¥¢¥¿¥Ã¥Á(attach)¤·¤Þ¤¹¡£¥Ç¥Ð¥Ã¥¬¤ÎÃ椫¤ é¥Ö¥ì¡¼¥¯¡¦¥Ý¥¤¥ó¥È¤ò¥»¥Ã¥È¤·¡¢psql ¤«¤éÌ䤤¹ç¤ï¤»¤òȯ¹Ô¤·¤Þ¤¹¡£¥Ç¥Ð¥°¤Î¤¿¤á¤Ëpostgres¤ò»ÏÆ°¤¹¤ë¾ì¹ç¤Ï¡¢PG OPTIONS="-W n" ¤òÀßÄê¤Ç¤¡¢¤½¤ì¤«¤é¡¢psql ¤ò³«»Ï¤·¤Þ¤¹¡£¤³¤ì¤Ë¤è¤ê¡¢n Éó«»Ï¤òÃ٤餻¤ë¤Ï¤º¤Ê¤Î¤Ç¡¢¥Ç¥Ð¥Ã¥¬¤Ç¥×¥í¥»¥¹¤Ë¥¢¥¿¥Ã¥Á¤·¤Æ¡¢¥Ö¥ì¡¼¥¯ ¥Ý¥¤¥ó¥È¤òÀßÄꤷ¡¢³«»Ï¤«¤é½ç¤òÄɤäƸ«¤Æ¤æ¤¯¤³¤È¤¬¤Ç¤¤Þ¤¹¡£ ¤¤¤¯¤Ä¤«¤Îlog_*¥µ¡¼¥Ð¹½À®ÊÑ¿ô¤Ï¡¢¥Ç¥Ð¥Ã¥°¤ÈÀ­ ǽ¬Äê¤Ë¤È¤Æ¤âÌò¤ËΩ¤Ä¥×¥í¥»¥¹¤ÎÅý·×¤Î°õºþ¤ò²Äǽ¤Ë¤·¤Þ¤¹¡£ ²¿¤È¤¤¤¦´Ø¿ô¤¬¤É¤Î¤¯¤é¤¤¼Â¹Ô»þ´Ö¤ò¿©¤Ã¤Æ¤¤¤ë¤«¤ò¸«¤ë¤¿¤á¤Ë¡¢¥×¥í¥Õ¥¡¥¤ ¥ê¥ó¥°¡Ê¥×¥í¥Õ¥£¡¼¥ëÉÕ¤­ ¡Ë¤Ç¥³¥ó¥Ñ¥¤¥ë¤¹¤ë¤³¤È¤â²Äǽ¤Ç¤¹¡£¤½¤Î¥Ð¥Ã¥¯¥¨¥ó¥É¤Î¥×¥í¥Õ¥£¡¼¥ë¡¦¥Õ¥¡ ¥¤¥ë¤Ï pgsql/data/base/dbname ¥Ç¥£¥ì¥¯¥È¥ê¤Ë³ÊǼ¤µ¤ì¤ë¤Ç¤·¤ç¤¦¡£¥¯¥é¥¤¥¢¥ó¥È¤Î¥×¥í¥Õ¥£¡¼¥ë¤Ï¥¯¥é¥¤¥¢ ¥ó¥È¤Î¸½¹Ô¥Ç¥£¥ì¥¯¥È¥ê¤ËÃÖ¤«¤ì¤ë¤Ç¤·¤ç¤¦¡£Linux ¤Ç¤Þ¤È¤â¤Ê¥×¥í¥Õ¥¡¥¤¥ê¥ó¥°¤ò¹Ô¤¦¤Ë¤Ï -DLINUX_PROFILE ¤Ç¥³¥ó¥Ñ¥¤¥ë¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£ 3.8) Àܳ¤·¤è¤¦¤È¤¹¤ë¤È¤¤Ë 'Sorry, too many clients' ¤¬½Ð¤ë¤Î¤Ï¤Ê¤¼¤Ç¤¹¤«¡© postmaster¤¬Æ±»þ»ÏÆ°¤Ç¤­ ¤ë¥Ð¥Ã¥¯¥¨¥ó¥É¥×¥í¥»¥¹¤ËÂФ¹¤ëÀ©¸Â¿ô¤òÁý¤ä¤¹É¬Íפ¬¤¢¤ê¤Þ¤¹¡£ ´ûÄê¤ÎºÇÂç¥×¥í¥»¥¹¤Ï32¥×¥í¥»¥¹¤Ç¤¹¡£-N¤ËŬÀÚ¤ÊÃͤò°ú¿ô¤Ë¤·¤Æpostmaster ¤òºÆµ¯Æ°¤¹¤ë¤«¡¢PostgreSQL.conf ¤ò½¤Àµ¤¹¤ë¤³¤È¤Ë¤è¤Ã¤Æ¡¢¤½¤ÎÃͤòÁý¤ä¤¹¤³¤È¤¬¤Ç¤¤Þ¤¹¡£ ¤â¤·¡¢-N ¤ò 32¤è¤ê¤âÂ礤¯¤¹¤ë¤Î¤Ç¤¢¤ì¤Ð¡¢-B¤â´ûÄê¤Î64¤è¤êÂ礭 ¤¤ÃͤËÁý²Ã¤µ¤»¤Ê¤¯¤Æ¤Ï¤Ê¤é¤Ê¤¤¤·¡¢-B ¤Ï¾¯¤Ê¤¯¤È¤â -N ¤Î2ÇܤϤʤ¯¤Æ¤Ï¤Ê¤é¤º¡¢¤ª¤½¤é¤¯ºÇ¹âÀǽ¤ò˾¤à¤Ê¤é¤Ð¤½¤ì¤è¤êÂ礭 ¤¤Ãͤ¬É¬ÍפʤϤº¤Ç¤¹¡£¥Ð¥Ã¥¯¥¨¥ó¥É¥×¥í¥»¥¹¤ò¤¿¤¯¤µ¤ó¤Ë¤¹¤ë¤È¡¢¤¤¤í¤¤¤í ¤ÊUnix¥«¡¼¥Í¥ë¹½À®¥Ñ¥é¥á¡¼¥¿¤âÁý¤ä¤¹¤³¤È¤¬É¬Íפˤʤ뤫¤â¤·¤ì¤Þ¤»¤ó¡£ ¶¦Í¥á¥â¥ê¡¼¡¦¥Ö¥í¥Ã¥¯¤ÎºÇÂçÃÍ(SHMMAX)¡¢ ¥»¥Þ¥Õ¥©¤ÎºÇÂç¿ô(SEMMNS¤ÈSEMMNI)¡¢ ¥×¥í¥»¥¹¤ÎºÇÂç¿ô(NPROC)¡¢ ¥æ¡¼¥¶Ëè¤ÎºÇÂç¥×¥í¥»¥¹¿ô(MAXUPRC)¡¢ ³«¤¯¥Õ¥¡¥¤¥ë¤ÎºÇÂç¿ô(NFILE¤ÈNINODE) ¤â³Îǧ»ö¹à¤Ë´Þ¤Þ¤ì¤Þ¤¹¡£ PostgreSQL¤Ëµö¤µ¤ì¤ë¥Ð¥Ã¥¯¥¨¥ó¥É¤Î¥×¥í¥»¥¹¿ô¤¬À©¸Â¤µ¤ì¤Æ¤¤¤ë¤Î¤Ï¡¢ ¥·¥¹¥Æ¥à¤Î¥ê¥½¡¼¥¹¤ò»È¤¤²Ì¤·¤Æ¤·¤Þ¤¦¤³¤È¤òÈò¤±¤ë¤¿¤á¤Ç¤¹¡£ 3.9) pgsql_tmp ¥Ç¥£¥ì¥¯¥È¥ê¤ÎÃæ¤Ë¤Ï²¿¤¬¤¢¤ê¤Þ¤¹¤«¡© Ì䤤¹ç¤ï¤»¼Â¹Ô¥â¥¸¥å¡¼¥ë¤Ë¤è¤Ã¤ÆÀ¸À®¤µ¤ì¤¿°ì»þŪ¤Ê¥Õ¥¡¥¤¥ë¤¬¡¢¤³¤Î¥Ç¥£ ¥ì¥¯¥È¥ê¤Ë´Þ¤Þ¤ì¤Þ¤¹¡£Î㤨¤Ð¡¢¤â¤· ORDER BY ¶ç¤òËþ¤¿¤¹¤¿¤á¤Ë¥Ð¥Ã¥¯¥¨¥ó¥É¤Î -S ¥Ñ¥é¥á¡¼¥¿¤Çµö²Ä¤·¤¿Ãͤè¤ê¤âÂ礭 ¤Ê¥¹¥Ú¡¼¥¹¤¬¥½¡¼¥È¤ÎºÝ¤ËɬÍפÀ¤È¤¹¤ë¤È¡¢°î¤ì¤¿¥Ç¡¼¥¿¤òÊÝ»ý¤¹¤ë¤¿¤á¤Ë°ì »þŪ¤Ê¥Õ¥¡¥¤¥ë¤¬¤¤¤¯¤Ä¤«¤³¤³¤ËÀ¸À®¤µ¤ì¤Þ¤¹¡£ °ì»þŪ¤Ê¥Õ¥¡¥¤¥ë¤Ï¼«Æ°Åª¤Ë¾Ã¤·µî¤é¤ì¤ë¤Ï¤º¤Ç¤¹¤¬¡¢¤â¤·¡¢¥½¡¼¥È¤ÎÅÓÃæ¤Ç ¥Ð¥Ã¥¯¥¨¥ó¥É¤¬¥¯¥é¥Ã¥·¥å¤·¤Æ¤·¤Þ¤¦¤È¤½¤¦¤Ï¤Ê¤ê¤Þ¤»¤ó¡£postmaster¤ÎÄä»ß ¤È¥ê¥¹¥¿¡¼¥È¤Ç¤³¤ì¤é¤Î¥Õ¥¡¥¤¥ë¤Ï¥Ç¥£¥ì¥¯¥È¥ê¤«¤é¾Ã¤·¤µ¤é¤ì¤Þ¤¹¡£ [ÌõÃí¡§ SYSLOGD ·Ðͳ¤Ç¥í¥°¤ò½ÐÎϤ¹¤ë¤Ë¤Ï¡¢¤Þ¤º¡¢configure ¤ò --enable-syslog ÉÕ¤¤ÇÁö¤é¤»¤¿¸å¡¢¥³¥ó¥Ñ¥¤¥ë¤È¥¤¥ó¥¹¥È¡¼¥ë¤ò¹Ô¤Ê¤¤¤Þ¤¹¡£ ¼¡¤Ë¡¢syslog.conf ¤Ë local?.* ¤Î ½ÐÎÏÀè¤ò»ØÄꤷ(´Ä¶ÊÑ¿ô¤ÇÊѹ¹²Äǽ)¡¢ syslogd ¤Ë HUP ¥·¥°¥Ê¥ë¤òÁ÷¤Ã¤Æ½é´ü²½¤·¤Æ¤ª¤¤Þ¤¹¡£¤½¤·¤Æ¡¢ $PGDATA/pg_options ¤Ë syslog=2 ¤ò²Ã¤¨¤Æ¡¢ postmaster ¤ò -S ¥ª¥×¥·¥ç¥óÉÕ¤¤Ë¤Æ¥µ¡¼¥Ð¥â¡¼¥É¤Çµ¯Æ°¤·¤Þ¤¹¡£(¥Ð¡¼¥¸¥ç¥ó 7.1 ¤«¤é¤Ï pg_options ¤Ï PostgreSQL.conf ¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£) ] 3.10) PostgreSQL¤Î¥á¥¸¥ã¡¼¥ê¥ê¡¼¥¹¤ò¥¢¥Ã¥×¥Ç¡¼¥È¤¹¤ë¤Î¤Ë¥À¥ó¥×¤È¥ê¥¹¥È¥¢¤ò¤·¤Ê¤¯¤ ƤϤʤé¤Ê¤¤¤Î¤Ï¤Ê¤¼¤Ç¤¹¤«¡© PostgreSQL¥Á¡¼¥à¤Ï¥Þ¥¤¥Ê¡¼¥ê¥ê¡¼¥¹¤Ç¤Ï¾®¤µ¤ÊÊѹ¹¤·¤«¹Ô¤Ê¤¤¤Þ¤»¤ó¤Î¤Ç¡¢ 7.2 ¤«¤é 7.2.1 ¤Ø¤Î¥¢¥Ã¥×¥°¥ì¡¼¥É¤Ë¤Ï¥À¥ó¥×¤È¥ê¥¹¥È¥¢¤ÎɬÍפϤ¢¤ê¤Þ¤»¤ó¡£¤·¤«¤·¡¢¥á¥¸ ¥ã¡¼¥ê¥ê¡¼¥¹(¤¿¤È¤¨¤Ð¡¢7.2¤«¤é7.3¤Ø¤Î¤è¤¦¤Ê)¤Ç¤Ï¡¢¥·¥¹¥Æ¥à¥Æ¡¼¥Ö¥ë¤ä¥Ç ¡¼¥¿¥Õ¥¡¥¤¥ë¤ÎÆâÉô¥Õ¥©¡¼¥Þ¥Ã¥È¤ÎÊѹ¹¤ò¤·¤Ð¤·¤Ð¹Ô¤Ê¤¤¤Þ¤¹¡£¤³¤ì¤é¤ÎÊѹ¹ ¤Ï¤¿¤¤¤Æ¤¤Ê£»¨¤Ç¡¢¤½¤Î¤¿¤á²æ¡¹¤Ï¥Ç¡¼¥¿¥Õ¥¡¥¤¥ë¤Î¤¿¤á¤Î¸åÊý¸ß´¹À­ ¤ò°Ý»ý¤¹¤ë¤³¤È¤¬¤Ç¤­ ¤Þ¤»¤ó¡£¥À¥ó¥×¤ÏÈÆÍÑ¥Õ¥©¡¼¥Þ¥Ã¥È¤Ç¥Ç¡¼¥¿¤ò½ÐÎϤ·¡¢¤½¤ì¤ò¿·¤·¤¤ÆâÉô¥Õ¥© ¡¼¥Þ¥Ã¥È¤ËÆɤ߹þ¤à¤³¤È¤¬¤Ç¤¤Þ¤¹¡£ ¥Ç¥£¥¹¥¯¾å¤Ç¤Î¥Õ¥©¡¼¥Þ¥Ã¥È¤ËÊѹ¹¤Î¤Ê¤¤Æ±°ì¥ê¥ê¡¼¥¹¤Ç¤Ï¡¢¥¢¥Ã¥×¥°¥ì¡¼¥É ¤Ï¡¢¥À¥ó¥×¡¿¥ê¥¹¥È¥¢¤Ç¤Ï¤Ê¤¯¡¢pg_upgrade ¥¹¥¯¥ê¥×¥È¤ò»È¤¦¤³¤È¤¬¤Ç¤­ ¤Þ¤¹¡£¥ê¥ê¡¼¥¹¥Î¡¼¥È¤Ë¤Ï¡¢pg_upgrade ¤¬ÍøÍѲÄǽ¤Ê¥ê¥ê¡¼¥¹¤«¤É¤¦¤«µ­ ¤µ¤ì¤Æ¤¤¤Þ¤¹¡£ 3.11) ¥Ï¡¼¥É¥¦¥§¥¢¤Ë¤Ï¤É¤ó¤Ê¥³¥ó¥Ô¥å¡¼¥¿¤ò»È¤¨¤Ð¤è¤¤¤Ç¤¹¤«¡© PC¥Ï¡¼¥É¥¦¥§¥¢¤Ï¤Û¤È¤ó¤É¸ß´¹À­ ¤¬¤¢¤ê¤Þ¤¹¤Î¤Ç¡¢¤Û¤È¤ó¤É¤Î¿Í¤Ï¡¢¤¹¤Ù¤Æ¤ÎPC¥Ï¡¼¥É¥¦¥§¥¢¤¬Æ±¤¸ÉʼÁ¤À¤È»× ¤¤¹þ¤à·¹¸þ¤¬¤¢¤ê¤Þ¤¹¡£¤·¤«¤·¡¢¤½¤ì¤Ï´Ö°ã¤¤¤Ç¤¹¡£ECC RAM¡¢SCSI¡¢¤ª¤è¤Ó¡¢¹âÉʼÁ¥Þ¥¶¡¼¥Ü¡¼¥É¤Ï¡¢°Â¤¤¥Ï¡¼¥É¥¦¥§¥¢¤ËÈæ¤Ù¤ë¤È¡¢¤ è¤ê¿®ÍêÀ¤¬¹â¤¯¡¢¤è¤êÀǽ¤âÎɤ¤¤Î¤Ç¤¹¡£PostgreSQL ¤Ï¤Û¤È¤ó¤É¤Î¥Ï¡¼¥É¥¦¥§¥¢¤Ç²ÔƯ¤·¤Þ¤¹¤¬¡¢¿®ÍêÀ¤äÀ­ ǽ¤¬½ÅÍפʾì¹ç¤Ï¡¢¥Ï¡¼¥É¥¦¥§¥¢¤Î¥ª¥×¥·¥ç¥ó¤ò¸¦µæ¤¹¤ë¤³¤È¤¬¸­ ÌÀ¤Ç¤¹¡£¥á¡¼¥ê¥ó¥°¥ê¥¹¥È¤Ç¤â¥Ï¡¼¥É¥¦¥§¥¢¥ª¥×¥·¥ç¥ó¤È¥È¥ì¡¼¥É¥ª¥Õ¤Ë¤Ä¤¤ ¤ÆµÄÏÀ¤¹¤ë¤³¤È¤¬¤Ç¤¤Þ¤¹¡£ _________________________________________________________________ Áàºî¾å¤Î¼ÁÌä 4.1) ¥Ð¥¤¥Ê¥ê¡¦¥«¡¼¥½¥ë¤ÈÄ̾參¡¼¥½¥ë¤È¤Î¸·Ì©¤Ê°ã¤¤¤Ï²¿¤Ç¤¹¤«¡© ¾Ü½Ò¤Ï¡¢¥ª¥ó¥é¥¤¥ó¥Þ¥Ë¥å¥¢¥ë¤Ç DECLARE ¤ò¸«¤Æ²¼¤µ¤¤¡£ 4.2) ºÇ½é¤Î¿ô¥í¥¦¤Î¤ß¤ò SELECT¤¹¤ë¤Ë¤Ï¤É¤¦¤·¤Þ¤¹¤«¡©¥é¥ó¥À¥à¤Ê¥í¥¦¡© ¥ª¥ó¥é¥¤¥ó¥Þ¥Ë¥å¥¢¥ë¤ÇFETCH¤ò¸«¤Æ¤¯¤À¤µ¤¤¡£¤¢¤ë¤¤¤Ï¡¢SELECT ... LIMIT....¤ò»È¤Ã¤Æ¤ß¤Æ²¼¤µ¤¤¡£ ¤¿¤È¤¨¡¢Íߤ·¤¤¤Î¤ÏºÇ½é¤Î¿ô¥í¥¦¤À¤±¤Ç¤â¡¢¤¹¤Ù¤Æ¤ÎÌ䤤¹ç¤ï¤»¤òɾ²Á¤·¤Ê¤¯ ¤Æ¤Ï¤Ê¤é¤Ê¤¤¤«¤â¤·¤ì¤Þ¤»¤ó¡£ORDER BY ¤ò»ý¤Ã¤¿Ì䤤¹ç¤ï¤»¤ò»È¤¦¤³¤È¤ò¹Í¤¨¤Æ¤ß¤Æ²¼¤µ¤¤¡£ ¤â¤·¡¢ORDER BY¤Ë¹ç¤Ã¤¿¥¤¥ó¥Ç¥Ã¥¯¥¹¤¬¤¢¤ë¤È¤¹¤ë¤È PostgreSQL¤ÏÍ׵ᤵ¤ì¤¿ºÇ½é¤Î¿ô¥í¥¦¤À¤±¤Çɾ²Á¤Ç¤­ ¤ë¤«¤â¤·¤ì¤Þ¤»¤ó¤¬¡¢¤Ç¤Ê¤ì¤Ð¡¢PostgreSQL ¤Ï°Õ¿Þ¤·¤¿¥í¥¦¤¬À¸À®¤µ¤ì¤ë¤Þ¤Ç¤¹¤Ù¤Æ¤Î¥í¥¦¤òɾ²Á¤·¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¤«¤â ¤·¤ì¤Þ¤»¤ó¡£ ¥é¥ó¥À¥à¤Ê¥í¥¦¤òSELECT¤¹¤ë¤Ë¤Ï¡¢¼¡¤Îʸ¤ò»È¤¤¤Þ¤¹¡§ SELECT col FROM tab ORDER BY random() LIMIT 1; 4.3) ¥Æ¡¼¥Ö¥ë¤ä¤½¤Î¾¤Î¾ðÊó¤Î¥ê¥¹¥È¤ò psql ¤Ç¸«¤ë¤Ë¤Ï¤É¤¦¤·¤Þ¤¹¤«¡© psql¤ÎÃæ¤Ç¡¢ \dt ¥³¥Þ¥ó¥É¤ò»È¤Ã¤Æ¥Æ¡¼¥Ö¥ë¤ò¸«¤Þ¤¹¡£psql ¤ÎÃæ¤Î¥³¥Þ¥ó¥É¤Î´°Á´¤Ê¥ê¥¹¥È¤Ë¤Ï \? ¤ò»È¤¨¤Þ¤¹¡£¤¢¤ë¤¤¤Ï¡¢psql¤Î¥½¡¼¥¹¥³¡¼¥É¤Îpgsql/src/bin/psql/describe. c¥Õ¥¡¥¤¥ë¤ò¸«¤ë¤³¤È¤â¤Ç¤­ ¤Æ¡¢¤½¤ÎÃæ¤Ë¤Ïpsql¤Î¥Ð¥Ã¥¯¥¹¥é¥Ã¥·¥å¥³¥Þ¥ó¥É¤Î½ÐÎϤòÀ¸À®¤¹¤ëSQL¥³¥Þ¥ó¥ ɤ¬´Þ¤Þ¤ì¤Æ¤¤¤Þ¤¹¡£¤Þ¤¿¡¢psql¤ò -E ¥ª¥×¥·¥ç¥ó¤È°ì½ï¤Ë³«»Ï¤¹¤ë¤È¡¢¼Â¹Ô¤µ¤»¤¿¥³¥Þ¥ó¥É¤ò¼Â¹Ô¤¹¤ë¤¿¤á¤Ë»È¤¦Ìä ¤¤¹ç¤ï¤»¤ò½ÐÎϤ¹¤ë¤è¤¦¤Ë¤Ê¤ê¤Þ¤¹¡£PostgreSQL¤Ï¤Þ¤¿¡¢SQLiÂбþ¤Î INFORMATION SCHEMA ¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤òÍÑ°Õ¤·¤Æ¤¤¤Æ¡¢¥Ç¡¼¥¿¥Ù¡¼¥¹¤Ë¤Ä¤¤¤Æ¤Î¾ðÊó¤òÆÀ¤ë¤¿¤á¤Ë Ì䤤¹ç¤ï¤»¤ò»È¤¦¤³¤È¤¬¤Ç¤¤Þ¤¹¡£ 4.4) ¥Æ¡¼¥Ö¥ë¤«¤é¥«¥é¥à¤Îºï½ü¡¢¤¢¤ë¤¤¤Ï¡¢¥Ç¡¼¥¿·¿¤òÊѹ¹¤¹¤ë¤Ë¤Ï¤É¤¦¤·¤Þ¤¹¤«¡© DROP COLUMNµ¡Ç½¤¬¡¢ALTER TABLE DROP COLUMN ¤È¤·¤Æ¥ê¥ê¡¼¥¹7.3 ¤Ë²Ã¤¨¤é¤ì¤Þ¤·¤¿¡£¤½¤ì¤Þ¤Ç¤Î¥Ð¡¼¥¸¥ç¥ó¤Ç¤Ï¡¢¤½¤ÎÂå¤ï¤ê¤Ë¤³¤¦¤·¤Þ¤¹: BEGIN; LOCK TABLE old_table; SELECT ... -- ºï½ü¤·¤¿¤¤¥«¥é¥à°Ê³°¤Î¥«¥é¥à¤ò¤¹¤Ù¤ÆÁªÂò¤·¤Þ¤¹¡£ INTO TABLE new_table FROM old_table; DROP TABLE old_table; ALTER TABLE new_table RENAME TO old_table; COMMIT; ¥«¥é¥à¤Î¥Ç¡¼¥¿¥¿¥¤¥×¤Ï¼¡¤Îʸ¤ÇÊѤ¨¤é¤ì¤Þ¤¹¡§ 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¤ò¤·¤¿¤Û¤¦¤¬Îɤ¤¤«¤â¤·¤ì¤Þ¤»¤ó¡£ 4.5) ¥í¥¦¡¢¥Æ¡¼¥Ö¥ë¡¢¥Ç¡¼¥¿¥Ù¡¼¥¹¤ÎºÇÂ祵¥¤¥º¤Ï¡© À©¸Â¤Ï°Ê²¼¤Î¤È¤ª¤ê¤Ç¤¹¡£ ¥Ç¡¼¥¿¥Ù¡¼¥¹¤ÎºÇÂ祵¥¤¥º? À©¸Â̵¤· (32 TB ¤Î¥Ç¡¼¥¿¥Ù¡¼¥¹¤â¸ºß¤·¤Þ¤¹) ¥Æ¡¼¥Ö¥ë¤ÎºÇÂ祵¥¤¥º? 32TB ¥í¥¦¤ÎºÇÂ祵¥¤¥º? 1.6TB ¥Õ¥£¡¼¥ë¥É¤ÎºÇÂ祵¥¤¥º? 1GB ¥Æ¡¼¥Ö¥ëÆâ¤Ç¤ÎºÇÂç¥í¥¦¿ô? À©¸Â̵¤· ¥Æ¡¼¥Ö¥ëÆâ¤Ç¤ÎºÇÂ祫¥é¥à¿ô? ¥«¥é¥à¤Î·¿¤Ë¤è¤ê250-1600 ¥Æ¡¼¥Ö¥ëÆâ¤Ç¤ÎºÇÂ祤¥ó¥Ç¥Ã¥¯¥¹¿ô? À©¸Â̵¤· ¤â¤Á¤í¤ó¡¢¤³¤ì¤é¤Ï¼ÂºÝ¤Ï̵À©¸Â¤Ç¤Ï¤Ê¤¯¡¢¥Ç¥£¥¹¥¯ÍÆÎ̤ȥá¥â¥ê¡¼¤ä¥¹¥ï¥Ã ¥×¥¹¥Ú¡¼¥¹¤ÎÂ礤µ¤Ë¤è¤êÀ©¸Â¤µ¤ì¤Þ¤¹¡£Àǽ¤Ï¤³¤ì¤é¤ÎÃͤ¬¤³¤È¤Î¤Û¤«Â礭 ¤Ê»þ¤ËÀú¤ê¤ò¼õ¤±¤Þ¤¹¡£ ºÇÂç¥Æ¡¼¥Ö¥ë¥µ¥¤¥º¤Î32TB¤Ï¥ª¥Ú¥ì¡¼¥Æ¥£¥ó¥°¥·¥¹¥Æ¥à¤Ë¤è¤ëµðÂç¥Õ¥¡¥¤¥ë¤Î ¥µ¥Ý¡¼¥È¤ÏɬÍפȤ·¤Þ¤»¤ó¡£µðÂç¤Ê¥Æ¡¼¥Ö¥ë¤ÏÊ£¿ô¤Î1GB¤Î¥Õ¥¡¥¤¥ë¤Ëʬ¤±¤ÆÊ Ý¸¤µ¤ì¤Þ¤¹¤Î¤Ç¡¢¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤ÎÀ©¸Â¤Ï½ÅÍפǤϤ¢¤ê¤Þ¤»¤ó¡£ ¥Ç¥Õ¥©¥ë¥È¤Î¥Ö¥í¥Ã¥¯¥µ¥¤¥º¤ò32k¤Ë¤¹¤ë¤³¤È¤Ç¡¢ºÇÂç¥Æ¡¼¥Ö¥ë¥µ¥¤¥º¤ÈºÇÂç¥ «¥é¥à¿ô¤È¤ò£´Çܤˤ¹¤ë¤³¤È¤¬¤Ç¤¤Þ¤¹¡£ 4.6) °ìÈÌŪ¤Ê¥Æ¥­ ¥¹¥È¥Õ¥¡¥¤¥ë¤«¤é¥Ç¡¼¥¿¤òÊݸ¤¹¤ë¤Ë¤Ï¡¢¥Ç¡¼¥¿¥Ù¡¼¥¹¤Î¥Ç¥£¥¹¥¯ÍÆÎ̤ϤɤΤ¯¤é¤ ¤É¬ÍפǤ¹¡© ÉáÄ̤Υƥ¥¹¥È¥Õ¥¡¥¤¥ë¤ò PostgreSQL ¤Î¥Ç¡¼¥¿¥Ù¡¼¥¹¤ËÊݸ¤¹¤ë¤Ë¤Ï¡¢ºÇÂç¤ÇÌó5ÇܤΥǥ£¥¹¥¯ÍÆÎ̤òɬÍפȤ·¤Þ¤¹¡ £ ÎãÂê¤È¤·¤Æ¡¢³Æ¹Ô¤ËÀ°¿ô¤È¥Æ¥¥¹¥Èµ½Ò¤ò»ý¤Ä 100,000¹Ô¤Î¥Õ¥¡¥¤¥ë¤ò¹Í¤¨ ¤Æ¤ß¤Þ¤·¤ç¤¦¡£¥Æ¥­ ¥¹¥È¤Îʸ»úÎó¤ÎÊ¿¶ÑŤµ¤ò20¥Ð¥¤¥È¤È²¾Äꤹ¤ë¤È¡¢¥Õ¥é¥Ã¥È ¥Õ¥¡¥¤¥ë¤ÎÂ礭 ¤µ¤ÏÌó2.8MB ¤Ç¤¹¡£¤³¤Î¥Ç¡¼¥¿¤ò´Þ¤à PostgreSQL ¥Ç¡¼¥¿¥Ù¡¼¥¹ ¥Õ¥¡¥¤¥ë¤ÎÂ礤µ¤Ï¼¡¤Î¤è¤¦¤ËÌó6.4MB¤È¸«ÀѤâ¤ë¤³¤È¤¬¤Ç¤¤Þ¤¹¡§ 32 bytes: ³Æ¥í¥¦¤Î¥Ø¥Ã¥À(³µ»») 24 bytes: À°¿ô(int)¥Õ¥£¡¼¥ë¥É¤È¥Æ¥¥¹¥È(text)¥Õ¥£¡¼¥ë¥É + 4 bytes: ¥Ú¡¼¥¸¾å¤Î¥¿¥Ã¥×¥ë¤Ø¤Î¥Ý¥¤¥ó¥¿ ---------------------------------------- 60 bytes per row PostgreSQL ¤Î¥Ç¡¼¥¿¥Ú¡¼¥¸¥µ¥¤¥º¤Ï 8192¥Ð¥¤¥È(8KB)¤Ê¤Î¤Ç: 8192 bytes per page ------------------- = 136 rows per database page (ÀÚ¤ê¼Î¤Æ) 60 bytes per row 100000 data rows -------------------- = 782 database pages (ÀÚ¤ê¾å¤²) 128 rows per page 735 database pages * 8192 bytes per page = 6,021,120 bytes (6 MB) ¥¤¥ó¥Ç¥Ã¥¯¥¹¤Ï¡¢¤³¤ì¤Û¤É¤Î¥ª¡¼¥Ð¥Ø¥Ã¥É¤ÏÍ׵ᤷ¤Þ¤»¤ó¤¬¡¢¥¤¥ó¥Ç¥Ã¥¯¥¹ÉÕ ¤±¤µ¤ì¤ë¥Ç¡¼¥¿¤ò´Þ¤à°Ê¾å¡¢¤½¤ì¤Ê¤ê¤ËÂ礤¯¤Ê¤ê¤Þ¤¹¡£ NULL¤Ï¥Ó¥Ã¥È¥Þ¥Ã¥×¤È¤·¤ÆÊݸ¤µ¤ì¤Æ¤¤¤Æ¡¢¤½¤ì¤é¤¬¤ï¤º¤«¤Ë¥¹¥Ú¡¼¥¹¤ò»È¤¤ ¤Þ¤¹¡£ 4.7) ÄêµÁ¤µ¤ì¤¿¥Æ¡¼¥Ö¥ë¡¢¥¤¥ó¥Ç¥Ã¥¯¥¹¡¢¥Ç¡¼¥¿¥Ù¡¼¥¹¡¢¤ª¤è¤Ó¡¢¥æ¡¼¥¶¤ò¤É¤Î¤è¤¦¤Ë¤ ·¤Æ¸«¤Ä¤±½Ð¤·¤Þ¤¹¤«¡© psql ¤Ë¤Ï¤¤¤í¤¤¤í¤Ê¥Ð¥Ã¥¯¥¹¥é¥Ã¥·¥å¡¦¥³¥Þ¥ó¥É¤¬¤¢¤ê¡¢¤³¤¦¤·¤¿¾ðÊó¤òɽ¼¨¤·¤Þ ¤¹¡£¥Ð¥Ã¥¯¥¹¥é¥Ã¥·¥å¡¦¥³¥Þ¥ó¥É¤Î¼ïÎà¤ò¸«¤ë¤Ë¤Ï \? ¤ò»È¤Ã¤Æ²¼¤µ¤¤¡£¤Þ¤¿¡¢pg_ ¤Ç»Ï¤Þ¤ë¥·¥¹¥Æ¥à¥Æ¡¼¥Ö¥ë¤Ë¤âµ­ ½Ò¤µ¤ì¤Æ¤¤¤Þ¤¹¡£¤µ¤é¤Ë¡¢psql -l ¤Ï¤¹¤Ù¤Æ¤Î¥Ç¡¼¥¿¥Ù¡¼¥¹¤ò¥ê¥¹¥Èɽ¼¨¤·¤Þ¤¹¡£ ¤Þ¤¿¡¢pgsql/src/tutorial/syscat.source ¥Õ¥¡¥¤¥ë¤òÁö¤é¤»¤Æ¤ß¤Æ²¼¤µ¤¤¡£¤½¤ì¤Ï¡¢Âô»³¤Î SELECT ʸ¤Ë¤è¤êɬÍפʾðÊó¤ò¥Ç¡¼¥¿¥Ù¡¼¥¹¤Î¥·¥¹¥Æ¥à¡¦¥Æ¡¼¥Ö¥ë¤«¤é¼è¤ê½Ð¤·¤ÆÎ㼨 ¤·¤Æ¤¯¤ì¤Þ¤¹¡£ 4.8) Ì䤤¹ç¤ï¤»¤¬ÃÙ¤¤¤¦¤¨¡¢¥¤¥ó¥Ç¥Ã¥¯¥¹¤ò»È¤Ã¤Æ¤¤¤ëÍͻҤ¬¤¢¤ê¤Þ¤»¤ó¡£¤Ê¤¼¤Ç¤¹¤«¡ © ¥¤¥ó¥Ç¥Ã¥¯¥¹¤Ï¼«Æ°Åª¤Ë¤¹¤Ù¤Æ¤ÎÌ䤤¹ç¤ï¤»¤Ç»È¤ï¤ì¤ë¤ï¤±¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£ ¥Æ¡¼ ¥Ö¥ë¤¬ºÇ¾®¥µ¥¤¥º¤è¤êÂ礭 ¤¯¡¢Ì䤤¹ç¤ï¤»¤Ç¤½¤Î¤ï¤º¤«¤Ê¥Ñ¡¼¥»¥ó¥Æ¡¼¥¸¤Î¥í¥¦¤ò ÁªÂò¤¹¤ë»þ¤À¤±¡¢¥¤¥ó¥Ç¥Ã¥¯¥¹¤Ï»È¤ï¤ì¤Þ¤¹¡£¤³¤ì¤Ï¥¤¥ó¥Ç¥Ã¥¯¥¹¥¹¥­ ¥ã¥ó¤Ë¤è ¤êµ¯¤³¤µ¤ì¤ë¥é¥ó¥À¥à¤Ê¥Ç¥£¥¹¥¯¥¢¥¯¥»¥¹¤Ï¡¢¥Æ¡¼¥Ö¥ë¤ò¥¹¥È¥ì¡¼¥È¤ËÆɤà½ç ¼¡ Áöºº¤è¤ê¤âÃÙ¤¯¤Ê¤ë¤³¤È¤¬¤¢¤ë¤«¤é¤Ç¤¹¡£ ¥¤¥ó¥Ç¥Ã¥¯¥¹¤ò»È¤¦¤«¤ò·èÄꤹ¤ë¤¿¤á¤Ë¡¢PostgreSQL ¤Ï¥Æ¡¼¥Ö¥ë¤Ë¤Ä¤¤ ¤Æ¤ÎÅý·×¾ðÊó¤ò»ý¤¿¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó¡£¤³¤ÎÅý·×¾ðÊó¤Ï¡¢VACUUM ANALYZE¤Þ¤¿¤Ï¡¢Ã±¤Ë ANALYZE ¤ò»È¤Ã¤Æ¼ý½¸¤¹¤ë¤³¤È ¤¬¤Ç¤­ ¤Þ¤¹¡£Åý·×¾ðÊó¤ò»È¤Ã¤Æ¥ª¥Ö¥Æ¥£¥Þ¥¤¥¶¤Ï¥Æ¡¼¥Ö¥ë¤ÎÃæ¤Ë¤¢¤ë¥í¥¦¿ô¤òÃÎ ¤ê¡¢¥¤¥ó¥Ç¥Ã¥¯¥¹¤ò»È¤¦¤Ù¤¤«¤Î·èÄê¤ò¤è¤êÀµ¤·¤¯¤Ç¤¤Þ¤¹¡£Åý·×¾ðÊó¤ÏºÇŬ ¤Ê·ë¹ç½ç¤ä·ë¹çÊýË¡¤ò·è¤á¤ë¾å¤Ç¤âµ®½Å¤Ê¤â¤Î¤â¤¢¤ê¤Þ¤¹¡£Åý·×¾ðÊó¤Î¼ý½¸¤Ï ¡¢ ¥Æ¡¼¥Ö¥ë¤ÎÆâÍƤ¬¤«¤ï¤ë¤ÈËè¤Ë·«ÊÖ¤·¤Ê¤µ¤ì¤ë¤Ù¤¤Ç¤¹¡£ ¥¤¥ó¥Ç¥Ã¥¯¥¹¤Ï¡¢Ä̾ï ORDER BY ¤ä·ë¹ç¤ò¹Ô¤Ê ¤¦¤¿¤á¤Ë¤Ï»È¤ï¤ì¤Þ¤»¤ó¡£½ç¼¡¥¹¥­ ¥ã¥ó¤Ë³¤¯ÌÀ¼¨Åª¥½¡¼¥È¤Ï¡¢µðÂç¤Ê¥Æ¡¼¥Ö¥ë ¤Î¥¤¥ó¥Ç¥Ã¥¯¥¹¥¹¥­ ¥ã¥ó¤è¤ê¤âÉáÄ̤Ϲ⮤Ǥ¹¡£ ¤·¤«¤·¡¢ORDER BY¤ÈÁȤ߹ç¤ï¤µ¤ì¤¿LIMIT ¤Ï¡¢¥Æ¡¼¥Ö¥ë¤Î¾®¤µ¤ÊÉôʬ¤òÊÖ¤¹¤¿¤á¤Ë¤¿¤Ó¤¿¤Ó¥¤¥ó¥Ç¥Ã¥¯¥¹¤ò»È¤¦¤Ç¤·¤ç¤¦ ¡£ ¼ÂºÝ¡¢MAX() ¤ä MIN() ¤¬¥¤¥ó¥Ç¥Ã¥¯¥¹¤ò»È¤ï¤Ê¤¤¤È¤·¤Æ¤â¡¢¤³¤Î¤è¤¦¤ÊÃͤò ORDER BY ¤È LIMIT ¤ò»È¤Ã¤Æ¥¤¥ó¥Ç¥Ã¥¯¥¹¤ò»È¤Ã¤Æ¼è¤ê½Ð¤¹¤³¤È¤¬²Äǽ¤Ç¤¹: SELECT col FROM tab ORDER BY col [ DESC ] LIMIT 1; ¤â¤·¡¢¥ª¥×¥Æ¥£¥Þ¥¤¥¶¤¬´Ö°ã¤Ã¤Æ¥·¡¼¥±¥ó¥·¥ã¥ë¥¹¥­ ¥ã¥ó¤òÁªÂò¤·¤¿¤³¤È¤Ëµ¿¤¤¤¬¤Ê¤±¤ì¤Ð¡¢SET enable_seqscan TO 'off'¤ò»È¤Ã¤Æ¥¤¥ó¥Ç¥Ã¥¯¥¹¥¹¥­ ¥ã¥ó¤Ç¤Þ¤Á¤¬¤¤¤Ê¤¯Â®¤¯¤Ê¤Ã¤Æ¤¤¤ë¤«¤ò¥Æ¥¹¥È¤ò¤·¤Æ¤ß¤Æ¤¯¤À¤µ¤¤¡£ LIKE ¤¢¤ë¤¤¤Ï ~ ¤Î¤è¤¦¤Ê¥ï¥¤¥ë¥É¥«¡¼¥É±é»» »Ò¤ÏÆÃÊ̤ʴĶ­ ¤Ç¤·¤«»È¤¨¤Þ¤»¤ó¡§ * ¸¡º÷ʸ»úÎó¤¬Ê¸»úÎó¤ÎºÇ½é¤Ë¤¤¤Þ¤¹¡£¤¿¤È¤¨¤Ð¡§ + LIKE ¥Ñ¥¿¡¼¥ó¤¬%¤Ç»Ï¤Þ¤é¤Ê¤¤ + ~ (Àµµ¬É½¸½) ¥Ñ¥¿¡¼¥ó¤Ï^¤Ç»Ï¤Þ¤é¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤ * ¸¡º÷ʸ»úÎó¤òʸ»ú¥¯¥é¥¹¤«¤é»Ï¤á¤ë¤³¤È¤Ï¤Ç¤¤Þ¤»¤ó¡£¤¿¤È¤¨¤Ð¡¢[a-e]¡£ * ILIKE ¤ä ~* ¤Î¤è¤¦¤ÊÂçʸ»ú¤È¾®Ê¸»ú¤ò¶èÊ̤· ¤Ê¤¤¸¡º÷¤Ï»È¤¨¤Þ¤»¤ó¡£¤½¤Î¤«¤ï¤ê¡¢¤³¤ÎFAQ¤Î4.12Àá¤ÇÀâÌÀ¤¹¤ë´Ø¿ô¤Î¥ ¤¥ó¥Ç¥Ã¥¯¥¹¤¬»È¤¨¤Þ¤¹¡£ * initdb ¤Ë¤ª¤¤¤Æ¤Ï¡¢¥Ç¥Õ¥©¥ë¥È¤ÇC¥í¥±¡¼¥ë¤¬»È¤ï¤ì¤Ê ¤¯¤Æ¤Ï¤Ê¤ê¤Þ¤»¤ó¡£¤½¤ÎÍýͳ¤Ï¡¢C¥í¥±¡¼¥ë°Ê³°¤Ç¤Ï¼¡¤ËÂ礭 ¤Êʸ»ú¤òÃΤ뤳¤È ¤¬¤Ç¤­ ¤Ê¤¤¤«¤é¤Ç¤¹¡£¤³¤Î¤è¤¦¤Ê¾ì¹ç¡¢LIKE¥¤¥ó¥Ç¥¯¥·¥ó¥°¤Ë¤À¤± Ư¤¯¤è¤¦¤Ê¡¢ÆÃÊ̤Êtext_pattern_ops¥¤¥ó¥Ç¥Ã¥¯¥¹¤òºîÀ® ¤¹¤ë¤³¤È¤â¤Ç¤¤Þ¤¹¡£ 8.0¤è¤êÁ°¤Î¥ê¥ê¡¼¥¹¤Ç¤Ï¡¢¥¤¥ó¥Ç¥Ã¥¯¥¹¤Ï¡¢¥Ç¡¼¥¿·¿¤¬¤Á¤ç¤¦¤É¥¤¥ó¥Ç¥Ã¥¯¥ ¹¤Î¥«¥é¥à¤Î·¿¤È°ìÃפ·¤Ê¤±¤ì¤Ð¡¢»È¤¨¤Ê¤¤¤³¤È¤¬¤·¤Ð¤·¤Ð¤¢¤ê¤Þ¤·¤¿¡£¤ª¤½¤ 餯¡¢int2, int8, ¤ª¤è¤Ó numeric Åù¤Î¥«¥é¥à¤Î¥¤¥ó¥Ç¥Ã¥¯¥¹¤¬¤½¤¦¤Ç¤¹¡£ [ÌõÃí¡§ ¶¯À©Åª¤Ë¥¤¥ó¥Ç¥Ã¥¯¥¹¤ò»È¤¦¤Ë¤Ï SET enable_seqscan = off ¤ò¼Â¹Ô¤·¤Þ¤¹¡£ ] 4.9) Ì䤤¹ç¤ï¤»¥ª¥Ö¥Æ¥£¥Þ¥¤¥¶¤¬¤É¤Î¤è¤¦¤ËÌ䤤¹ç¤ï¤»¤òɾ²Á¤¹¤ë¤Î¤«¤ò¸«¤ë¤Ë¤Ï¤É¤¦¤ ·¤Þ¤¹¤«¡© ¥ª¥ó¥é¥¤¥ó¥Þ¥Ë¥å¥¢¥ë¤Ç EXPLAIN ¤ò¸«¤Æ²¼¤µ¤¤¡£ 4.10) R-tree ¥¤¥ó¥Ç¥Ã¥¯¥¹¤È¤Ï²¿¤Ç¤¹¤«¡© R-tree ¥¤¥ó¥Ç¥Ã¥¯¥¹¤Ï¶õ´ÖŪ¤Ê¥Ç¡¼¥¿¤Ë¥¤¥ó¥Ç¥Ã¥¯¥¹¤òÉÕ¤±¤ë¤¿¤á¤Ë»È¤ï¤ì¤Þ¤¹¡£¥Ï ¥Ã¥·¥å¥¤¥ó¥Ç¥Ã¥¯¥¹¤Ç¤ÏÈϰϤθ¡º÷¤¬¤Ç¤¤Þ¤»¤ó¡£¤Þ¤¿¡¢B-tree ¥¤¥ó¥Ç¥Ã¥¯¥¹¤Ç¤Ï¡¢£±¼¡¸µ¤Ç¤·¤«ÈϰϤθ¡º÷¤¬¤Ç¤¤Þ¤»¤ó¡£R-tree ¥¤¥ó¥Ç¥Ã¥¯¥¹¤Ç¤¢¤ì¤Ð¿¼¡¸µ¤Î¥Ç¡¼¥¿¤ò°·¤¨¤Þ¤¹¡£¤¿¤È¤¨¤Ð¡¢¤â¤· R-tree ¥¤¥ó¥Ç¥Ã¥¯¥¹¤ò point ·¿¤Î°À¤ËÉÕ¤±¤ë¤³¤È¤¬¤Ç¤­ ¤ë¤È¤¹¤ë¤È¥·¥¹¥Æ¥à¤Ï¡¢¡ÖĹÊý·Á¤Ë°Ï¤Þ¤ì¤¿ÅÀ¤ò¤¹¤Ù¤ÆÁªÂò¤¹¤ë¡×¤È¤¤¤¦¤è¤¦ ¤ÊÌ䤤¹ç¤ï¤»¤Ë¡¢¤è¤ê¸úΨÎɤ¯Åú¤¨¤é¤ì¤Þ¤¹¡£ R-Tree ¤ÎÀ߷פθ¶Åµ¤È¤Ê¤ë¸¢°Ò¤¢¤ëÏÀʸ¤Ï: Guttman, A. "R-Trees: A Dynamic Index Structure for Spatial Searching." Proceedings of the 1984 ACM SIGMOD Int'l Conf on Mgmt of Data, 45-57. ¤³¤ÎÏÀʸ¤Ï¡¢Stonebraker ¶µ¼ø¤Î "Readings in Database Systems" ¤Ç¤â¼è¤ê¾å¤²¤é¤ì¤Æ¤¤¤Þ¤¹¡£ [ÌõÃí¡§ ÆàÎÉÀèüÂç¤ÎÀÐÀî²Â¼£¤µ¤ó¤è¤êR-Tree´Ø·¸¤Îʸ¸¥¤ò¾Ò²ð¤·¤Æĺ¤¤Þ¤·¤¿¡£ ÆüËܸì Postgres ML ¤Î¥¢¡¼¥«¥¤¥Ö¤«¤é "Subject: [postgres95 801] spatialdata structures" http://www.sra.co.jp/people/t-ishii/PostgreSQL/mhonarc/pgsql-jp/1996Oct/msg00007.html ¤ò¤´Í÷²¼¤µ¤¤¡£ ] Áȹþ¤ß¤Î R-Tree ¤Ç¥Ý¥ê¥´¥ó¤ä¥Ü¥Ã¥¯¥¹¤òÁàºî¤Ç¤¤Þ¤¹¡£ÍýÏÀŪ¤Ë¤ÏR-Tree ¤Ï¤â¤Ã¤È¹â¤¤¼¡¸µ¤òÁàºî¤¹¤ë¤è¤¦¤Ë¤â³ÈÄ¥¤Ç¤¤Þ¤¹¡£¼Â¼ÁŪ¤Ë¤Ï¡¢R-Tree ¤Î³ÈÄ¥¤Ë¤Ï¤Á¤ç¤Ã¤È¤·¤¿ºî¶È¤¬É¬ÍפǤ·¤Æ¡¢¸½ºß¡¢²æ¡¹¤Ï¤½¤ì¤ò¤É¤Î¤è¤¦¤Ë¤¹ ¤ë¤«¤Ë¤Ä¤¤¤Æ¤Îʸ½ñ¤ò»ý¤Ã¤Æ¤¤¤Þ¤»¤ó¡£ [ÌõÃí¡§ R-Tree ¥¤¥ó¥Ç¥Ã¥¯¥¹¤ÏGiST¤Ç³«È¯¤µ¤ì¤Æ¤¤¤Þ¤¹¡£ http://www.sai.msu.su/~megera/postgres/gist/ ] 4.11) °äÅÁŪÌ䤤¹ç¤ï¤»ºÇŬ²½¤È¤Ï²¿¤Ç¤¹¤«¡© GEQO ¥â¥¸¥å¡¼¥ë¤Ï¡¢Âô»³¤Î¥Æ¡¼¥Ö¥ë¤ò·ë¹ç¤¹¤ë¤È¤­ ¤Ë¡¢°äÅÁŪ¥¢¥ë¥´¥ê¥º¥à(GA)¤ÇÌä¹ç¤ï¤»¤ò¹â®²½¤·¤Þ¤¹¡£¤³¤ì¤Ë¤è¤ê¡¢¤·¤é¤ß ¤Ä¤Ö¤·¤Ëõº÷¤ò¹Ô¤Ê¤ï¤Ê¤¯¤Æ¤â¡¢Â礤ʷë¹ç(join queries)¤ò°·¤¦¤³¤È¤¬¤Ç¤­ ¤ë¤è¤¦¤Ë¤Ê¤ê¤Þ¤¹¡£ 4.12) Àµµ¬É½¸½¤Ç¤Î¸¡º÷¤äÂçʸ»ú¤È¾®Ê¸»ú¤È¤ò¶èÊ̤·¤Ê¤¤Àµµ¬É½¸½¸¡º÷¤Ï¤É¤Î¤è¤¦¤Ë¼Â¸½¤ ·¤Þ¤¹¤«¡©Âçʸ»ú¤È¾®Ê¸»ú¤È¤ò¶èÊ̤·¤Ê¤¤¸¡º÷¤Î¤¿¤á¤Î¥¤¥ó¥Ç¥Ã¥¯¥¹¤Ï¤É¤Î¤è¤¦¤Ë»È ¤¤¤Þ¤¹¤«¡© ~±é»»»Ò¤ÏÀµµ¬É½¸½¾È¹ç¤ò¹Ô¤Ê¤¤¡¢~* ¤ÏÂçʸ»ú¤È¾®Ê¸»ú¤ò¶èÊ̤·¤Ê¤¤(case-insensitive)Àµµ¬É½¸½¾È¹ç¤ò¹Ô¤¤¤Þ¤¹¡£ Âçʸ»ú¤È¾®Ê¸»ú¤ò¶èÊ̤·¤Ê¤¤ LIKE ±é»»»Ò¤ò ILIKE ¤È¤¤¤¤¤Þ¤¹¡£ Âçʸ»ú¤È¾®Ê¸»ú¤ò¶èÊ̤·¤Ê¤¤ÅùÃÍÈæ³Ó¤Ï¼¡¤Î¤è¤¦¤Ëɽ¸½¤Ç¤¤ë¡§ SELECT * FROM tab WHERE lower(col) = 'abc'; ɸ½à¥¤¥ó¥Ç¥Ã¥¯¥¹¤Ç¤Ï»È¤ï¤ì¤º¡¢¤·¤«¤·¤Ê¤¬¤é¡¢¤â¤·´Ø¿ô¥¤¥ó¥Ç¥Ã¥¯¥¹¤ò ºî¤Ã¤¿¤Ê¤é¤½¤ì¤¬»È¤ï¤ì¤ë¤Ç¤·¤ç¤¦¡£ CREATE INDEX tabindex ON tab (lower(col)); 4.13) Ì䤤¹ç¤ï¤»¤ÎÃæ¤Ç¡¢¥Õ¥£¡¼¥ë¥É¤¬ NULL ¤Ç¤¢¤ë¤³¤È¤ò¸¡½Ð¤¹¤ë¤Ë¤Ï¤É¤¦¤·¤Þ¤¹¤«¡© ¥«¥é¥à¤ò IS NULL ¤È IS NOT NULL ¤È¤Ç»î¤·¤Æ¤ß¤Þ¤¹¡£ 4.14) ÍÍ¡¹¤Êʸ»ú·¿¤Î¤½¤ì¤¾¤ì¤Î°ã¤¤¤Ï²¿¤Ç¤¹¤«¡© Type Internal Name Notes -------------------------------------------------- VARCHAR(n) varchar ºÇÂçĹ¤Î¥µ¥¤¥º¤ò»ØÄꤹ¤ë¡¢µÍ¤áʪ̵¤· CHAR(n) bpchar »ØÄꤵ¤ì¤¿¸ÇÄêĹ¤È¤Ê¤ë¤è¤¦¤Ë¶õÇò¤¬µÍ¤á¤é¤ì¤ë TEXT text Ťµ¤Ë¾å¸Â¤Î̵¤¤¥Æ¥¥¹¥È BYTEA bytea ²ÄÊÑĹ¤Î¥Ð¥¤¥ÈÇÛÎó(null-byte safe) "char" char £±Ê¸»ú ÆâÉô̾¤Ë¤ªÌܤˤ«¤«¤ë¤Î¤Ï¡¢¥·¥¹¥Æ¥à¡¦¥«¥¿¥í¥°¤òÄ´¤Ù¤ë¤È¤­ ¤ä¡¢¥¨¥é¡¼¥á¥Ã¥»¡¼¥¸¤ò¼õ¤±¼è¤ë¤È¤¤Ç¤¹¡£ ¾åµ¤Î·¿¤Î¤¦¤ÁºÇ½é¤Î£´¤Ä¤Î·¿¤Ï "varlena" ·¿¤Ç¤¹(¤¹¤Ê¤ï¤Á¡¢¥Ç¥£¥¹¥¯¤ÎºÇ½é¤Î£´¥Ð¥¤¥È¤¬¥Ç¡¼¥¿Ä¹¤Ç¡¢¤½¤ì¤Î¸å¤Ë¼ÂºÝ¤ Υǡ¼¥¿¤¬Â³¤¤Þ¤¹)¡£¤³¤Î¤è¤¦¤Ë¼ÂºÝ¤Î¶õ´Ö¤ÏÀë¸À¤µ¤ì¤¿Â礤µ¤è¤ê¤â¾¯¤·Â礭 ¤¯¤Ê¤ê¤Þ¤¹¡£¤·¤«¤·¡¢¤³¤ì¤é¤Î¥Ç¡¼¥¿·¿¤ÏTOAST¤Ë¤è¤ê°µ½Ì¤µ¤ì¤¿¤êÊ£¿ô¥í¥¦¤ ËÅϤäÆÊݸ¤µ¤ì¤¿¤ê¤·¤Æ¡¢¥Ç¥£¥¹¥¯¾å¤Î¶õ´Ö¤Ï»×¤Ã¤¿¤è¤ê¾®¤µ¤¯¤Ê¤ê¤Þ¤¹¡£ VARCHAR(n) ¤Ï²ÄÊÑŤÎʸ»úÎó¤òÊݸ¤¹¤ë¤Î¤ËºÇŬ¤Ç¤¹¤¬¡¢Êݸ¤Ç¤­ ¤ëʸ»úÎó¤ÎŤµ¤ËÀ©¸Â¤¬¤¢¤ê¤Þ¤¹¡£TEXT ¤ÏŤµ¤ËÀ©¸Â¤Î̵¤¤Ê¸»úÎó¤ÎÊݸ¤Î¤¿¤á¤Î¤â¤Î¤Ç¡¢ºÇÂç¤Ç 1¥®¥¬¥Ð¥¤¥È¤Ç¤¹¡£ CHAR(n)¤Ï¡¢VARCHAR(n)¤¬Í¿¤¨¤é¤ì¤¿Ê¸»ú¤À¤±¤òÊݸ¤¹¤ë¤Î¤ËÂФ·¡¢¥Ö¥é¥ó¥¯¤ òµÍ¤á¹þ¤ó¤Ç¤¤¤Ä¤âƱ¤¸Ä¹¤µ¤Çʸ»úÎó¤òÊݸ¤¹¤ë¤Î¤ËºÇŬ¤Ç¤¹¡£BYTEA¤Ï¡¢Éôʬ Ū¤ËNULL ¤Î¥Ð¥¤¥È¤ò´Þ¤à¥Ð¥¤¥Ê¥ê¥Ç¡¼¥¿¤òÊݸ¤¹¤ë¤¿¤á¤Î¤â¤Î¤Ç¤¹¡£¤³¤ì¤é¤Î¥¿¥¤¥×¤Ï Ʊ¤¸¤¯¤é¤¤¤ÎÀǽÆÃÀ¤ò¤â¤Á¤Þ¤¹¡£ 4.15.1) ÄÌÈÖ(serial)¡¿¼«Æ°Áýʬ¥Õ¥£¡¼¥ë¥É¤Ï¤É¤Î¤è¤¦¤Ë¤Ä¤¯¤ê¤Þ¤¹¤«¡© 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 ¤«¤é¤Ï¼«Æ°Åª¤Ë¤Ï¹Ô¤Ê¤ï¤ì¤Ê¤¯¤Ê¤ê¤Þ¤·¤¿¡£ ] ÄÌÈ֤ˤĤ¤¤Æ¤Î¤â¤Ã¤È¾Ü¤·¤¤¾ðÊó¤Ï¡¢¥ª¥ó¥é¥¤¥ó¥Þ¥Ë¥å¥¢¥ë¤Ç create_sequence ¤ò¤´Í÷²¼¤µ¤¤¡£ ¤Þ¤¿¡¢³Æ¥í¥¦¤ÎOID¥Õ¥£¡¼¥ë¥É¤ò°ì°ÕÃͤȤ·¤Æ»È¤¦¤³¤È¤â¤Ç¤­ ¤Þ¤¹¡£¤·¤«¤·¤Ê¤¬¤é¡¢¤â¤·¤â¥Ç¡¼¥¿¥Ù¡¼¥¹¤ò¥À¥ó¥×¤·¤Æ¥ê¥í¡¼¥É¤¹¤ëɬÍפ¬¤¢ ¤ë¾ì¹ç¤Ï¡¢OID¤ò²¹Â¸¤¹¤ë¤¿¤á¤Ëpg_dump ¤Ç -o¥ª¥×¥·¥ç¥ó¤ò»È¤¦¤«¡¢¤Þ¤¿¤Ï¡¢COPY WITH OIDS¥ª¥×¥·¥ç¥ó¤ò»È¤¦É¬Íפ¬¤¢¤ê¤Þ¤¹¡£ 4.15.2) SERIAL¥Ç¡¼¥¿·¿¤ËÁÞÆþ¤µ¤ì¤ëÃͤϡ¢¤É¤¦¤¹¤ì¤ÐÆÀ¤é¤ì¤Þ¤¹¤«¡© ¤Ò¤È¤Ä¤ÎÊýË¡¤Ï¡¢nextval() ´Ø¿ô¤ò»È¤Ã¤Æ¤½¤ÎÃͤòÁÞÆþ¤¹¤ëÁ°(before)¤Ë SEQUENCE ¥ª¥Ö¥¸¥§¥¯¥È¤«¤é¼¡¤Î SERIAL Ãͤò¼è¤ê½Ð¤·¡¢¤½¤ì¤«¤é¼ÂºÝ¤ËÁÞÆþ¤ò¤¹¤ë¤³¤È¤Ç¤¹¡£4.15.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¥ª¥Ö¥¸¥§¥¯¥È¤ Î̾Á°¤Ï¡¢__seq ¤Î¤è¤¦¤Ë¤Ê¤ê¡¢¤³¤Î¤¦¤Á¡¢table ¤È serialcolumn ¤Ï¤½¤ì¤¾¤ì¥Æ¡¼¥Ö¥ë¤Î̾Á°¤ÈSERIAL¥«¥é¥à¤Î̾Á°¤Ç¤¹¡£ ¤¢¤ë¤¤¤Ï¡¢Í¿¤¨¤é¤ì¤¿SERIALÃͤò¡¢¤½¤ì¤¬´ûÄêÃͤȤ·¤ÆÁÞÆþ¤µ¤ì¤¿¸å¤Ç(after )¡¢ currval() ´Ø¿ô¤ò»È¤Ã¤Æ¼è¤ê½Ð¤¹¤³¤È¤â¤Ç¤¤Þ¤¹¡£¤¿¤È¤¨¤Ð¡¢ execute("INSERT INTO person (name) VALUES ('Blaise Pascal')"); new_id = execute("SELECT currval('person_id_seq')"); ºÇ¸å¤Ë¡¢INSERTʸ¤«¤éÊÖ¤ëOID¤ò»È¤Ã¤Æ¡¢´ûÄêÃͤò¤ß¤Ä¤±¤ë¤³¤È¤â¤Ç¤­ ¤Þ¤¹¤¬¡¢¤·¤«¤·¡¢oid¤ÎÃͤÏ40²¯¤Ë㤹¤ë¤È¤â¤È¤ËÌá¤Ã¤Æ¤·¤Þ¤¤¡¢ºÇ¤â°Ü¿¢À­ ¤ÎÄ㤤¤ä¤êÊý¤È¤Ê¤ë¤Ç¤·¤ç¤¦¡£Perl DBI ¤Î DBD::Pg ¥â¥¸¥å¡¼¥ë¤ò»È¤¨¤Ð¡¢$sth->execute() ¤Î¸å¤Ë $sth->{pg_oid_status} ¤ò·Ðͳ¤·¤Æ¤½¤Î OID Ãͤò»È¤¨¤ë¤è¤¦¤Ë¤¹¤ë¤³¤È¤Ï¤Ç¤¤Þ¤¹¡£ 4.15.3) currval() ¤Ï¾¤Î¥æ¡¼¥¶¤È¤Î¶¥¹ç¾õÂ֤˴٤뤳¤È¤Ï¤Ê¤¤¤Ç¤¹¤«¡© ¤½¤ì¤Ï¤¢¤ê¤Þ¤»¤ó¡£currval() ¤Ï¡¢¤¹¤Ù¤Æ¤Î¥æ¡¼¥¶¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¤¬¡¢¤¢¤Ê¤¿¤Î¥Ð¥Ã¥¯¥¨¥ó¥É¤ËÍ¿¤¨¤é¤ì¤¿¸½ ºß¤ÎÃͤòÊÖ¤·¤Þ¤¹¡£ 4.15.4) ¥È¥é¥ó¥¶¥¯¥·¥ç¥ó¤¬ÃæÃǤ·¤¿¤È¤­ ¤Ë¤â¤¦¤¤¤Á¤É¥·¡¼¥±¥ó¥¹Èֹ椬»È¤ï¤ì¤Ê¤¤¤Î¤Ï¤Ê¤¼¤Ç¤¹¤«¡©¥·¡¼¥±¥ó¥¹¡¿SERIAL¥«¥ é¥à¤Ë¶õ¤¤¬¤¢¤ë¤Î¤Ï¤Ê¤¼¤Ç¤¹¤«¡© Ʊ»þÀ­ ¤ò²þÁ±¤¹¤ë¤¿¤á¤Ë¡¢¼Â¹ÔÃæ¤Î¥È¥é¥ó¥¶¥¯¥·¥ç¥ó¤Ë¡¢É¬Íפǥȥé¥ó¥¶¥¯¥·¥ç¥ó¤¬ ½ªÎ»¤¹¤ë¤Þ¤Ç¥í¥Ã¥¯¤µ¤ì¤Ê¤¤¥·¡¼¥±¥ó¥¹ÃͤòÍ¿¤¨¤Æ¤¤¤Þ¤¹¡£¤³¤Î¤¿¤á¥È¥é¥ó¥¶ ¥¯¥·¥ç¥ó¤¬ÃæÃǤµ¤ì¤ë¤ÈÈÖ¹æ³ä¤êÅö¤Æ¤Ë¥®¥ã¥Ã¥×¤òÀ¸¤¸¤Þ¤¹¡£ 4.16) OID ¤È¤Ï²¿¤Ç¤¹¤«¡© TID ¤È¤Ï²¿¤Ç¤¹¤«¡© OID ¤È¤Ï°ì°Õ¤Î¥í¥¦ID ¤ËÂФ¹¤ë PostgreSQL ¤ÎÅú¤¨¤Ç¤¹¡£PostgreSQL ¤ÎÃæ¤Ç¤Ä¤¯¤é¤ì¤ë¤¹¤Ù¤Æ¤Î¥í¥¦¤Ï°ì°Õ¤Î OID ¤òÆÀ¤Þ¤¹¡£initdb ¤ÇȯÀ¸¤µ¤ì¤ë OID ¤Ï¤¹¤Ù¤Æ 16384 (include/access/transam.h ¤«¤é)¤è¤ê¾®¤µ¤ÊÃͤǤ¹¡£initdb ¸å¤Î¤¹¤Ù¤Æ¤Î OID (¥æ¡¼¥¶ºîÀ®)¤Ï¤½¤ì°Ê¾å¤ÎÃͤˤʤê¤Þ¤¹¡£ ´ûÄê¤Ç¤Ï¡¢¤³¤ì¤é¤¹¤Ù¤Æ¤Î OID¤Ï°ì¤Ä¤Î¥Ç¡¼¥Ö¥ë¤ä¥Ç¡¼¥¿¥Ù¡¼¥¹Æâ¤Ëα¤Þ¤é¤º¡¢PostgreSQL ¥¤¥ó¥¹¥È¥ì¡¼¥·¥ç¥óÁ´ÂΤÎÃæ¤Ç°ì°Õ¤Ç¤¹¡£ PostgreSQL ¤Ï¥Æ¡¼¥Ö¥ë´Ö¤Î¥í¥¦¤ò·ë¤Ó¤Ä¤±¤ë¤¿¤á¤Ë¡¢¤½¤Î¥·¥¹¥Æ¥à¥Æ¡¼¥Ö¥ëÆâ¤Ë OID ¤ò»È¤¤¤Þ¤¹¡£¤³¤Î OID ¤ÏÆÃÄê¤Î¥æ¡¼¥¶¤Î¥í¥¦¤ò¼±Ê̤¹¤ë¤¿¤á¤ä·ë¹ç¤ÎÃæ¤Ç»È¤ï¤ì¤ë¤³¤È¤¬¤Ç¤­ ¤Þ¤¹¡£OID ¤ÎÃͤòÊݸ¤¹¤ë¤¿¤á¤Ë¤Ï OID ·¿¤ò¥«¥é¥à¤Ë»È¤¦¤³¤È¤ò¾©¤á¤Þ¤¹¡£¤è¤ê®¤¯¥¢¥¯¥»¥¹¤¹¤ë¤¿¤á¤Ë OID ¥Õ¥£¡¼¥ë¥É¤Ë¥¤¥ó¥Ç¥Ã¥¯¥¹¤òºî¤ë¤³¤È¤¬¤Ç¤¤Þ¤¹¡£ OID ¤Ï¡¢Á´¤Æ¤Î¥Ç¡¼¥¿¥Ù¡¼¥¹¤Ç»È¤ï¤ì¤ëÃæ±ûÎΰ褫¤é¡¢Á´¤Æ¤Î¿·¤·¤¤¥í¥¦¤Ë³ä¤êÅö ¤Æ¤é¤ì¤Þ¤¹¡£OID ¤ò¾¤Î²¿¤«¤ËÊѤ¨¤¿¤¤¡¢¤¢¤ë¤¤¤Ï¸µ¤Î OID ¤â¥Æ¡¼¥Ö¥ë¤È°ì½ï¤Ë¥³¥Ô¡¼¤·¤¿¤¤¤Î¤Ê¤é¡¢¤Ç¤¤Ê¤¯¤Ï¤¢¤ê¤Þ¤»¤ó¡£ CREATE TABLE new_table(mycol int); SELECT oid AS old_oid, mycol INTO tmp_table FROM old_table; COPY tmp_table TO '/tmp/pgtable'; COPY new_table WITH OIDS FROM '/tmp/pgtable'; DROP TABLE tmp_table; OID ¤Ï¡¢4¥Ð¥¤¥È¤ÎÀ°¿ô¤È¤·¤ÆÊݸ¤µ¤ì¤Æ¤¤¤ë¤Î¤Ç¡¢40²¯¤ò±Û¤¨¤ë¤È°î¤ì¤Æ¤·¤Þ¤¦¤ Ǥ·¤ç¤¦¡£Ã¯¤â¤³¤ì¤¬µ¯¤­ ¤¿¤ÈÊó¹ð¤·¤Æ¤¯¤ë¿Í¤Ï¤¤¤Þ¤»¤ó¤Ç¤·¤¿¤¬¡¢¤½¤¦¤Ê¤ëÁ°¤Ë¤³¤ÎÀ©¸Â¤ò¼è¤ê½ü¤¯¤³ ¤È¤ò·×²è¤·¤Æ¤¤¤Þ¤¹¡£ TID ¤ÏÆÃÄê¤ÎʪÍý¥í¥¦¤ò¤½¤Î¥Ö¥í¥Ã¥¯¤È¥ª¥Õ¥»¥Ã¥ÈÃͤǼ±Ê̤¹¤ë¤¿¤á¤Ë»È¤ï¤ì¤Þ¤¹ ¡£TID ¤Ï¥í¥¦¤¬½¤Àµ¤µ¤ì¤¿¤êºÆ¥í¡¼¥É¤µ¤ì¤ë¤ÈÊѤï¤ê¤Þ¤¹¡£¤½¤ì¤é¤Î TID ¤Ï¡¢ÊªÍý¥í¥¦¤ò»Ø¤¹¤¿¤á¤Ë¥¤¥ó¥Ç¥Ã¥¯¥¹µºÜ¤Ç»È¤ï¤ì¤Þ¤¹¡£ 4.17) PostgreSQL ¤Ç»È¤ï¤ì¤ë¤¤¤¯¤Ä¤«¤ÎÍѸì¤Î°ÕÌ£¤Ï²¿¤Ç¤¹¤«¡© ¤¤¤¯¤Ä¤«¤Î¥½¡¼¥¹¥³¡¼¥É¤ä¸Å¤¤Ê¸½ñ¤ÎÃæ¤Ë¤Ï¡¢¤½¤ì¤¾¤ÎÀìÌçʬÌî¤ÎÃæ¤Ç¤â¤Ã¤È °ìÈÌŪ¤Ë»È¤ï¤ì¤ëÀìÌçÍѸ줬»È¤ï¤ì¤Æ¤¤¤Þ¤¹¡£ * ¥Æ¡¼¥Ö¥ë(table)¡¢´Ø·¸(relation)¡¢¥¯¥é¥¹(class) * ¥í¥¦(row)¡¢¥ì¥³¡¼¥É(record)¡¢¥¿¥Ã¥×¥ë(tuple) * ¥«¥é¥à(column)¡¢¥Õ¥£¡¼¥ë¥É(field)¡¢Â°À(attribute) * ¼èÆÀ(retrieve)¡¢ÁªÂò(select) * ÃÖ´¹(replace)¡¢¹¹¿·(update) * ÄɲÃ(append)¡¢ÁÞÆþ(insert) * OID, Ï¢ÈÖ(serial value) * ¥Ý¡¼¥¿¥ë(portal), ¥«¡¼¥½¥ë(cursor) * ÎΰèÊÑ¿ô(range variable)¡¢¥Æ¡¼¥Ö¥ë̾(table name)¡¢¥Æ¡¼¥Ö¥ëÊÌ̾(table alias) °ìÈÌŪ¤Ê¥Ç¡¼¥¿¥Ù¡¼¥¹ÍѸì¤Î¥ê¥¹¥È¤Ï¡§http://hea-www.harvard.edu/MST/sim ul/software/docs/pkgs/pgsql/glossary/glossary.html ¤Ç¸«¤Ä¤±¤é¤ì¤Þ¤¹¡£ 4.18) ¥¨¥é¡¼¥á¥Ã¥»¡¼¥¸ "ERROR: Memory exhausted in AllocSetAlloc()"¤¬½Ð¤ë¤Î¤Ï¤Ê¤¼¤Ç¤¹¤«¡© ¤ª¤½¤é¤¯¡¢¥·¥¹¥Æ¥à¤Î²¾ÁÛ¥á¥â¥ê¡¼¤òÁ´¤Æ»È¤¤²Ì¤¿¤·¤Æ¤·¤Þ¤Ã¤Æ¤¤¤ë²ÄǽÀ­ ¤¬¤¢¤ë¤«¡¢¥«¡¼¥Í¥ë¤¬¤¢¤ë¥ê¥½¡¼¥¹¤Ë¤Ä¤¤¤Æ¤â¤ÄÀ©¸ÂÃͤ¬Ä㤹¤®¤ë²ÄǽÀ­ ¤¬¤¢¤ê¤Þ¤¹¡£ postmaster ¤ò»ÏÆ°¤¹¤ëÁ°¤Ë¤³¤ì¤ò»î¤·¤Æ¤ß¤Æ²¼¤µ¤¤¡§ ulimit -d 262144 limit datasize 256m ¥·¥§¥ë¤Ë¤è¤Ã¤Æ¡¢¤É¤Á¤é¤«¤Ò¤È¤Ä¤¬À®¸ù¤¹¤ë¤Ç¤·¤ç¤¦¤¬¡¢¤³¤ì¤Ï¥×¥í¥»¥¹¤Î¥Ç ¡¼¥¿¥»¥°¥á¥ó¥ÈÀ©¸Â¤ò¤è¤ê¹â¤¯ÀßÄꤷ¡¢¤¿¤Ö¤óÌ䤤¹ç¤ï¤»¤¬´°·ë¤¹¤ë¤è¤¦¤Ë¤Ê ¤ë¤Ç¤·¤ç¤¦¡£¤³¤Î¥³¥Þ¥ó¥É¤Ï¸½¹Ô¤Î¥×¥í¥»¥¹¤È¡¢¤³¤Î¥³¥Þ¥ó¥É¤òÁö¤é¤»¤¿¸å¤Ë ºî¤é¤ì¤ëÁ´¤Æ¤Î¥µ¥Ö¥×¥í¥»¥¹¤Ë¤Ä¤¤¤ÆŬÍѤµ¤ì¤Þ¤¹¡£¥Ð¥Ã¥¯¥¨¥ó¥É¤¬¤È¤Æ¤â¿ ¤¯¤Î¥Ç¡¼¥¿¤òÊÖ¤¹¤¿¤á¤ËSQL ¥¯¥é¥¤¥¢¥ó¥È¤ÇÌäÂ꤬³¤¤¤Æ¤¤¤ë¤Î¤Ç¤¢¤ì¤Ð¡¢¥¯¥é¥¤¥¢¥ó¥È¤ò³«»Ï¤¹¤ëÁ°¤Ë¤³ ¤ì¤ò»î¤·¤Æ¤ß¤Æ¤¯¤À¤µ¤¤¡£ 4.19) ¤É¤Î¥Ð¡¼¥¸¥ç¥ó¤Î PostgreSQL ¤òÁö¤é¤»¤Æ¤¤¤ë¤«¤òÄ´¤Ù¤ë¤Ë¤Ï¤É¤¦¤·¤Þ¤¹¤«¡© psql ¤«¤é SELECT version(); ¤ò¥¿¥¤¥×¤·¤Þ¤¹¡£ 4.20) ¥é¡¼¥¸¡¦¥ª¥Ö¥¸¥§¥¯¥È¤ÎÁàºî¤Çinvalid large obj descriptor ¤ò¼õ¤±¼è¤ê¤Þ¤·¤¿¡£¤Ê¤¼¤Ç¤·¤ç¤¦¤«¡© ¥é¡¼¥¸¡¦¥ª¥Ö¥¸¥§¥¯¥ÈÁàºî¤ò¤¹¤ë¤È¤¤Ï¡¢Á°¸å¤ËBEGIN WORK¤ÈCOMMIT¤òÉÕ¤±¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£¤¹¤Ê¤ï¤Á¡¢lo_open ... lo_close¤ò¤Ï¤µ¤ß¹þ¤ß¤Þ¤¹¡£ ¸½ºß¤Ï¡¢PostgreSQL¤Î¥È¥é¥ó¥¶¥¯¥·¥ç¥ó¤Î¥³¥ß¥Ã¥È»þ¤Ë¥é¡¼¥¸¡¦¥ª¥Ö¥¸¥§¥¯¥È ¡¦¥Ï¥ó¥É¥ë¤òÊĤ¸¤ë¤³¤È¤Ë¤è¤ê¡¢lo_open¥³¥Þ¥ó¥É¤¬´°Î»¤·¤¿Ä¾¸å¤Ë¶¯À©Åª¤Ë¥ 롼¥ë¤ò¼Â¹Ô¤·¤Þ¤¹¡£¤³¤Î¤¿¤á¡¢ºÇ½é¤Ë¥Ï¥ó¥É¥ë¤ËÂФ·¤Æ²¿¤«¤ò¤·¤è¤¦¤È¤¹¤ë¤ È¡¢invalid large obj descriptor(¥é¡¼¥¸¡¦¥ª¥Ö¥¸¥§¥¯¥È¤Îµ­ ½Ò»Ò¤¬ÉÔÀµ)¤È¤Ê¤ê¤Þ¤¹¡£¤½¤ì¤Ç¡¢¤â¤·¡¢¥È¥é¥ó¥¶¥¯¥·¥ç¥ó¤ò»È¤¦¤Î¤ò˺¤ì¤ë¤ È¡¢¡Ê¾¯¤Ê¤¯¤È¤â¤Û¤È¤ó¤É¤Î»þ´Ö¡ËƯ¤¤¤Æ¤¤¤¿¥³¡¼¥É¤¬¥¨¥é¡¼¥á¥Ã¥»¡¼¥¸¤ò½Ð¤ ¹¤Î¤Ç¤¹¡£ ¤â¤·¡¢ODBC¤Î¤è¤¦¤Ê¥¯¥é¥¤¥¢¥ó¥È¥¤¥ó¥¿¡¼¥Õ¥§¥¤¥¹¤ò¤ª»È¤¤¤Ê¤é¡¢auto-commi t off¤òÀßÄꤹ¤ëɬÍפ¬¤¢¤ë¤«¤â¤·¤ì¤Þ¤»¤ó¡£ 4.21) ¸½ºß¤Î»þ¹ï¤¬¥Ç¥Õ¥©¥ë¥È¤È¤Ê¤ë¤è¤¦¤Ê¥«¥é¥à¤Ï¤É¤Î¤è¤¦¤Ë¤Ä¤¯¤ê¤Þ¤¹¤«¡© CURRENT_TIMESTAMP¤ò»È¤¤¤Þ¤¹: CREATE TABLE test (x int, modtime timestamp DEFAULT CURRENT_TIMESTAMP ); 4.22) ¤Ê¤¼¡¢IN¤ò»È¤¦ÉûÌ䤤¹ç¤ï¤»¤¬¤È¤Æ¤âÃÙ¤¤¤Î¤Ç¤¹¤«¡© 7.4 ¤è¤êÁ°¤Î¥Ð¡¼¥¸¥ç¥ó¤Ç¤Ï¡¢ÉûÌ䤤¹ç¤ï¤»¤Ï¡¢ÉûÌ䤤¹ç¤ï¤»¤Î·ë²Ì¤ò³°ÉôÌ䤤¹ç ¤ï¤»¤Î³Æ¥í¥¦¤Ë¤Ä¤¤¤Æ½ç¼¡Áöºº¤¹¤ë¤³¤È¤Ë¤è¤Ã¤Æ¡¢³°Éô¤ÎÌ䤤¹ç¤ï¤»¤Ë·ë¹ç¤µ ¤»¤é¤ì¤ë¡£ ÉûÌ䤤¹ç¤ï¤»¤¬¤ï¤º¤«¤Ê¥í¥¦¤·¤«ÊÖ¤µ¤º¡¢³°ÉôÌ䤤¹ç¤ï¤»¤¬Âô»³¤Î¥í¥¦¤òÊÖ¤¹ ¾ì¹ç¤Ï¡¢IN¤¬ºÇ¤âÁᤤ¤Ç¤¹¡£Â¾¤ÎÌ䤤¹ç¤ï¤»¤ò¹â®²½¤¹¤ë¤Ë¤Ï¡¢IN¤òEXISTS¤Ë ÃÖ´¹¤·¤Þ¤¹: SELECT * FROM tab WHERE col IN (SELECT subcol FROM subtab) ¤ò¡¢ÃÖ¤´¹¤¨¤Æ¡§ SELECT * FROM tab WHERE EXISTS (SELECT subcol FROM subtab WHERE subcol = col) ¤È¤·¤Þ¤¹¡£ ¤³¤ì¤¬¼ê¤Ã¼è¤êÁᤤ¤Ç¤¹¤¬¡¢subcol¤Ïº÷°úÉÕ¤¥«¥é¥à¤Ç¤¢¤ë¤Ù¤­ ¤Ç¤¹¡£ ¥Ð¡¼¥¸¥ç¥ó7.4°Ê¹ß¤Ç¤Ï¡¢IN¤Ï¡¢Ä̾ï¤ÎÌ䤤¹ç¤ï¤»¤ÈƱÍͤÎÀöÎý¤µ¤ì¤¿¥¸¥ç¥¤¥ ó¤Îµ»½Ñ¤ò¼ÂºÝ¤Ë»È¤¤¡¢EXISTS¤ò»È¤¦¤³¤È¤ò¹¥¤ß¤Þ¤¹¡£ 4.23) ³°Éô·ë¹ç(outer join)¤Ï¤É¤Î¤è¤¦¤Ë¼Â¸½¤·¤Þ¤¹¤«? 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·ë¹ç¤È¸Æ¤Ð¤ì¤Þ¤¹¡£ °ÊÁ°¤Î¥ê¥ê¡¼¥¹¤Ç¤Ï³°Éô·ë¹ç(outer join)¤òUNION ¤È NOT IN ¤ò»È¤Ã¤Æ¥·¥ß¥å¥ì¡¼¥È¤Ç¤¤Þ¤¹¡£ ¤¿¤È¤¨¤Ð¡¢tab1 ¤È tab2 ¤ò·ë¹ç¤¹¤ë¤È¤­ ¤Ï¡¢¼¡¤ÎÌ䤤¹ç¤ï¤»¤ÇÆó¤Ä¤Î¥Æ¡¼¥Ö¥ë¤ò³°Éô·ë¹ç¤·¤Þ¤¹¡£ SELECT tab1.col1, tab2.col2 FROM tab1, tab2 WHERE tab1.col1 = tab2.col1 UNION ALL SELECT tab1.col1, NULL FROM tab1 WHERE tab1.col1 NOT IN (SELECT tab2.col1 FROM tab2) ORDER BY col1 4.24) Ê£¿ô¤Î¥Ç¡¼¥¿¥Ù¡¼¥¹¤ò»È¤¦Ì䤤¹ç¤ï¤»¤Ï¤É¤Î¤è¤¦¤Ë¤¹¤ì¤Ð¤Ç¤¤Þ¤¹¤«¡© ¸½¹Ô¤Î¥Ç¡¼¥¿¥Ù¡¼¥¹°Ê³°¤Ø¤ÎÌ䤤¹ç¤ï¤»ÊýË¡¤Ï¤¢¤ê¤Þ¤»¤ó¡£¤È¤¤¤¦¤Î¤âPostgr eSQL¤¬¥Ç¡¼¥¿¥Ù¡¼¥¹»ÅÍͤΥ·¥¹¥Æ¥à¥«¥¿¥í¥°¤òÆɤ߹þ¤à¤¿¤á¤Ç¡¢¤½¤³¤Ë¤Ï¡¢¤¿ ¤È¤¨¤½¤Î¤Õ¤ê¤ò¤¹¤ë¤À¤±¤Ë¤·¤í¡¢¥Ç¡¼¥¿¥Ù¡¼¥¹¤ò±Û¤¨¤ÆÌ䤤¹ç¤ï¤»¤ò¤¹¤ë¤¹¤Ù ¤¬¤¢¤ê¤Þ¤»¤ó¡£ contrib/dblink ¤Ï¥Ç¡¼¥¿¥Ù¡¼¥¹´Ö(cross-database)¤ÎÌ䤤¹ç¤ï¤»¤ò´Ø¿ô¸Æ½Ð¤·¤Ë¤è¤êµö¤·¤Þ¤¹ ¡£¤â¤Á¤í¤ó¡¢¥¯¥é¥¤¥¢¥ó¥È¤ÏƱ»þ¤ËÀܳ¤òÊ̤Υǡ¼¥¿¥Ù¡¼¥¹¤Ø¤âÄ¥¤é¤Ê¤¯¤Æ¤Ï ¤Ê¤é¤º¡¢·ë²Ì¤ò¥¯¥é¥¤¥¢¥ó¥È¦¤Ç¥Þ¡¼¥¸¤·¤Ê¤¯¤Æ¤Ï¤Ê¤ê¤Þ¤»¤ó¡£ 4.25) ´Ø¿ô¤ÇÊ£¿ô¤Î¥í¥¦¤Þ¤¿¤Ï¥«¥é¥à¤òÊÖ¤¹¤Ë¤Ï¤É¤¦¤·¤Þ¤¹¤«¡© 7.3¤Ç¤Ï´Ø¿ô¤«¤é¡¢Ê£¿ô¤Î¥í¥¦¤äÊ£¿ô¥«¥é¥à¤ò´Êñ¤ËÊÖ¤»¤Þ¤¹¡£ http://techdocs.postgresql.org/guides/SetReturningFunctions¡£ 4.26)¤Ê¤¼¡¢PL/PgSQL ´Ø¿ô¤ÎÃ椫¤é°ì»þ¥Æ¡¼¥Ö¥ë¤ò³Î¼Â¤Ë create/drop ¤¹¤ë¤³¤È¤¬¤Ç¤¤Ê¤¤¤Î¤Ç¤·¤ç¤¦¤«¡© PL/PgSQL ¤Ï´Ø¿ô¤ÎÆâÍƤò¥¥ã¥Ã¥·¥å¤·¡¢¤½¤ÎÉÔ¹¬¤ÊÉûºîÍѤΤ¿¤á¡¢¤â¤· PL/PgSQL ´Ø¿ô¤¬°ì»þ¥Æ¡¼¥Ö¥ë¤Ë¥¢¥¯¥»¥¹¤¹¤ë¤È¡¢¤½¤Î¥Æ¡¼¥Ö¥ë¤Ï¤¢¤È¤Ç¥É¥í¥Ã¥×¤µ¤ìºÆ ºîÀ®¤µ¤ì¤Þ¤¹¤¬¡¢´Ø¿ô¤¬ºÆ¤Ó¸Æ¤Ó½Ð¤µ¤ì¤ë¤È¡¢¥­ ¥ã¥Ã¥·¥å¤µ¤ì¤Æ¤¤¤ë¤½¤Î´Ø¿ô¤ÎÆâÍƤϤޤÀ¸Å¤¤°ì»þ¥Æ¡¼¥Ö¥ë¤ò°ÍÁ³¤È¤·¤Æ»Ø¤· ¤Æ¤¤¤ë¤«¤é¤Ç¤¹¡£²ò·èºö¤Ï¡¢ PL/PgSQL ¤ÎÃæ¤Ç EXECUTE ¤ò°ì»þ¥Æ¡¼¥Ö¥ë¥¢¥¯¥»¥¹¤Î¤¿¤á¤Ë»È¤¦¤³¤È¤Ç¤¹¡£¤³¤ì¤Ç¡¢Ëè²óÌ䤤¹ç¤ï¤»¤ò¥Ñ ¡¼¥¹¤·Ä¾¤¹¤³¤È¤Ë¤Ê¤ë¤Ç¤·¤ç¤¦¡£ 4.27) ¤É¤Î¤è¤¦¤Ê°Å¹æ²½¥ª¥×¥·¥ç¥ó¤òÍøÍѤǤ¤Þ¤¹¤«? * contrib/pgcrypto¤Ë¤ÏSQLÌ䤤¹ç¤ï¤»¤ÎÃæ¤Ç»È¤¦¤¿¤á¤ÎÂô»³¤Î°Å¹æ²½¤ò´Þ¤ ߤޤ¹¡£ * ¥¯¥é¥¤¥¢¥ó¥È¤È¥µ¡¼¥Ð¤È¤Î´Ö¤ÎÅÁÁ÷¤ò°Å¹æ²½¤¹¤ë¤Ë¤Ï¡¢¥µ¡¼¥Ð¤Ç¤Ïpostgr esql.conf¤Îssl¥ª¥×¥·¥ç¥ó¤òtrue ¤ËÀßÄꤷ¡¢pg_hba.conf¤Ë¤ÏŬÍѤ¹¤ëhost¤¢¤ë¤¤¤Ïhostssl¤Î¹Ô¤¬¤Ê¤¯¤Æ¤Ï ¤Ê¤ê¤Þ¤»¤ó¡£¤½¤·¤Æ¡¢¥¯¥é¥¤¥¢¥ó¥È¤Ç¤Ïsslmode¤òdisable¤Ë¤·¤Æ¤Ï¤Ê¤ê¤Þ ¤»¤ó¡£ (PostgreSQL½ãÀµ¤ÎSSLÀܳ¤Î¤«¤ï¤ê¤Ë¡¢stunnel ¤ä ssh ¥µ¡¼¥É¥Ñ¡¼¥Æ¥£À½¤Î°Å¹æ²½Å¾Á÷¤ò»È¤¦¤³¤È¤â²Äǽ¤Ç¤¢¤ë¤³¤È¤âµ¤·¤Æ¤ª¤­ ¤Þ¤¹¡£) * ¥Ð¡¼¥¸¥ç¥ó7.3 ¤Ç¤Ï¥Ç¡¼¥¿¥Ù¡¼¥¹¥æ¡¼¥¶¤Î¥Ñ¥¹¥ï¡¼¥É¤ÏÊݸ¤µ¤ì¤ë»þ¤Ë¼«Æ°Åª¤Ë°Å¹æ²½¤µ ¤ì¤Þ¤¹¡£ ¤½¤ì¤è¤êÁ°¤Î¥Ð¡¼¥¸¥ç¥ó¤Ç¤Ïpostgresql.confÃæ¤ÇPASSWORD_ENCRYPTION¤ò ͸ú¤Ë¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£ * ¥µ¡¼¥Ð¡¼¤òÁö¤é¤»¤ë¤Î¤Ë°Å¹æ²½¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤ò»È¤¦¤³¤È¤â¤Ç¤¤Þ¤¹¡£ [ÌõÃí ¥ì¥×¥ê¥±¡¼¥·¥ç¥ó´ØÏ¢¤Î¹àÌܤ¬¤Ê¤¯¤Ê¤ê¤Þ¤·¤¿¤¬¡¢ÌõÃí¤Î¤ß»Ä¤·¤Æ¤¢¤ê¤Þ¤¹¡£ Jan Wieck¤µ¤ó¤Ë¤è¤ë¥«¥¹¥±¡¼¥É²Äǽ¤Ê¥Þ¥¹¥¿¡¼¡¦¥¹¥ì¡¼¥Ö·¿¤Î¥ì¥×¥ê¥±¡¼¥·¥ç¥ó Slony-I http://gborg.postgresql.org/project/slony1/projdisplay.php ÀаæãÉפµ¤ó¤Ë¤è¤ë¥³¥Í¥¯¥·¥ç¥ó¥×¡¼¥ë ¥µ¡¼¥Ð PGPool http://www2b.biglobe.ne.jp/~caco/pgpool/ »°Ã«ÆƤµ¤ó¤Ë¤è¤ë¥Þ¥ë¥Á¥Þ¥¹¥¿Êý¼°¤ÎƱ´ü¥ì¥×¥ê¥±¡¼¥·¥ç¥ó PGCluster http://www.csra.co.jp/~mitani/jpug/pgcluster/index.html JPUG ʬ»¶¥È¥é¥ó¥¶¥¯¥·¥ç¥ó³«È¯Ê¬²Ê²ñ¤Ç¤Ï¡¢±Ê°Â¸ç»Ë¤µ¤ó¤¬£²Áꥳ¥ß¥Ã¥È ¤Î¼ÂÁõ¤ò¹Ô¤¤¤Þ¤·¤¿¡£ http://www.postgresql.jp/wg/dt/index.html ] _________________________________________________________________ PostgreSQL¤Î³ÈÄ¥¤Ë¤Ä¤¤¤Æ¤Î¼ÁÌä 5.1) ¼«Ê¬¤Ç½ñ¤¤¤¿¥æ¡¼¥¶ÄêµÁ´Ø¿ô¤ò psql ¤ÎÃæ¤Ç¼Â¹Ô¤¹¤ë¤È¥³¥¢¡¦¥À¥ó¥×¤·¤Æ¤·¤Þ¤¦¤Î¤Ï¤Ê¤¼¤Ç¤¹¤«¡© ÌäÂê¤Ï¿§¡¹¤È¹Í¤¨¤é¤ì¤Þ¤¹¤¬¡¢¤Þ¤ººÇ½é¤Ë¡¢ºîÀ®¤·¤¿¥æ¡¼¥¶ÄêµÁ´Ø¿ô¤òñÆȤΠ¥Æ¥¹¥È¥×¥í¥°¥é¥à¤Ë¤·¤Æ»î¤·¤Æ¤ß¤Æ²¼¤µ¤¤¡£ 5.2) PostgreSQL ÍѤ˽ñ¤¤¤¿¤Á¤ç¤Ã¤ÈÁÇŨ¤Ê¿·¤·¤¤·¿¤ä´Ø¿ô¤òÄ󶡤·¤Æ¥×¥í¥¸¥§¥¯¥È¤Ë¹×¸¥¤·¤¿¤¤¤Î¤ Ǥ¹¤¬¡© ³§¤µ¤ó¤Î¹Ô¤Ê¤Ã¤¿³ÈÄ¥¤ò¡¢pgsql-hackers ¥á¡¼¥ê¥ó¥°¡¦¥ê¥¹¥È¤ËÁ÷¤Ã¤Æ¤¯¤À¤µ¤¤¡£¤½¤·¤Æ¡¢¤æ¤¯¤æ¤¯¤Ï¤½¤¦¤·¤¿³ÈÄ¥¤¬ contrib/ ¥µ¥Ö¥Ç¥£¥ì¥¯¥È¥ê¤ÎÃæ¤ËÆþ¤ë¤³¤È¤Ë¤Ê¤ë¤Ç¤·¤ç¤¦¡£ 5.3) ¥¿¥×¥ë¤òÊÖ¤¹ C¸À¸ì¤Î´Ø¿ô¤Ï¤É¤Î¤è¤¦¤Ë½ñ¤¤Þ¤¹¤«¡© ¥Ð¡¼¥¸¥ç¥ó7.3°Ê¹ß¤ÎPostgreSQL¤Ç¤Ï¡¢¥Æ¡¼¥Ö¥ë¤òÊÖ¤¹´Ø¿ô¤ò C, PL/PgSQL¡¢¤½¤·¤Æ SQL ¤Ë¤Æ´°Á´¤Ë¥µ¥Ý¡¼¥È¤·¤Þ¤¹¡£¾Ü¤·¤¯¤Ï¥×¥í¥°¥é¥Þ¥¬¥¤¥É¤Î¾ðÊó¤ò¸«¤Æ¤¯¤À¤µ¤¤ ¡£C¤ÇÄêµÁ¤µ¤ì¤¿É½¤òÊÖ¤¹´Ø¿ô¤ÎÎãÂ꤬contrib/tablefunc¤ÎÃæ¤Ë¤¢¤ê¤Þ¤¹¡£ 5.4) ¥½¡¼¥¹¡¦¥Õ¥¡¥¤¥ë¤òÊѹ¹¤·¤Þ¤·¤¿¡£ºÆ¥³¥ó¥Ñ¥¤¥ë¤·¤Æ¤âÊѲ½¤¬¸«¤é¤ì¤Ê¤¤¤Î¤Ï¤Ê¤¼¤ Ǥ¹¤«¡© ¤¤¤¯¤Ä¤«¤Î Makefile ¤¬¥¤¥ó¥¯¥ë¡¼¥É¡¦¥Õ¥¡¥¤¥ë¤ËÂФ·¤ÆŬÀڤʰ͸´Ø·¸¤ò»ý¤Ã¤Æ¤¤¤Þ¤»¤ó¡£make clean ¤ò¤·¤Æ¤«¤é¤â¤¦°ìÅÙ make ¤ò¹Ô¤Ê¤ï¤Ê¤¯¤Æ¤Ï¤Ê¤ê¤Þ¤»¤ó¡£¤â¤·¡¢GCC ¤ò¤ª»È¤¤¤Ç¤¢¤ì¤Ð configure ¤Î --enable-depend ¥ª¥×¥·¥ç¥ó¤ò»È¤Ã¤Æ¡¢¥³¥ó¥Ñ¥¤¥é¤Ë°Í¸´Ø·¸¤ò¼«Æ°Åª¤ËÄ´¤Ù¤µ¤»¤ë¤³¤È¤â¤Ç¤­ ¤Þ¤¹¡£ _________________________________________________________________ [ÌõÃí¡§ ÆüËܸìÈǤÎÀ½ºî¤Ë¤Ä¤¤¤Æ¤Ï°Ê²¼¤ÎÄ̤ê¤Ç¤¹¡£ ºÇ½ª¹¹¿·Æü: 2005ǯ01·î12Æü ËÝÌõ¼Ô: ·¬Â¼ ½á (Jun Kuwamura ) ¤³¤ÎFAQ¤ÎÏÂÌõ¤ÎºîÀ®¤Ë¤¢¤¿¤ê¶¨ÎϤò¤·¤Æ¤¯¤À¤µ¤Ã¤¿Êý¡¹(·É¾Î¤Ïά¤µ¤»¤Æ¤¤¤¿¤À¤¤Þ¤¹): ÅÄÃç Ì(Minoru TANAKA ) Àаæ ãÉ×(Tatsuo ISHII ) óîÆ£ ÃοÍ(Tomohito SAITOH ) ÇϾì È¥(Hajime BABA ) ²¬ËÜ °ì¹¬(Kazuyuki OKAMOTO ) ¾®¿û ¾¼°ì(Shoichi Kosuge ) »³²¼ µÁÇ·(Yoshiyuki YAMASHITA ) ¶ ¿¿ÂÀϺ(Sintaro SAKAI ) À¸±Û ¾»¸Ê(Masami OGOSHI ) ÀÐÀî ½Ó¹Ô(Toshiyuki ISHIKAWA ) ËÜÅÄ Ìй(Shigehiro HONDA ) ¤»¤» ¤¸¤å¤ó(Jun SESE ) ¿Àë ±Ñ¹§(Hidetaka KAMIYA ) ¿û¸¶ ÆØ(Atsushi SUGAWARA ) °ðÍÕ ¹áÍý(Kaori Inaba ) Àаæ ãÉ×(Tatsuo Ishii ) ¤ò¤Ï¤¸¤á¡¢¥Ý¥¹¥È¥°¥ì¥¹¤Ë´Ø¤¹¤ëÏÃÂêËÉÙ¤ÊÆüËܸì¥Ý¥¹¥È¥°¥ì¥¹¡¦¥á¡¼¥ê¥ó¥°¥ê¥¹¥È¡¢ ÏÂÌõ¤Î¤¤Ã¤«¤±¤òºî¤Ã¤Æ¤¯¤ì¤¿ JF(Linux Japanese FAQ Mailing List)¥×¥í¥¸¥§¥¯¥È¡¢FreeBSD ¥É¥¥å¥á¥ó¥Æ¡¼¥·¥ç¥ó¥×¥í¥¸¥§¥¯¥È¡¢ ¤½¤Î¾¡¢Ä¾Àܤ¢¤ë¤¤¤Ï´ÖÀÜŪ¤Ë¤«¤«¤ï¤Ã¤Æ¤¤¤ë¤¹¤Ù¤Æ¤Î¥ª¡¼¥×¥ó¥½¡¼¥¹¥³¥ß¥å¥Ë¥Æ¥£¡¼¤Î³§¤µ¤ó¤Ë´¶¼Õ¤·¤Þ¤¹¡£ ÆüËܸìÈǤΤ³¤Îʸ½ñ¤Ï¡¢°Ê²¼¤«¤é¤â¤¿¤É¤ì¤Þ¤¹¡£ http://www.rccm.co.jp/~juk/pgsql/(FAQÏÂÌõ PostgreSQL ¤Ë¤Ä¤¤¤Æ¤è¤¯¤¢¤ë¼ÁÌä) http://www.PostgreSQL.jp/wg/jpugdoc/JPUGʸ½ñ¡¦½ñÀÒ´ØϢʬ²Ê²ñ http://www.linux.or.jp/JF/Linux JF¥×¥í¥¸¥§¥¯¥È ¤Ê¤ª¡¢¤³¤ÎÏÂÌõ¤Ë´Ø¤¹¤ë¤´°Õ¸«¤Ï(juk at PostgreSQL.jp)¤Þ¤Ç¤ª´ó¤»²¼¤µ¤¤¡£ ]