PostgreSQL(¥Ý¥¹¥È¥°¥ì¥¹¡¦¥¥å¡¼¡¦¥¨¥ë)¤Ë¤Ä¤¤¤Æ¤è¤¯¤¢¤ë¼ÁÌä¤È¤½¤Î²òÅú(FAQ)
-¸¶Ê¸ºÇ½ª¹¹¿·Æü: Mon Mar 18 14:34:57 EST 2002
+¸¶Ê¸ºÇ½ª¹¹¿·Æü: Fri Apr 26 23:03:46 EDT 2002
¸½ºß¤Î°Ý»ý´ÉÍý¼Ô: Bruce Momjian (pgman@candle.pha.pa.us)
Maintainer of Japanese Translation: Jun Kuwamura (juk@postgresql.jp)
Áàºî¾å¤Î¼ÁÌä
4.1) ¥Ð¥¤¥Ê¥ê¡¦¥«¡¼¥½¥ë¤ÈÄ̾參¡¼¥½¥ë¤È¤Î°ã¤¤¤Ï²¿¤Ç¤¹¤«¡©
-4.2) ºÇ½é¤Î¿ô¹Ô¤Î¤ß¤ò select ¤¹¤ë¤Ë¤Ï¤É¤¦¤·¤Þ¤¹¤«¡©
+4.2) ºÇ½é¤Î¿ô¥í¥¦¤Î¤ß¤ò select ¤¹¤ë¤Ë¤Ï¤É¤¦¤·¤Þ¤¹¤«¡©
4.3) ¥Æ¡¼¥Ö¥ë¤ä¤½¤Î¾¤Î¾ðÊó¤Î¥ê¥¹¥È¤ò psql ¤Ç¸«¤ë¤Ë¤Ï¤É¤¦¤·¤Þ¤¹¤«¡©
-4.4) ¥Æ¡¼¥Ö¥ë¤«¤éÎó¤Îºï½ü¤Ï¤É¤Î¤è¤¦¤Ë¤·¤Þ¤¹¤«¡©
-4.5) ¹Ô¡¢¥Æ¡¼¥Ö¥ë¡¢¥Ç¡¼¥¿¥Ù¡¼¥¹¤ÎºÇÂ祵¥¤¥º¤Ï¡©
+4.4) ¥Æ¡¼¥Ö¥ë¤«¤é¥«¥é¥à¤Îºï½ü¤Ï¤É¤Î¤è¤¦¤Ë¤·¤Þ¤¹¤«¡©
+4.5) ¥í¥¦¡¢¥Æ¡¼¥Ö¥ë¡¢¥Ç¡¼¥¿¥Ù¡¼¥¹¤ÎºÇÂ祵¥¤¥º¤Ï¡©
4.6) °ìÈÌŪ¤Ê¥Æ¥¥¹¥È¥Õ¥¡¥¤¥ë¤«¤é¥Ç¡¼¥¿¤òÊݸ¤¹¤ë¤Ë¤Ï¡¢¥Ç¡¼¥¿¥Ù¡¼¥¹¤Î¥Ç¥£¥¹¥¯ÍÆ
Î̤ϤɤΤ¯¤é¤¤É¬ÍפǤ¹¤«¡©
-4.7) ¥Ç¡¼¥¿¥Ù¡¼¥¹Æâ¤ËÄêµÁ¤µ¤ì¤¿¥Æ¡¼¥Ö¥ë¤ä¥¤¥ó¥Ç¥Ã¥¯¥¹¤ò¤É¤Î¤è¤¦¤Ë¤·¤Æ¸«¤Ä¤±½Ð¤·
-¤Þ¤¹¤«¡©
+4.7) ÄêµÁ¤µ¤ì¤¿¥Æ¡¼¥Ö¥ë¡¢¥¤¥ó¥Ç¥Ã¥¯¥¹¡¢¥Ç¡¼¥¿¥Ù¡¼¥¹¡¢¤ª¤è¤Ó¡¢¥æ¡¼¥¶¤ò¤É¤Î¤è¤¦¤Ë
+¤·¤Æ¸«¤Ä¤±½Ð¤·¤Þ¤¹¤«¡©
4.8) Ì䤤¹ç¤ï¤»¤¬ÃÙ¤¤¤¦¤¨¡¢¥¤¥ó¥Ç¥Ã¥¯¥¹¤ò»È¤Ã¤Æ¤¤¤ëÍͻҤ¬¤¢¤ê¤Þ¤»¤ó¡£¤Ê¤¼¤Ç¤¹¤«
¡©
4.9) Ì䤤¹ç¤ï¤»¥ª¥Ö¥Æ¥£¥Þ¥¤¥¶¤¬¤É¤Î¤è¤¦¤ËÌ䤤¹ç¤ï¤»¤òɾ²Á¤¹¤ë¤«¤ò¸«¤ë¤Ë¤Ï¤É¤¦¤·
4.19) ¤É¤Î¥Ð¡¼¥¸¥ç¥ó¤Î PostgreSQL ¤òÁö¤é¤»¤Æ¤¤¤ë¤Î¤«¤òÄ´¤Ù¤ë¤Ë¤Ï¤É¤¦¤·¤Þ¤¹¤«¡©
4.20) ¥é¡¼¥¸¥ª¥Ö¥¸¥§¥¯¥È¤ÎÁàºî¤Ç¡¢invalid large obj descriptor¤È½Ð¤ë¤Î¤Ï¤Ê¤¼¤Ç
¤¹¤«¡©
-4.21) ¸½ºß¤Î»þ¹ï¤¬¥Ç¥Õ¥©¥ë¥È¤È¤Ê¤ë¤è¤¦¤ÊÎó¤Ï¤É¤Î¤è¤¦¤Ë¤Ä¤¯¤ê¤Þ¤¹¤«¡©
+4.21) ¸½ºß¤Î»þ¹ï¤¬¥Ç¥Õ¥©¥ë¥È¤È¤Ê¤ë¤è¤¦¤Ê¥«¥é¥à¤Ï¤É¤Î¤è¤¦¤Ë¤Ä¤¯¤ê¤Þ¤¹¤«¡©
4.22) ¤Ê¤¼¡¢IN¤ò»È¤¦ÉûÌ䤤¹ç¤ï¤»¤¬¤È¤Æ¤âÃÙ¤¤¤Î¤Ç¤¹¤«¡©
4.23) ³°Éô·ë¹ç(outer join)¤Ï¤É¤Î¤è¤¦¤Ë¼Â¸½¤·¤Þ¤¹¤«?
4.24) Ê£¿ô¤Î¥Ç¡¼¥¿¥Ù¡¼¥¹¤ò»È¤¦Ì䤤¹ç¤ï¤»¤Ï¤É¤Î¤è¤¦¤Ë¤¹¤ì¤Ð¤Ç¤¤Þ¤¹¤«¡©
+4.25) ´Ø¿ô¤ÇÊ£¿ô¤Î¥í¥¦¤Þ¤¿¤Ï¥«¥é¥à¤òÊÖ¤¹¤Ë¤Ï¤É¤¦¤·¤Þ¤¹¤«¡©
PostgreSQL¤Î³ÈÄ¥¤Ë¤Ä¤¤¤Æ¤Î¼ÁÌä
²¿¤È¤¤¤¦´Ø¿ô¤¬¤É¤Î¤¯¤é¤¤¼Â¹Ô»þ´Ö¤ò¿©¤Ã¤Æ¤¤¤ë¤«¤ò¸«¤ë¤¿¤á¤Ë¡¢¥×¥í¥Õ¥¡¥¤¥ê¥ó¥°¡Ê
¥×¥í¥Õ¥£¡¼¥ëÉÕ¤¡Ë¤Ç¥³¥ó¥Ñ¥¤¥ë¤¹¤ë¤³¤È¤â²Äǽ¤Ç¤¹¡£¤½¤Î¥Ð¥Ã¥¯¥¨¥ó¥É¤Î¥×¥í¥Õ¥£¡¼
¥ë¡¦¥Õ¥¡¥¤¥ë¤Ï pgsql/data/base/dbname ¥Ç¥£¥ì¥¯¥È¥ê¤Ë³ÊǼ¤µ¤ì¤ë¤Ç¤·¤ç¤¦¡£¥¯¥é¥¤
-¥¢¥ó¥È¤Î¥×¥í¥Õ¥£¡¼¥ë¤Ï¥¯¥é¥¤¥¢¥ó¥È¤Î¸½¹Ô¥Ç¥£¥ì¥¯¥È¥ê¤ËÃÖ¤«¤ì¤ë¤Ç¤·¤ç¤¦¡£
+¥¢¥ó¥È¤Î¥×¥í¥Õ¥£¡¼¥ë¤Ï¥¯¥é¥¤¥¢¥ó¥È¤Î¸½¹Ô¥Ç¥£¥ì¥¯¥È¥ê¤ËÃÖ¤«¤ì¤ë¤Ç¤·¤ç¤¦¡£Linux
+¤Ç¤Þ¤È¤â¤Ê¥×¥í¥Õ¥¡¥¤¥ê¥ó¥°¤ò¹Ô¤¦¤Ë¤Ï -DLINUX_PROFILE ¤Ç¥³¥ó¥Ñ¥¤¥ë¤¹¤ëɬÍפ¬¤¢¤ê
+¤Þ¤¹¡£
3.8) Àܳ¤·¤è¤¦¤È¤¹¤ë¤È¤¤Ë 'Sorry, too many clients' ¤¬½Ð¤ë¤Î¤Ï¤Ê¤¼¤Ç¤¹¤«¡©
¾Ü½Ò¤Ï¡¢¥ª¥ó¥é¥¤¥ó¥Þ¥Ë¥å¥¢¥ë¤Ç DECLARE ¤ò¸«¤Æ²¼¤µ¤¤¡£
-4.2) ºÇ½é¤Î¿ô¹Ô¤Î¤ß¤ò SELECT ¤¹¤ë¤Ë¤Ï¤É¤¦¤·¤Þ¤¹¤«¡©
+4.2) ºÇ½é¤Î¿ô¥í¥¦¤Î¤ß¤ò SELECT ¤¹¤ë¤Ë¤Ï¤É¤¦¤·¤Þ¤¹¤«¡©
¥ª¥ó¥é¥¤¥ó¥Þ¥Ë¥å¥¢¥ë¤ÇFETCH¤ò¸«¤Æ¤¯¤À¤µ¤¤¡£¤¢¤ë¤¤¤Ï¡¢SELECT ... LIMIT....¤ò»È¤Ã
¤Æ¤ß¤Æ²¼¤µ¤¤¡£
-¤¿¤È¤¨¡¢Íߤ·¤¤¤Î¤ÏºÇ½é¤Î¿ô¹Ô¤À¤±¤Ç¤â¡¢¤¹¤Ù¤Æ¤ÎÌ䤤¹ç¤ï¤»¤òɾ²Á¤·¤Ê¤¯¤Æ¤Ï¤Ê¤é¤Ê
-¤¤¤«¤â¤·¤ì¤Þ¤»¤ó¡£ORDER BY ¤ò»ý¤Ã¤¿Ì䤤¹ç¤ï¤»¤ò¹Í¤¨¤Æ¤ß¤Æ²¼¤µ¤¤¡£¤â¤·¡¢ORDER BY
-¤Ë¹ç¤Ã¤¿¥¤¥ó¥Ç¥Ã¥¯¥¹¤¬¤¢¤ë¤È¤¹¤ë¤È PostgreSQL¤ÏÍ׵ᤵ¤ì¤¿ºÇ½é¤Î¿ô¹Ô¤À¤±¤Çɾ²Á¤Ç
-¤¤ë¤«¤â¤·¤ì¤Þ¤»¤ó¤¬¡¢¤Ç¤Ê¤ì¤Ð¡¢PostgreSQL ¤Ï°Õ¿Þ¤·¤¿¹Ô¤¬À¸À®¤µ¤ì¤ë¤Þ¤Ç¤¹¤Ù¤Æ¤Î
-¹Ô¤òɾ²Á¤·¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¤«¤â¤·¤ì¤Þ¤»¤ó¡£
+¤¿¤È¤¨¡¢Íߤ·¤¤¤Î¤ÏºÇ½é¤Î¿ô¥í¥¦¤À¤±¤Ç¤â¡¢¤¹¤Ù¤Æ¤ÎÌ䤤¹ç¤ï¤»¤òɾ²Á¤·¤Ê¤¯¤Æ¤Ï¤Ê¤é
+¤Ê¤¤¤«¤â¤·¤ì¤Þ¤»¤ó¡£ORDER BY ¤ò»ý¤Ã¤¿Ì䤤¹ç¤ï¤»¤ò¹Í¤¨¤Æ¤ß¤Æ²¼¤µ¤¤¡£¤â¤·¡¢ORDER
+BY¤Ë¹ç¤Ã¤¿¥¤¥ó¥Ç¥Ã¥¯¥¹¤¬¤¢¤ë¤È¤¹¤ë¤È PostgreSQL¤ÏÍ׵ᤵ¤ì¤¿ºÇ½é¤Î¿ô¥í¥¦¤À¤±¤Çɾ
+²Á¤Ç¤¤ë¤«¤â¤·¤ì¤Þ¤»¤ó¤¬¡¢¤Ç¤Ê¤ì¤Ð¡¢PostgreSQL ¤Ï°Õ¿Þ¤·¤¿¥í¥¦¤¬À¸À®¤µ¤ì¤ë¤Þ¤Ç¤¹
+¤Ù¤Æ¤Î¥í¥¦¤òɾ²Á¤·¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¤«¤â¤·¤ì¤Þ¤»¤ó¡£
4.3) ¥Æ¡¼¥Ö¥ë¤ä¤½¤Î¾¤Î¾ðÊó¤Î¥ê¥¹¥È¤ò psql ¤Ç¸«¤ë¤Ë¤Ï¤É¤¦¤·¤Þ¤¹¤«¡©
¥³¥Þ¥ó¥É¤¬´Þ¤Þ¤ì¤Æ¤¤¤Þ¤¹¡£ psql ¤Ë -E ¥ª¥×¥·¥ç¥ó¤ò¤Ä¤±¤Æµ¯Æ°¤¹¤ì¤Ð¡¢Í¿¤¨¤¿¥³¥Þ
¥ó¥É¤ò¼Â¹Ô¤¹¤ë¤¿¤á¤ÎÌ䤤¹ç¤ï¤»¤¬½ÐÎϤµ¤ì¤Þ¤¹¡£
-4.4) ¥Æ¡¼¥Ö¥ë¤«¤éÎó¤Îºï½ü¤Ï¤É¤Î¤è¤¦¤Ë¤·¤Þ¤¹¤«¡©
+4.4) ¥Æ¡¼¥Ö¥ë¤«¤é¥«¥é¥à¤Îºï½ü¤Ï¤É¤Î¤è¤¦¤Ë¤·¤Þ¤¹¤«¡©
ALTER TABLE DROP COLUMN ¤Ï¥µ¥Ý¡¼¥È¤·¤Æ¤¤¤Þ¤»¤ó¤¬¡¢¤½¤ÎÂå¤ï¤ê¤Ë¤³¤¦¤·¤Þ¤¹:
- SELECT ... -- ºï½ü¤·¤¿¤¤Îó°Ê³°¤ÎÎó¤ò¤¹¤Ù¤ÆÁªÂò¤·¤Þ¤¹¡£
+ 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;
-[ÌõÃí¡§Îó¤ÎÄÉ²Ã¤Ï ALTER TABLE ADD COLUMN ¤Ç¹Ô¤¨¤Þ¤¹¡£]
+ COMMIT;
+[ÌõÃí¡§¥«¥é¥à¤ÎÄÉ²Ã¤Ï ALTER TABLE ADD COLUMN ¤Ç¹Ô¤¨¤Þ¤¹¡£]
-4.5) ¹Ô¡¢¥Æ¡¼¥Ö¥ë¡¢¥Ç¡¼¥¿¥Ù¡¼¥¹¤ÎºÇÂ祵¥¤¥º¤Ï¡©
+4.5) ¥í¥¦¡¢¥Æ¡¼¥Ö¥ë¡¢¥Ç¡¼¥¿¥Ù¡¼¥¹¤ÎºÇÂ祵¥¤¥º¤Ï¡©
À©¸Â¤Ï°Ê²¼¤Î¤È¤ª¤ê¤Ç¤¹¡£
¥Ç¡¼¥¿¥Ù¡¼¥¹¤ÎºÇÂ祵¥¤¥º? À©¸Â̵¤· (500GB ¤Î¥Ç¡¼¥¿¥Ù¡¼¥¹¤â¸ºß¤·¤Þ¤¹)
¥Æ¡¼¥Ö¥ë¤ÎºÇÂ祵¥¤¥º? 16TB
-¹Ô¤ÎºÇÂ祵¥¤¥º? 7.1°Ê¹ß¤ÇÀ©¸Â̵¤·
+¥í¥¦¤ÎºÇÂ祵¥¤¥º? 7.1°Ê¹ß¤ÇÀ©¸Â̵¤·
¥Õ¥£¡¼¥ë¥É¤ÎºÇÂ祵¥¤¥º? 7.1°Ê¹ß¤Ç1GB
¥Æ¡¼¥Ö¥ëÆâ¤Ç¤ÎºÇÂç¥í¥¦¿ô? À©¸Â̵¤·
¥Æ¡¼¥Ö¥ëÆâ¤Ç¤ÎºÇÂ祫¥é¥à¿ô? ¥«¥é¥à¤Î·¿¤Ë¤è¤ê250-1600
¤¦¡£¥Æ¥¥¹¥È¤Îʸ»úÎó¤ÎÊ¿¶ÑŤµ¤ò20¥Ð¥¤¥È¤È²¾Äꤹ¤ë¤È¡¢¥Õ¥é¥Ã¥È¥Õ¥¡¥¤¥ë¤ÎÂ礤µ
¤ÏÌó2.8MB ¤Ç¤¹¡£¤³¤Î¥Ç¡¼¥¿¤ò´Þ¤à PostgreSQL ¥Ç¡¼¥¿¥Ù¡¼¥¹¥Õ¥¡¥¤¥ë¤ÎÂ礤µ¤Ï¼¡¤Î
¤è¤¦¤ËÌó6.4MB¤È¸«ÀѤâ¤ë¤³¤È¤¬¤Ç¤¤Þ¤¹¡§
- 36 bytes: ³Æ¹Ô¤Î¥Ø¥Ã¥À(³µ»»)
+ 36 bytes: ³Æ¥í¥¦¤Î¥Ø¥Ã¥À(³µ»»)
24 bytes: À°¿ô(int)¥Õ¥£¡¼¥ë¥É¤È¥Æ¥¥¹¥È(text)¥Õ¥£¡¼¥ë¥É
+ 4 bytes: ¥Ú¡¼¥¸¾å¤Î¥¿¥Ã¥×¥ë¤Ø¤Î¥Ý¥¤¥ó¥¿
----------------------------------------
¥¤¥ó¥Ç¥Ã¥¯¥¹¤Ï¡¢¤³¤ì¤Û¤É¤Î¥ª¡¼¥Ð¥Ø¥Ã¥É¤ÏÍ׵ᤷ¤Þ¤»¤ó¤¬¡¢¥¤¥ó¥Ç¥Ã¥¯¥¹ÉÕ¤±¤µ¤ì¤ë
¥Ç¡¼¥¿¤ò´Þ¤à°Ê¾å¡¢¤½¤ì¤Ê¤ê¤ËÂ礤¯¤Ê¤ê¤Þ¤¹¡£
-4.7) ¥Ç¡¼¥¿¥Ù¡¼¥¹Æâ¤ËÄêµÁ¤µ¤ì¤¿¥Æ¡¼¥Ö¥ë¤ä¥¤¥ó¥Ç¥Ã¥¯¥¹¤ò¤É¤Î¤è¤¦¤Ë¤·¤Æ¸«¤Ä¤±½Ð¤·
-¤Þ¤¹¤«¡©
+4.7) ÄêµÁ¤µ¤ì¤¿¥Æ¡¼¥Ö¥ë¡¢¥¤¥ó¥Ç¥Ã¥¯¥¹¡¢¥Ç¡¼¥¿¥Ù¡¼¥¹¡¢¤ª¤è¤Ó¡¢¥æ¡¼¥¶¤ò¤É¤Î¤è¤¦¤Ë
+¤·¤Æ¸«¤Ä¤±½Ð¤·¤Þ¤¹¤«¡©
psql ¤Ë¤Ï¤¤¤í¤¤¤í¤Ê¥Ð¥Ã¥¯¥¹¥é¥Ã¥·¥å¡¦¥³¥Þ¥ó¥É¤¬¤¢¤ê¡¢¤³¤¦¤·¤¿¾ðÊó¤òɽ¼¨¤·¤Þ¤¹¡£
¥Ð¥Ã¥¯¥¹¥é¥Ã¥·¥å¡¦¥³¥Þ¥ó¥É¤Î¼ïÎà¤ò¸«¤ë¤Ë¤Ï \? ¤ò»È¤Ã¤Æ²¼¤µ¤¤¡£
¤Þ¤¿¡¢pgsql/src/tutorial/syscat.source ¥Õ¥¡¥¤¥ë¤òÁö¤é¤»¤Æ¤ß¤Æ²¼¤µ¤¤¡£¤½¤ì¤Ï¡¢Âô
»³¤Î SELECT ʸ¤Ë¤è¤êɬÍפʾðÊó¤ò¥Ç¡¼¥¿¥Ù¡¼¥¹¤Î¥·¥¹¥Æ¥à¡¦¥Æ¡¼¥Ö¥ë¤«¤é¼è¤ê½Ð¤·¤Æ
-Î㼨¤·¤Æ¤¯¤ì¤Þ¤¹¡£
+Î㼨¤·¤Æ¤¯¤ì¤Þ¤¹¡£¤Þ¤¿¡¢pg_ ¤Ç»Ï¤Þ¤ë¥·¥¹¥Æ¥à¥Æ¡¼¥Ö¥ë¤Ë¤âµ½Ò¤µ¤ì¤Æ¤¤¤Þ¤¹¡£¤µ¤é
+¤Ë¡¢psql -l ¤Ï¤¹¤Ù¤Æ¤Î¥Ç¡¼¥¿¥Ù¡¼¥¹¤ò¥ê¥¹¥Èɽ¼¨¤·¤Þ¤¹¡£
4.8) Ì䤤¹ç¤ï¤»¤¬ÃÙ¤¤¤¦¤¨¡¢¥¤¥ó¥Ç¥Ã¥¯¥¹¤ò»È¤Ã¤Æ¤¤¤ëÍͻҤ¬¤¢¤ê¤Þ¤»¤ó¡£¤Ê¤¼¤Ç¤¹¤«
¡©
¥¤¥ó¥Ç¥Ã¥¯¥¹¤Ï¼«Æ°Åª¤Ë¤¹¤Ù¤Æ¤ÎÌ䤤¹ç¤ï¤»¤Ç»È¤ï¤ì¤ë¤ï¤±¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£¥Æ¡¼¥Ö¥ë
-¤¬ºÇ¾®¥µ¥¤¥º¤è¤êÂ礤¯¡¢Ì䤤¹ç¤ï¤»¤Ç¤½¤Î¤ï¤º¤«¤Ê¥Ñ¡¼¥»¥ó¥Æ¡¼¥¸¤Î¹Ô¤òÁªÂò¤¹¤ë»þ
-¤À¤±¡¢¥¤¥ó¥Ç¥Ã¥¯¥¹¤Ï»È¤ï¤ì¤Þ¤¹¡£¤³¤ì¤Ï¥¤¥ó¥Ç¥Ã¥¯¥¹¥¹¥¥ã¥ó¤Ë¤è¤êµ¯¤³¤µ¤ì¤ë¥é¥ó
-¥À¥à¤Ê¥Ç¥£¥¹¥¯¥¢¥¯¥»¥¹¤Ï¡¢¥Æ¡¼¥Ö¥ë¤ò¥¹¥È¥ì¡¼¥È¤ËÆɤà½ç¼¡Áöºº¤è¤ê¤âÃÙ¤¯¤Ê¤ë¤³¤È
-¤¬¤È¤¤É¤¤¢¤ë¤«¤é¤Ç¤¹¡£
+¤¬ºÇ¾®¥µ¥¤¥º¤è¤êÂ礤¯¡¢Ì䤤¹ç¤ï¤»¤Ç¤½¤Î¤ï¤º¤«¤Ê¥Ñ¡¼¥»¥ó¥Æ¡¼¥¸¤Î¥í¥¦¤òÁªÂò¤¹¤ë
+»þ¤À¤±¡¢¥¤¥ó¥Ç¥Ã¥¯¥¹¤Ï»È¤ï¤ì¤Þ¤¹¡£¤³¤ì¤Ï¥¤¥ó¥Ç¥Ã¥¯¥¹¥¹¥¥ã¥ó¤Ë¤è¤êµ¯¤³¤µ¤ì¤ë¥é
+¥ó¥À¥à¤Ê¥Ç¥£¥¹¥¯¥¢¥¯¥»¥¹¤Ï¡¢¥Æ¡¼¥Ö¥ë¤ò¥¹¥È¥ì¡¼¥È¤ËÆɤà½ç¼¡Áöºº¤è¤ê¤âÃÙ¤¯¤Ê¤ë¤³
+¤Ȥ¬¤È¤¤É¤¤¢¤ë¤«¤é¤Ç¤¹¡£
¥¤¥ó¥Ç¥Ã¥¯¥¹¤ò»È¤¦¤«¤ò·èÄꤹ¤ë¤¿¤á¤Ë¡¢PostgreSQL ¤Ï¥Æ¡¼¥Ö¥ë¤Ë¤Ä¤¤¤Æ¤ÎÅý·×¾ðÊó¤ò
»ý¤¿¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó¡£¤³¤ÎÅý·×¾ðÊó¤Ï¡¢VACUUM ANALYZE¤Þ¤¿¤Ï¡¢Ã±¤Ë ANALYZE ¤ò»È
-¤Ã¤Æ¼ý½¸¤¹¤ë¤³¤È¤¬¤Ç¤¤Þ¤¹¡£Åý·×¾ðÊó¤ò»È¤Ã¤Æ¥ª¥Ö¥Æ¥£¥Þ¥¤¥¶¤Ï¥Æ¡¼¥Ö¥ë¤ÎÃæ¤Ë²¿¹Ô
-¤¢¤ë¤«¤òÃΤꡢ¥¤¥ó¥Ç¥Ã¥¯¥¹¤ò»È¤¦¤Ù¤¤«¤Î¤Î·èÄê¤ò¤è¤êÀµ¤·¤¯¤Ç¤¤Þ¤¹¡£Åý·×¾ðÊó¤Ï
+¤Ã¤Æ¼ý½¸¤¹¤ë¤³¤È¤¬¤Ç¤¤Þ¤¹¡£Åý·×¾ðÊó¤ò»È¤Ã¤Æ¥ª¥Ö¥Æ¥£¥Þ¥¤¥¶¤Ï¥Æ¡¼¥Ö¥ë¤ÎÃæ¤Ë¤¢¤ë
+¥í¥¦¿ô¤òÃΤꡢ¥¤¥ó¥Ç¥Ã¥¯¥¹¤ò»È¤¦¤Ù¤¤«¤Î¤Î·èÄê¤ò¤è¤êÀµ¤·¤¯¤Ç¤¤Þ¤¹¡£Åý·×¾ðÊó¤Ï
ºÇŬ¤Ê·ë¹ç½ç¤ä·ë¹çÊýË¡¤ò·è¤á¤ë¾å¤Ç¤âµ®½Å¤Ê¤â¤Î¤â¤¢¤ê¤Þ¤¹¡£Åý·×¾ðÊó¤Î¼ý½¸¤Ï¡¢¥Æ
¡¼¥Ö¥ë¤ÎÆâÍƤ¬¤«¤ï¤ë¤ÈËè¤Ë·«ÊÖ¤·¤Ê¤µ¤ì¤ë¤Ù¤¤Ç¤¹¡£
"char" char 1 character
CHAR(#) bpchar »ØÄꤵ¤ì¤¿¸ÇÄêĹ¤È¤Ê¤ë¤è¤¦¤Ë¶õÇò¤¬µÍ¤á¤é¤ì¤ë
VARCHAR(#) varchar Ťµ¤Î¾å¸Â¤Î̵¤¤¥Æ¥¥¹¥È
-TEXT text Ťµ¤ÎÀ©¸Â¤ÏºÇÂç¹ÔŤˤè¤ë
+TEXT text Ťµ¤ÎÀ©¸Â¤ÏºÇÂç¥í¥¦Ä¹¤Ë¤è¤ë
BYTEA bytea ²ÄÊÑĹ¤Î¥Ð¥¤¥ÈÇÛÎó(null-byte safe)
ÆâÉô̾¤Ë¤ªÌܤˤ«¤«¤ë¤Î¤Ï¡¢¥·¥¹¥Æ¥à¡¦¥«¥¿¥í¥°¤òÄ´¤Ù¤ë¤È¤¤ä¡¢¥¨¥é¡¼¥á¥Ã¥»¡¼¥¸¤ò
¾åµ¤Î·¿¤Î¤¦¤Á¸å¤Î£´¤Ä¤Î·¿¤Ï "varlena" ·¿¤Ç¤¹(¤¹¤Ê¤ï¤Á¡¢¥Ç¥£¥¹¥¯¤ÎºÇ½é¤Î£´¥Ð¥¤
¥È¤¬¥Ç¡¼¥¿Ä¹¤Ç¡¢¤½¤ì¤Î¸å¤Ë¼ÂºÝ¤Î¥Ç¡¼¥¿¤¬Â³¤¤Þ¤¹)¡£¤³¤Î¤è¤¦¤Ë¼ÂºÝ¤Î¶õ´Ö¤ÏÀë¸À¤µ
¤ì¤¿Â礤µ¤è¤ê¤â¾¯¤·Â礤¯¤Ê¤ê¤Þ¤¹¡£¤·¤«¤·¡¢¤³¤ì¤é¤Î¥Ç¡¼¥¿·¿¤ÏTOAST¤Ë¤è¤ê°µ½Ì¤µ
-¤ì¤¿¤êÊ£¿ô¹Ô¤ËÅϤäÆÊݸ¤µ¤ì¤¿¤ê¤·¤Æ¡¢¥Ç¥£¥¹¥¯¾å¤Î¶õ´Ö¤Ï»×¤Ã¤¿¤è¤ê¾®¤µ¤¯¤Ê¤ê¤Þ
-¤¹¡£
+¤ì¤¿¤êÊ£¿ô¥í¥¦¤ËÅϤäÆÊݸ¤µ¤ì¤¿¤ê¤·¤Æ¡¢¥Ç¥£¥¹¥¯¾å¤Î¶õ´Ö¤Ï»×¤Ã¤¿¤è¤ê¾®¤µ¤¯¤Ê¤ê
+¤ޤ¹¡£
CHAR()¤Ï¤¤¤Ä¤âŤµ¤¬Æ±¤¸Ê¸»úÎó¤òÊݸ¤¹¤ë¤Î¤ËºÇŬ¤Ç¤¹¡£VARCHAR() ¤Ï²ÄÊÑŤÎʸ»ú
Îó¤òÊݸ¤¹¤ë¤Î¤ËºÇŬ¤Ç¤¹¤¬¡¢Êݸ¤Ç¤¤ëʸ»úÎó¤ÎŤµ¤ËÀ©¸Â¤¬¤¢¤ê¤Þ¤¹¡£TEXT ¤ÏŤµ
4.15.1) ÄÌÈÖ(serial)¡¿¼«Æ°Áýʬ¥Õ¥£¡¼¥ë¥É¤Ï¤É¤Î¤è¤¦¤Ë¤Ä¤¯¤ê¤Þ¤¹¤«¡©
-PostgreSQL ¤Ï SERIAL ¥Ç¡¼¥¿·¿¤ò¥µ¥Ý¡¼¥È¤·¤Þ¤¹¡£Îó¾å¤ËÄÌÈ֤ȥ¤¥ó¥Ç¥Ã¥¯¥¹¤ò¼«Æ°ºî
-À®¤·¤Þ¤¹¡£¤¿¤È¤¨¤Ð¡¢
+PostgreSQL ¤Ï SERIAL ¥Ç¡¼¥¿·¿¤ò¥µ¥Ý¡¼¥È¤·¤Þ¤¹¡£¥«¥é¥à¾å¤ËÄÌÈ֤ȥ¤¥ó¥Ç¥Ã¥¯¥¹¤ò¼«
+Æ°ºîÀ®¤·¤Þ¤¹¡£¤¿¤È¤¨¤Ð¡¢
CREATE TABLE person (
id SERIAL,
name TEXT
ÄÌÈ֤ˤĤ¤¤Æ¤Î¤â¤Ã¤È¾Ü¤·¤¤¾ðÊó¤Ï¡¢¥ª¥ó¥é¥¤¥ó¥Þ¥Ë¥å¥¢¥ë¤Ç create_sequence ¤ò¤´Í÷
²¼¤µ¤¤¡£
-¤Þ¤¿¡¢³Æ¹Ô¤ÎOID¥Õ¥£¡¼¥ë¥É¤ò°ì°ÕÃͤȤ·¤Æ»È¤¦¤³¤È¤â¤Ç¤¤Þ¤¹¡£¤·¤«¤·¤Ê¤¬¤é¡¢¤â¤·¤â
-¥Ç¡¼¥¿¥Ù¡¼¥¹¤ò¥À¥ó¥×¤·¤Æ¤ê¥í¡¼¥É¤¹¤ëɬÍפ¬¤¢¤ë¾ì¹ç¤Ï¡¢OID¤ò²¹Â¸¤¹¤ë¤¿¤á¤Ë
+¤Þ¤¿¡¢³Æ¥í¥¦¤ÎOID¥Õ¥£¡¼¥ë¥É¤ò°ì°ÕÃͤȤ·¤Æ»È¤¦¤³¤È¤â¤Ç¤¤Þ¤¹¡£¤·¤«¤·¤Ê¤¬¤é¡¢¤â¤·
+¤â¥Ç¡¼¥¿¥Ù¡¼¥¹¤ò¥À¥ó¥×¤·¤Æ¤ê¥í¡¼¥É¤¹¤ëɬÍפ¬¤¢¤ë¾ì¹ç¤Ï¡¢OID¤ò²¹Â¸¤¹¤ë¤¿¤á¤Ë
pg_dump ¤Ç -o¥ª¥×¥·¥ç¥ó¤ò»È¤¦¤«¡¢¤Þ¤¿¤Ï¡¢COPY WITH OIDS¥ª¥×¥·¥ç¥ó¤ò»È¤¦É¬Íפ¬¤¢
¤ê¤Þ¤¹¡£ Bruce Momjian ¤Î(http://www.PostgreSQL.org/docs/aw_pgsql_book)¤Î
Numbering Rows¤Î¾Ï¤Ë¤¢¤ê¤¢¤Þ¤¹¡£
¤½¤¦¤·¤Æ¡¢new_id ¤ËÊݸ¤·¤¿¿·¤·¤¤Ãͤò¾¤ÎÌ䤤¹ç¤ï¤»¤Ë(¤¿¤È¤¨¤Ð¡¢person ¥Æ¡¼¥Ö¥ë
¤ËÂФ¹¤ë³°Éô¥¡¼(foreign key)¤Î¤è¤¦¤Ë)»È¤¦¤È¤è¤¤¤Ç¤·¤ç¤¦¡£¼«Æ°Åª¤Ëºî¤é¤ì¤¿
SEQUENCE¥ª¥Ö¥¸¥§¥¯¥È¤Î̾Á°¤Ï¡¢<table>_<serialcolumn>_seq ¤Î¤è¤¦¤Ë¤Ê¤ê¡¢¤³¤Î¤¦¤Á
-¡¢table ¤È serialcolumn ¤Ï¤½¤ì¤¾¤ì¥Æ¡¼¥Ö¥ë¤Î̾Á°¤ÈSERIALÎó¤Î̾Á°¤Ç¤¹¡£
+¡¢table ¤È serialcolumn ¤Ï¤½¤ì¤¾¤ì¥Æ¡¼¥Ö¥ë¤Î̾Á°¤ÈSERIAL¥«¥é¥à¤Î̾Á°¤Ç¤¹¡£
¤¢¤ë¤¤¤Ï¡¢Í¿¤¨¤é¤ì¤¿SERIALÃͤò¡¢¤½¤ì¤¬´ûÄêÃͤȤ·¤ÆÁÞÆþ¤µ¤ì¤¿¸å¤Ç(after)¡¢
currval() ´Ø¿ô¤ò»È¤Ã¤Æ¼è¤ê½Ð¤¹¤³¤È¤â¤Ç¤¤Þ¤¹¡£¤¿¤È¤¨¤Ð¡¢
4.16) OID ¤È¤Ï²¿¤Ç¤¹¤«¡© TID ¤È¤Ï²¿¤Ç¤¹¤«¡©
-OID ¤È¤Ï°ì°Õ¤Î¹Ô ID ¤ËÂФ¹¤ë PostgreSQL ¤ÎÅú¤¨¤Ç¤¹¡£PostgreSQL ¤ÎÃæ¤Ç¤Ä¤¯¤é¤ì¤ë
-¤¹¤Ù¤Æ¤Î¹Ô¤Ï°ì°Õ¤Î OID ¤òÆÀ¤Þ¤¹¡£initdb ¤ÇȯÀ¸¤µ¤ì¤ë OID ¤Ï¤¹¤Ù¤Æ 16384
+OID ¤È¤Ï°ì°Õ¤Î¥í¥¦ID ¤ËÂФ¹¤ë PostgreSQL ¤ÎÅú¤¨¤Ç¤¹¡£PostgreSQL ¤ÎÃæ¤Ç¤Ä¤¯¤é¤ì
+¤ë¤¹¤Ù¤Æ¤Î¥í¥¦¤Ï°ì°Õ¤Î OID ¤òÆÀ¤Þ¤¹¡£initdb ¤ÇȯÀ¸¤µ¤ì¤ë OID ¤Ï¤¹¤Ù¤Æ 16384
(backend/access/transam.h ¤«¤é)¤è¤ê¾®¤µ¤ÊÃͤǤ¹¡£initdb ¸å¤Î¤¹¤Ù¤Æ¤Î OID (¥æ¡¼
¥¶ºîÀ®)¤Ï¤½¤ì°Ê¾å¤ÎÃͤˤʤê¤Þ¤¹¡£´ûÄê¤Ç¤Ï¡¢¤³¤ì¤é¤¹¤Ù¤Æ¤Î OID¤Ï°ì¤Ä¤Î¥Ç¡¼¥Ö¥ë¤ä
¥Ç¡¼¥¿¥Ù¡¼¥¹Æâ¤Ëα¤Þ¤é¤º¡¢PostgreSQL ¥¤¥ó¥¹¥È¥ì¡¼¥·¥ç¥óÁ´ÂΤÎÃæ¤Ç°ì°Õ¤Ç¤¹¡£
-PostgreSQL ¤Ï¥Æ¡¼¥Ö¥ë´Ö¤Î¹Ô¤ò·ë¤Ó¤Ä¤±¤ë¤¿¤á¤Ë¡¢¤½¤Î¥·¥¹¥Æ¥à¥Æ¡¼¥Ö¥ëÆâ¤Ë OID ¤ò
-»È¤¤¤Þ¤¹¡£¤³¤Î OID ¤ÏÆÃÄê¤Î¥æ¡¼¥¶¤Î¹Ô¤ò¼±Ê̤¹¤ë¤¿¤á¤ä·ë¹ç¤ÎÃæ¤Ç»È¤ï¤ì¤ë¤³¤È¤¬¤Ç
-¤¤Þ¤¹¡£OID ¤ÎÃͤòÊݸ¤¹¤ë¤¿¤á¤Ë¤Ï OID ·¿¤òÎó¤Ë»È¤¦¤³¤È¤ò¾©¤á¤Þ¤¹¡£¤è¤ê®¤¯¥¢¥¯
-¥»¥¹¤¹¤ë¤¿¤á¤Ë OID ¥Õ¥£¡¼¥ë¥É¤Ë¥¤¥ó¥Ç¥Ã¥¯¥¹¤òºî¤ë¤³¤È¤¬¤Ç¤¤Þ¤¹¡£ OID ¤Ï¡¢Á´¤Æ
-¤Î¥Ç¡¼¥¿¥Ù¡¼¥¹¤Ç»È¤ï¤ì¤ëÃæ±ûÎΰ褫¤é¡¢Á´¤Æ¤Î¿·¤·¤¤¹Ô¤Ë³ä¤êÅö¤Æ¤é¤ì¤Þ¤¹¡£OID ¤ò
-¾¤Î²¿¤«¤ËÊѤ¨¤¿¤¤¡¢¤¢¤ë¤¤¤Ï¸µ¤Î OID ¤â¥Æ¡¼¥Ö¥ë¤È°ì½ï¤Ë¥³¥Ô¡¼¤·¤¿¤¤¤Î¤Ê¤é¡¢¤Ç¤
-¤Ê¤¯¤Ï¤¢¤ê¤Þ¤»¤ó¡£
+PostgreSQL ¤Ï¥Æ¡¼¥Ö¥ë´Ö¤Î¥í¥¦¤ò·ë¤Ó¤Ä¤±¤ë¤¿¤á¤Ë¡¢¤½¤Î¥·¥¹¥Æ¥à¥Æ¡¼¥Ö¥ëÆâ¤Ë OID
+¤ò»È¤¤¤Þ¤¹¡£¤³¤Î OID ¤ÏÆÃÄê¤Î¥æ¡¼¥¶¤Î¥í¥¦¤ò¼±Ê̤¹¤ë¤¿¤á¤ä·ë¹ç¤ÎÃæ¤Ç»È¤ï¤ì¤ë¤³¤È
+¤¬¤Ç¤¤Þ¤¹¡£OID ¤ÎÃͤòÊݸ¤¹¤ë¤¿¤á¤Ë¤Ï OID ·¿¤ò¥«¥é¥à¤Ë»È¤¦¤³¤È¤ò¾©¤á¤Þ¤¹¡£¤è¤ê
+®¤¯¥¢¥¯¥»¥¹¤¹¤ë¤¿¤á¤Ë OID ¥Õ¥£¡¼¥ë¥É¤Ë¥¤¥ó¥Ç¥Ã¥¯¥¹¤òºî¤ë¤³¤È¤¬¤Ç¤¤Þ¤¹¡£ OID
+¤Ï¡¢Á´¤Æ¤Î¥Ç¡¼¥¿¥Ù¡¼¥¹¤Ç»È¤ï¤ì¤ëÃæ±ûÎΰ褫¤é¡¢Á´¤Æ¤Î¿·¤·¤¤¥í¥¦¤Ë³ä¤êÅö¤Æ¤é¤ì¤Þ
+¤¹¡£OID ¤ò¾¤Î²¿¤«¤ËÊѤ¨¤¿¤¤¡¢¤¢¤ë¤¤¤Ï¸µ¤Î OID ¤â¥Æ¡¼¥Ö¥ë¤È°ì½ï¤Ë¥³¥Ô¡¼¤·¤¿¤¤¤Î
+¤Ê¤é¡¢¤Ç¤¤Ê¤¯¤Ï¤¢¤ê¤Þ¤»¤ó¡£
CREATE TABLE new (old_oid oid, mycol int);
SELECT old_oid, mycol INTO new FROM old;
COPY new TO '/tmp/pgtable';
¤¦¡£Ã¯¤â¤³¤ì¤¬µ¯¤¤¿¤ÈÊó¹ð¤·¤Æ¤¯¤ë¿Í¤Ï¤¤¤Þ¤»¤ó¤Ç¤·¤¿¤¬¡¢¤½¤¦¤Ê¤ëÁ°¤Ë¤³¤ÎÀ©¸Â¤ò
¼è¤ê½ü¤¯¤³¤È¤ò·×²è¤·¤Æ¤¤¤Þ¤¹¡£
-TID ¤ÏÆÃÄê¤ÎʪÍý¹Ô¤ò¤½¤Î¥Ö¥í¥Ã¥¯¤È¥ª¥Õ¥»¥Ã¥ÈÃͤǼ±Ê̤¹¤ë¤¿¤á¤Ë»È¤ï¤ì¤Þ¤¹¡£TID
-¤Ï¹Ô¤¬½¤Àµ¤µ¤ì¤¿¤êºÆ¥í¡¼¥É¤µ¤ì¤ë¤ÈÊѤï¤ê¤Þ¤¹¡£¤½¤ì¤é¤Î TID ¤Ï¡¢ÊªÍý¹Ô¤ò»Ø¤¹¤¿¤á
-¤Ë¥¤¥ó¥Ç¥Ã¥¯¥¹µºÜ¤Ç»È¤ï¤ì¤Þ¤¹¡£
+TID ¤ÏÆÃÄê¤ÎʪÍý¥í¥¦¤ò¤½¤Î¥Ö¥í¥Ã¥¯¤È¥ª¥Õ¥»¥Ã¥ÈÃͤǼ±Ê̤¹¤ë¤¿¤á¤Ë»È¤ï¤ì¤Þ¤¹¡£TID
+¤Ï¥í¥¦¤¬½¤Àµ¤µ¤ì¤¿¤êºÆ¥í¡¼¥É¤µ¤ì¤ë¤ÈÊѤï¤ê¤Þ¤¹¡£¤½¤ì¤é¤Î TID ¤Ï¡¢ÊªÍý¥í¥¦¤ò»Ø¤¹
+¤¿¤á¤Ë¥¤¥ó¥Ç¥Ã¥¯¥¹µºÜ¤Ç»È¤ï¤ì¤Þ¤¹¡£
4.17) PostgreSQL ¤Ç»È¤ï¤ì¤ë¤¤¤¯¤Ä¤«¤ÎÍѸì¤Î°ÕÌ£¤Ï²¿¤Ç¤¹¤«¡©
¡¦ ¥Æ¡¼¥Ö¥ë(table)¡¢´Ø·¸(relation)¡¢¥¯¥é¥¹(class)
- ¡¦ ¹Ô(row)¡¢¥ì¥³¡¼¥É(record)¡¢¥¿¥Ã¥×¥ë(tuple)
- ¡¦ Îó(column)¡¢¥Õ¥£¡¼¥ë¥É(field)¡¢Â°À(attribute)
+ ¡¦ ¥í¥¦(row)¡¢¥ì¥³¡¼¥É(record)¡¢¥¿¥Ã¥×¥ë(tuple)
+ ¡¦ ¥«¥é¥à(column)¡¢¥Õ¥£¡¼¥ë¥É(field)¡¢Â°À(attribute)
¡¦ ¼èÆÀ(retrieve)¡¢ÁªÂò(select)
¡¦ ÃÖ´¹(replace)¡¢¹¹¿·(update)
¡¦ ÄɲÃ(append)¡¢ÁÞÆþ(insert)
¸½ºß¤Ï¡¢PostgreSQL¤Î¥È¥é¥ó¥¶¥¯¥·¥ç¥ó¤Î¥³¥ß¥Ã¥È»þ¤Ë¥é¡¼¥¸¡¦¥ª¥Ö¥¸¥§¥¯¥È¡¦¥Ï¥ó¥É
¥ë¤òÊĤ¸¤ë¤³¤È¤Ë¤è¤ê¡¢lo_open¥³¥Þ¥ó¥É¤¬´°Î»¤·¤¿Ä¾¸å¤Ë¶¯À©Åª¤Ë¥ë¡¼¥ë¤ò¼Â¹Ô¤·¤Þ¤¹
¡£¤³¤Î¤¿¤á¡¢ºÇ½é¤Ë¥Ï¥ó¥É¥ë¤ËÂФ·¤Æ²¿¤«¤ò¤·¤è¤¦¤È¤¹¤ë¤È¡¢invalid large obj
-descriptor(¥é¡¼¥¸¥ª¥Ö¥¸¥§¥¯¥È¤Îµ½Ò»Ò¤¬ÉÔÀµ)¤È¤Ê¤ê¤Þ¤¹¡£¤½¤ì¤Ç¡¢¤â¤·¡¢¥È¥é¥ó¥¶
-¥¯¥·¥ç¥ó¤ò»È¤¦¤Î¤ò˺¤ì¤ë¤È¡¢¡Ê¾¯¤Ê¤¯¤È¤â¤Û¤È¤ó¤É¤Î»þ´Ö¡ËƯ¤¤¤Æ¤¤¤¿¥³¡¼¥É¤¬¥¨¥é
-¡¼¥á¥Ã¥»¡¼¥¸¤ò½Ð¤¹¤Î¤Ç¤¹¡£
+descriptor(¥é¡¼¥¸¡¦¥ª¥Ö¥¸¥§¥¯¥È¤Îµ½Ò»Ò¤¬ÉÔÀµ)¤È¤Ê¤ê¤Þ¤¹¡£¤½¤ì¤Ç¡¢¤â¤·¡¢¥È¥é¥ó
+¥¶¥¯¥·¥ç¥ó¤ò»È¤¦¤Î¤ò˺¤ì¤ë¤È¡¢¡Ê¾¯¤Ê¤¯¤È¤â¤Û¤È¤ó¤É¤Î»þ´Ö¡ËƯ¤¤¤Æ¤¤¤¿¥³¡¼¥É¤¬¥¨
+¥é¡¼¥á¥Ã¥»¡¼¥¸¤ò½Ð¤¹¤Î¤Ç¤¹¡£
¤â¤·¡¢ODBC¤Î¤è¤¦¤Ê¥¯¥é¥¤¥¢¥ó¥È¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤ò¤ª»È¤¤¤Ê¤é¡¢auto-commit off¤òÀß
Äꤹ¤ëɬÍפ¬¤¢¤ë¤«¤â¤·¤ì¤Þ¤»¤ó¡£
-4.21) ¸½ºß¤Î»þ¹ï¤¬¥Ç¥Õ¥©¥ë¥È¤È¤Ê¤ë¤è¤¦¤ÊÎó¤Ï¤É¤Î¤è¤¦¤Ë¤Ä¤¯¤ê¤Þ¤¹¤«¡©
+4.21) ¸½ºß¤Î»þ¹ï¤¬¥Ç¥Õ¥©¥ë¥È¤È¤Ê¤ë¤è¤¦¤Ê¥«¥é¥à¤Ï¤É¤Î¤è¤¦¤Ë¤Ä¤¯¤ê¤Þ¤¹¤«¡©
CURRENT_TIMESTAMP¤ò»È¤¤¤Þ¤¹:
CREATE TABLE test (x int, modtime timestamp DEFAULT >CURRENT_TIMESTAMP );
4.22) ¤Ê¤¼¡¢IN¤ò»È¤¦ÉûÌ䤤¹ç¤ï¤»¤¬¤È¤Æ¤âÃÙ¤¤¤Î¤Ç¤¹¤«¡©
-¸½ºß¡¢³°ÉôÌ䤤¹ç¤ï¤»¤Î³Æ¹Ô¤Ë¤Ä¤¤¤ÆÉûÌ䤤¹ç¤ï¤»¤Î·ë²Ì¤ò½çÈ֤˥¹¥¥ã¥ó¤¹¤ë¤³¤È¤Ë
-¤è¤ê¡¢ÉûÌ䤤¹ç¤ï¤»¤ò³°ÉôÌ䤤¹ç¤ï¤»¤Ë·ë¹ç¤·¤Æ¤¤¤Þ¤¹¡£ÅöÌ̤ÏIN¤òEXISTS¤ÇÃÖ¤´¹¤¨
-¤ë¤³¤È¤Ç¤¹¡§
+¸½ºß¡¢³°ÉôÌ䤤¹ç¤ï¤»¤Î³Æ¥í¥¦¤Ë¤Ä¤¤¤ÆÉûÌ䤤¹ç¤ï¤»¤Î·ë²Ì¤ò½çÈ֤˥¹¥¥ã¥ó¤¹¤ë¤³¤È
+¤Ë¤è¤ê¡¢ÉûÌ䤤¹ç¤ï¤»¤ò³°ÉôÌ䤤¹ç¤ï¤»¤Ë·ë¹ç¤·¤Æ¤¤¤Þ¤¹¡£ÅöÌ̤ÏIN¤òEXISTS¤ÇÃÖ¤´¹
+¤¨¤ë¤³¤È¤Ç¤¹¡§
SELECT *
FROM tab
WHERE col1 IN (SELECT col2 FROM TAB2)
SELECT *
FROM t1 LEFT OUTER JOIN t2 USING (col);
¤³¤ì¤é¤Î¾ÝħŪ¤ÊÌ䤤¹ç¤ï¤»¤Ç¤Ï t1.col ¤ò t2.col ¤È·ë¹ç¤·¤Æ¡¢t1 ¤Î·ë¹ç¤µ¤ì¤Ê¤«¤Ã
-¤¿¹Ô(t2 ¤È°ìÃפ·¤Ê¤«¤Ã¤¿¹Ô)¤âÊÖ¤·¤Æ¤¤¤Þ¤¹¡£RIGHT ·ë¹ç¤Ï t2 ¤Î·ë¹ç¤µ¤ì¤Ê¤«¤Ã¤¿¹Ô
-¤ò²Ã¤¨¤ë¤Ç¤·¤ç¤¦¡£FULL ·ë¹ç¤Ï¡¢°ìÃפ·¤¿¹Ô¤Ë t1 ¤È t2 ¤«¤é¤Ï·ë¹ç¤µ¤ì¤Ê¤«¤Ã¤¿¹Ô¤ò
-ÊÖ¤¹¤Ç¤·¤ç¤¦¡£OUTER ¤È¤¤¤¦¸ÀÍդϥª¥×¥·¥ç¥ó¤Ç LEFT, RIGHT, ¤Þ¤¿¤Ï FULL ¤Ê¤É¤Î·ë
-¹ç¤ò²¾Äꤵ¤ì¤Æ¤¤¤Þ¤¹¡£°ÊÁ°¤Î¥ê¥ê¡¼¥¹¤Ç¤Ï³°Éô·ë¹ç(outer join)¤òUNION ¤È NOT IN
-¤ò»È¤Ã¤Æ¥·¥ß¥å¥ì¡¼¥È¤Ç¤¤Þ¤¹¡£¤¿¤È¤¨¤Ð¡¢tab1 ¤È tab2 ¤ò·ë¹ç¤¹¤ë¤È¤¤Ï¡¢¼¡¤ÎÌ䤤
-¹ç¤ï¤»¤ÇÆó¤Ä¤Î¥Æ¡¼¥Ö¥ë¤ò³°Éô·ë¹ç¤·¤Þ¤¹¡£
+¤¿¥í¥¦(t2 ¤È°ìÃפ·¤Ê¤«¤Ã¤¿¥í¥¦)¤âÊÖ¤·¤Æ¤¤¤Þ¤¹¡£RIGHT ·ë¹ç¤Ï t2 ¤Î·ë¹ç¤µ¤ì¤Ê¤«¤Ã
+¤¿¥í¥¦¤ò²Ã¤¨¤ë¤Ç¤·¤ç¤¦¡£FULL ·ë¹ç¤Ï¡¢°ìÃפ·¤¿¥í¥¦¤Ë t1 ¤È t2 ¤«¤é¤Ï·ë¹ç¤µ¤ì¤Ê¤«
+¤Ã¤¿¥í¥¦¤òÊÖ¤¹¤Ç¤·¤ç¤¦¡£OUTER ¤È¤¤¤¦¸ÀÍդϥª¥×¥·¥ç¥ó¤Ç LEFT, RIGHT, ¤Þ¤¿¤Ï FULL
+¤Ê¤É¤Î·ë¹ç¤ò²¾Äꤵ¤ì¤Æ¤¤¤Þ¤¹¡£°ÊÁ°¤Î¥ê¥ê¡¼¥¹¤Ç¤Ï³°Éô·ë¹ç(outer join)¤òUNION ¤È
+NOT IN ¤ò»È¤Ã¤Æ¥·¥ß¥å¥ì¡¼¥È¤Ç¤¤Þ¤¹¡£¤¿¤È¤¨¤Ð¡¢tab1 ¤È tab2 ¤ò·ë¹ç¤¹¤ë¤È¤¤Ï¡¢
+¼¡¤ÎÌ䤤¹ç¤ï¤»¤ÇÆó¤Ä¤Î¥Æ¡¼¥Ö¥ë¤ò³°Éô·ë¹ç¤·¤Þ¤¹¡£
SELECT tab1.col1, tab2.col2
FROM tab1, tab2
WHERE tab1.col1 = tab2.col1
¤â¤Á¤í¤ó¡¢¥¯¥é¥¤¥¢¥ó¥È¤ÏƱ»þ¤Ë°Û¤Ê¤ëÊ£¿ô¤Î¥Ç¡¼¥¿¥Ù¡¼¥¹¤ØÀܳ¤·¤Æ¤½¤³¤Ë¤¢¤ë¾ðÊó
¤ò¥Þ¡¼¥¸¤¹¤ë¤³¤È¤Ï¤Ç¤¤Þ¤¹¡£
+4.25) ´Ø¿ô¤ÇÊ£¿ô¤Î¥í¥¦¤Þ¤¿¤Ï¥«¥é¥à¤òÊÖ¤¹¤Ë¤Ï¤É¤¦¤·¤Þ¤¹¤«¡©
+
+¤â¤·¡¢PL/pgSQL ´Ø¿ô¤Çrefcursors¤ò»È¤¦¤È·ë²Ì¤ÎÁȤòÊÖ¤¹¤³¤È¤¬¤Ç¤¤Þ¤¹¡£ http://
+developer.postgresql.org/docs/postgres/plpgsql-cursors.html ¤Î 23.7.3.3 Àá¤ò¤´
+Í÷²¼¤µ¤¤¡£
+
¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬¨¬
PostgreSQL¤Î³ÈÄ¥¤Ë¤Ä¤¤¤Æ¤Î¼ÁÌä
[ÌõÃí¡§
ÆüËܸìÈǤÎÀ½ºî¤Ë¤Ä¤¤¤Æ¤Ï°Ê²¼¤ÎÄ̤ê¤Ç¤¹¡£
- ºÇ½ª¹¹¿·Æü: 2002ǯ04·î05Æü
+ ºÇ½ª¹¹¿·Æü: 2002ǯ05·î08Æü
ËÝÌõ¼Ô: ·¬Â¼ ½á (Jun Kuwamura <juk@postgresql.jp>)
¤³¤ÎFAQ¤ÎÏÂÌõ¤ÎºîÀ®¤Ë¤¢¤¿¤ê¶¨ÎϤò¤·¤Æ¤¯¤À¤µ¤Ã¤¿Êý¡¹(·É¾Î¤Ïά¤µ¤»¤Æ¤¤¤¿¤À¤¤Þ¤¹):
<H1>
PostgreSQL(¥Ý¥¹¥È¥°¥ì¥¹¡¦¥¥å¡¼¡¦¥¨¥ë)¤Ë¤Ä¤¤¤Æ¤è¤¯¤¢¤ë¼ÁÌä¤È¤½¤Î²òÅú(FAQ)</H1>
<P>
-¸¶Ê¸ºÇ½ª¹¹¿·Æü: Mon Mar 18 14:34:57 EST 2002
+¸¶Ê¸ºÇ½ª¹¹¿·Æü: Fri Apr 26 23:03:46 EDT 2002
<P>
¸½ºß¤Î°Ý»ý´ÉÍý¼Ô: Bruce Momjian (<A
HREF="mailto:pgman@candle.pha.pa.us">pgman@candle.pha.pa.us</A>)<BR>
<H2><CENTER>Áàºî¾å¤Î¼ÁÌä</CENTER></H2>
<A HREF="#4.1">4.1</A>) ¥Ð¥¤¥Ê¥ê¡¦¥«¡¼¥½¥ë¤ÈÄ̾參¡¼¥½¥ë¤È¤Î°ã¤¤¤Ï²¿¤Ç¤¹¤«¡©<BR>
-<A HREF="#4.2">4.2</A>) ºÇ½é¤Î¿ô¹Ô¤Î¤ß¤ò <small>select</small> ¤¹¤ë¤Ë¤Ï¤É¤¦¤·¤Þ¤¹¤«¡©<BR>
+<A HREF="#4.2">4.2</A>) ºÇ½é¤Î¿ô¥í¥¦¤Î¤ß¤ò <small>select</small> ¤¹¤ë¤Ë¤Ï¤É¤¦¤·¤Þ¤¹¤«¡©<BR>
<A HREF="#4.3">4.3</A>) ¥Æ¡¼¥Ö¥ë¤ä¤½¤Î¾¤Î¾ðÊó¤Î¥ê¥¹¥È¤ò <I>psql</I> ¤Ç¸«¤ë¤Ë¤Ï¤É¤¦¤·¤Þ¤¹¤«¡©<BR>
-<A HREF="#4.4">4.4</A>) ¥Æ¡¼¥Ö¥ë¤«¤éÎó¤Îºï½ü¤Ï¤É¤Î¤è¤¦¤Ë¤·¤Þ¤¹¤«¡©<BR>
-<A HREF="#4.5">4.5</A>) ¹Ô¡¢¥Æ¡¼¥Ö¥ë¡¢¥Ç¡¼¥¿¥Ù¡¼¥¹¤ÎºÇÂ祵¥¤¥º¤Ï¡©<BR>
+<A HREF="#4.4">4.4</A>) ¥Æ¡¼¥Ö¥ë¤«¤é¥«¥é¥à¤Îºï½ü¤Ï¤É¤Î¤è¤¦¤Ë¤·¤Þ¤¹¤«¡©<BR>
+<A HREF="#4.5">4.5</A>) ¥í¥¦¡¢¥Æ¡¼¥Ö¥ë¡¢¥Ç¡¼¥¿¥Ù¡¼¥¹¤ÎºÇÂ祵¥¤¥º¤Ï¡©<BR>
<A HREF="#4.6">4.6</A>) °ìÈÌŪ¤Ê¥Æ¥¥¹¥È¥Õ¥¡¥¤¥ë¤«¤é¥Ç¡¼¥¿¤òÊݸ¤¹¤ë¤Ë¤Ï¡¢¥Ç¡¼¥¿¥Ù¡¼¥¹¤Î¥Ç¥£¥¹¥¯ÍÆÎ̤ϤɤΤ¯¤é¤¤É¬ÍפǤ¹¤«¡©<BR>
-<A HREF="#4.7">4.7</A>) ¥Ç¡¼¥¿¥Ù¡¼¥¹Æâ¤ËÄêµÁ¤µ¤ì¤¿¥Æ¡¼¥Ö¥ë¤ä¥¤¥ó¥Ç¥Ã¥¯¥¹¤ò¤É¤Î¤è¤¦¤Ë¤·¤Æ¸«¤Ä¤±½Ð¤·¤Þ¤¹¤«¡©<BR>
+<A HREF="#4.7">4.7</A>) ÄêµÁ¤µ¤ì¤¿¥Æ¡¼¥Ö¥ë¡¢¥¤¥ó¥Ç¥Ã¥¯¥¹¡¢¥Ç¡¼¥¿¥Ù¡¼¥¹¡¢¤ª¤è¤Ó¡¢¥æ¡¼¥¶¤ò¤É¤Î¤è¤¦¤Ë¤·¤Æ¸«¤Ä¤±½Ð¤·¤Þ¤¹¤«¡©<BR>
<A HREF="#4.8">4.8</A>) Ì䤤¹ç¤ï¤»¤¬ÃÙ¤¤¤¦¤¨¡¢¥¤¥ó¥Ç¥Ã¥¯¥¹¤ò»È¤Ã¤Æ¤¤¤ëÍͻҤ¬¤¢¤ê¤Þ¤»¤ó¡£¤Ê¤¼¤Ç¤¹¤«¡©<BR>
<A HREF="#4.9">4.9</A>) Ì䤤¹ç¤ï¤»¥ª¥Ö¥Æ¥£¥Þ¥¤¥¶¤¬¤É¤Î¤è¤¦¤ËÌ䤤¹ç¤ï¤»¤òɾ²Á¤¹¤ë¤«¤ò¸«¤ë¤Ë¤Ï¤É¤¦¤·¤Þ¤¹¤«¡©<BR>
<A HREF="#4.10">4.10</A>) R-tree ¥¤¥ó¥Ç¥Ã¥¯¥¹¤È¤Ï²¿¤Ç¤¹¤«¡©<BR>
<A HREF="#4.18">4.18</A>) ¥¨¥é¡¼¥á¥Ã¥»¡¼¥¸ <I>"ERROR: Memory exhausted in AllocSetAlloc()"</I>¤¬½Ð¤ë¤Î¤Ï¤Ê¤¼¤Ç¤¹¤«¡©<BR>
<A HREF="#4.19">4.19</A>) ¤É¤Î¥Ð¡¼¥¸¥ç¥ó¤Î PostgreSQL ¤òÁö¤é¤»¤Æ¤¤¤ë¤Î¤«¤òÄ´¤Ù¤ë¤Ë¤Ï¤É¤¦¤·¤Þ¤¹¤«¡©<BR>
<A HREF="#4.20">4.20</A>) ¥é¡¼¥¸¥ª¥Ö¥¸¥§¥¯¥È¤ÎÁàºî¤Ç¡¢<I>invalid large obj descriptor</I>¤È½Ð¤ë¤Î¤Ï¤Ê¤¼¤Ç¤¹¤«¡©<BR>
-<A HREF="#4.21">4.21</A>) ¸½ºß¤Î»þ¹ï¤¬¥Ç¥Õ¥©¥ë¥È¤È¤Ê¤ë¤è¤¦¤ÊÎó¤Ï¤É¤Î¤è¤¦¤Ë¤Ä¤¯¤ê¤Þ¤¹¤«¡©<BR>
+<A HREF="#4.21">4.21</A>) ¸½ºß¤Î»þ¹ï¤¬¥Ç¥Õ¥©¥ë¥È¤È¤Ê¤ë¤è¤¦¤Ê¥«¥é¥à¤Ï¤É¤Î¤è¤¦¤Ë¤Ä¤¯¤ê¤Þ¤¹¤«¡©<BR>
<A HREF="#4.22">4.22</A>) ¤Ê¤¼¡¢<small>IN</small>¤ò»È¤¦ÉûÌ䤤¹ç¤ï¤»¤¬¤È¤Æ¤âÃÙ¤¤¤Î¤Ç¤¹¤«¡©<BR>
<A HREF="#4.23">4.23</A>) <i>³°Éô</i>·ë¹ç(<i>outer</i> join)¤Ï¤É¤Î¤è¤¦¤Ë¼Â¸½¤·¤Þ¤¹¤«?<BR>
-<A HREF="#4.24">4.24</A>) Ê£¿ô¤Î¥Ç¡¼¥¿¥Ù¡¼¥¹¤ò»È¤¦Ì䤤¹ç¤ï¤»¤Ï¤É¤Î¤è¤¦¤Ë¤¹¤ì¤Ð¤Ç¤¤Þ¤¹¤«¡©
-
+<A HREF="#4.24">4.24</A>) Ê£¿ô¤Î¥Ç¡¼¥¿¥Ù¡¼¥¹¤ò»È¤¦Ì䤤¹ç¤ï¤»¤Ï¤É¤Î¤è¤¦¤Ë¤¹¤ì¤Ð¤Ç¤¤Þ¤¹¤«¡©<br>
+<A HREF="#4.25">4.25</A>) ´Ø¿ô¤ÇÊ£¿ô¤Î¥í¥¦¤Þ¤¿¤Ï¥«¥é¥à¤òÊÖ¤¹¤Ë¤Ï¤É¤¦¤·¤Þ¤¹¤«¡©<br>
<H2><CENTER>PostgreSQL¤Î³ÈÄ¥¤Ë¤Ä¤¤¤Æ¤Î¼ÁÌä</CENTER></H2>
<P> postgreSQL ¥×¥í¥°¥é¥à¤Ë¤Ï¡¢¥Ç¥Ð¥°¤ÈÀǽ¬Äê¤Ë¤È¤Æ¤âÌò¤ËΩ¤Ä <I>-s</I>¤ä <I>-A</I>¤ä <I>-t</I> Åù¤Î¥ª¥×¥·¥ç¥ó¤¬¤¢¤ê¤Þ¤¹¡£
-<P> ²¿¤È¤¤¤¦´Ø¿ô¤¬¤É¤Î¤¯¤é¤¤¼Â¹Ô»þ´Ö¤ò¿©¤Ã¤Æ¤¤¤ë¤«¤ò¸«¤ë¤¿¤á¤Ë¡¢¥×¥í¥Õ¥¡¥¤¥ê¥ó¥°¡Ê¥×¥í¥Õ¥£¡¼¥ëÉÕ¤¡Ë¤Ç¥³¥ó¥Ñ¥¤¥ë¤¹¤ë¤³¤È¤â²Äǽ¤Ç¤¹¡£¤½¤Î¥Ð¥Ã¥¯¥¨¥ó¥É¤Î¥×¥í¥Õ¥£¡¼¥ë¡¦¥Õ¥¡¥¤¥ë¤Ï <I>pgsql/data/base/dbname</I> ¥Ç¥£¥ì¥¯¥È¥ê¤Ë³ÊǼ¤µ¤ì¤ë¤Ç¤·¤ç¤¦¡£¥¯¥é¥¤¥¢¥ó¥È¤Î¥×¥í¥Õ¥£¡¼¥ë¤Ï¥¯¥é¥¤¥¢¥ó¥È¤Î¸½¹Ô¥Ç¥£¥ì¥¯¥È¥ê¤ËÃÖ¤«¤ì¤ë¤Ç¤·¤ç¤¦¡£
+<P> ²¿¤È¤¤¤¦´Ø¿ô¤¬¤É¤Î¤¯¤é¤¤¼Â¹Ô»þ´Ö¤ò¿©¤Ã¤Æ¤¤¤ë¤«¤ò¸«¤ë¤¿¤á¤Ë¡¢¥×¥í¥Õ¥¡¥¤¥ê¥ó¥°¡Ê¥×¥í¥Õ¥£¡¼¥ëÉÕ¤¡Ë¤Ç¥³¥ó¥Ñ¥¤¥ë¤¹¤ë¤³¤È¤â²Äǽ¤Ç¤¹¡£¤½¤Î¥Ð¥Ã¥¯¥¨¥ó¥É¤Î¥×¥í¥Õ¥£¡¼¥ë¡¦¥Õ¥¡¥¤¥ë¤Ï <I>pgsql/data/base/dbname</I> ¥Ç¥£¥ì¥¯¥È¥ê¤Ë³ÊǼ¤µ¤ì¤ë¤Ç¤·¤ç¤¦¡£¥¯¥é¥¤¥¢¥ó¥È¤Î¥×¥í¥Õ¥£¡¼¥ë¤Ï¥¯¥é¥¤¥¢¥ó¥È¤Î¸½¹Ô¥Ç¥£¥ì¥¯¥È¥ê¤ËÃÖ¤«¤ì¤ë¤Ç¤·¤ç¤¦¡£Linux ¤Ç¤Þ¤È¤â¤Ê¥×¥í¥Õ¥¡¥¤¥ê¥ó¥°¤ò¹Ô¤¦¤Ë¤Ï <I>-DLINUX_PROFILE</I> ¤Ç¥³¥ó¥Ñ¥¤¥ë¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£
<P>
<P> ¾Ü½Ò¤Ï¡¢¥ª¥ó¥é¥¤¥ó¥Þ¥Ë¥å¥¢¥ë¤Ç <small>DECLARE</small> ¤ò¸«¤Æ²¼¤µ¤¤¡£
<P>
-<H4><A NAME="4.2">4.2</A>) ºÇ½é¤Î¿ô¹Ô¤Î¤ß¤ò <small>SELECT</small> ¤¹¤ë¤Ë¤Ï¤É¤¦¤·¤Þ¤¹¤«¡©
+<H4><A NAME="4.2">4.2</A>) ºÇ½é¤Î¿ô¥í¥¦¤Î¤ß¤ò <small>SELECT</small> ¤¹¤ë¤Ë¤Ï¤É¤¦¤·¤Þ¤¹¤«¡©
</H4>
<P> ¥ª¥ó¥é¥¤¥ó¥Þ¥Ë¥å¥¢¥ë¤Ç<small>FETCH</small>¤ò¸«¤Æ¤¯¤À¤µ¤¤¡£¤¢¤ë¤¤¤Ï¡¢SELECT ... LIMIT....¤ò»È¤Ã¤Æ¤ß¤Æ²¼¤µ¤¤¡£
-<P>¤¿¤È¤¨¡¢Íߤ·¤¤¤Î¤ÏºÇ½é¤Î¿ô¹Ô¤À¤±¤Ç¤â¡¢¤¹¤Ù¤Æ¤ÎÌ䤤¹ç¤ï¤»¤òɾ²Á¤·¤Ê¤¯¤Æ¤Ï¤Ê¤é¤Ê¤¤¤«¤â¤·¤ì¤Þ¤»¤ó¡£<small>ORDER BY</small> ¤ò»ý¤Ã¤¿Ì䤤¹ç¤ï¤»¤ò¹Í¤¨¤Æ¤ß¤Æ²¼¤µ¤¤¡£
-¤â¤·¡¢<small>ORDER BY</small>¤Ë¹ç¤Ã¤¿¥¤¥ó¥Ç¥Ã¥¯¥¹¤¬¤¢¤ë¤È¤¹¤ë¤È PostgreSQL¤ÏÍ׵ᤵ¤ì¤¿ºÇ½é¤Î¿ô¹Ô¤À¤±¤Çɾ²Á¤Ç¤¤ë¤«¤â¤·¤ì¤Þ¤»¤ó¤¬¡¢¤Ç¤Ê¤ì¤Ð¡¢PostgreSQL ¤Ï°Õ¿Þ¤·¤¿¹Ô¤¬À¸À®¤µ¤ì¤ë¤Þ¤Ç¤¹¤Ù¤Æ¤Î¹Ô¤òɾ²Á¤·¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¤«¤â¤·¤ì¤Þ¤»¤ó¡£
+<P>¤¿¤È¤¨¡¢Íߤ·¤¤¤Î¤ÏºÇ½é¤Î¿ô¥í¥¦¤À¤±¤Ç¤â¡¢¤¹¤Ù¤Æ¤ÎÌ䤤¹ç¤ï¤»¤òɾ²Á¤·¤Ê¤¯¤Æ¤Ï¤Ê¤é¤Ê¤¤¤«¤â¤·¤ì¤Þ¤»¤ó¡£<small>ORDER BY</small> ¤ò»ý¤Ã¤¿Ì䤤¹ç¤ï¤»¤ò¹Í¤¨¤Æ¤ß¤Æ²¼¤µ¤¤¡£
+¤â¤·¡¢<small>ORDER BY</small>¤Ë¹ç¤Ã¤¿¥¤¥ó¥Ç¥Ã¥¯¥¹¤¬¤¢¤ë¤È¤¹¤ë¤È PostgreSQL¤ÏÍ׵ᤵ¤ì¤¿ºÇ½é¤Î¿ô¥í¥¦¤À¤±¤Çɾ²Á¤Ç¤¤ë¤«¤â¤·¤ì¤Þ¤»¤ó¤¬¡¢¤Ç¤Ê¤ì¤Ð¡¢PostgreSQL ¤Ï°Õ¿Þ¤·¤¿¥í¥¦¤¬À¸À®¤µ¤ì¤ë¤Þ¤Ç¤¹¤Ù¤Æ¤Î¥í¥¦¤òɾ²Á¤·¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¤«¤â¤·¤ì¤Þ¤»¤ó¡£
<P>
<H4><A NAME="4.3">4.3</A>) ¥Æ¡¼¥Ö¥ë¤ä¤½¤Î¾¤Î¾ðÊó¤Î¥ê¥¹¥È¤ò <I>psql</I> ¤Ç¸«¤ë¤Ë¤Ï¤É¤¦¤·¤Þ¤¹¤«¡©
<P>
-<H4><A NAME="4.4">4.4</A>) ¥Æ¡¼¥Ö¥ë¤«¤éÎó¤Îºï½ü¤Ï¤É¤Î¤è¤¦¤Ë¤·¤Þ¤¹¤«¡©
+<H4><A NAME="4.4">4.4</A>) ¥Æ¡¼¥Ö¥ë¤«¤é¥«¥é¥à¤Îºï½ü¤Ï¤É¤Î¤è¤¦¤Ë¤·¤Þ¤¹¤«¡©
</H4>
<P> <small>ALTER TABLE DROP COLUMN</small> ¤Ï¥µ¥Ý¡¼¥È¤·¤Æ¤¤¤Þ¤»¤ó¤¬¡¢¤½¤ÎÂå¤ï¤ê¤Ë¤³¤¦¤·¤Þ¤¹:
<PRE>
- SELECT ... -- ºï½ü¤·¤¿¤¤Îó°Ê³°¤ÎÎó¤ò¤¹¤Ù¤ÆÁªÂò¤·¤Þ¤¹¡£
+ 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;
</PRE>
-[ÌõÃí¡§Îó¤ÎÄÉ²Ã¤Ï ALTER TABLE ADD COLUMN ¤Ç¹Ô¤¨¤Þ¤¹¡£]
+[ÌõÃí¡§¥«¥é¥à¤ÎÄÉ²Ã¤Ï ALTER TABLE ADD COLUMN ¤Ç¹Ô¤¨¤Þ¤¹¡£]
<P>
-<H4><A NAME="4.5">4.5</A>) ¹Ô¡¢¥Æ¡¼¥Ö¥ë¡¢¥Ç¡¼¥¿¥Ù¡¼¥¹¤ÎºÇÂ祵¥¤¥º¤Ï¡©
+<H4><A NAME="4.5">4.5</A>) ¥í¥¦¡¢¥Æ¡¼¥Ö¥ë¡¢¥Ç¡¼¥¿¥Ù¡¼¥¹¤ÎºÇÂ祵¥¤¥º¤Ï¡©
</H4>
<P> À©¸Â¤Ï°Ê²¼¤Î¤È¤ª¤ê¤Ç¤¹¡£
<PRE>
¥Ç¡¼¥¿¥Ù¡¼¥¹¤ÎºÇÂ祵¥¤¥º? À©¸Â̵¤· (500GB ¤Î¥Ç¡¼¥¿¥Ù¡¼¥¹¤â¸ºß¤·¤Þ¤¹)
¥Æ¡¼¥Ö¥ë¤ÎºÇÂ祵¥¤¥º? 16TB
-¹Ô¤ÎºÇÂ祵¥¤¥º? 7.1°Ê¹ß¤ÇÀ©¸Â̵¤·
+¥í¥¦¤ÎºÇÂ祵¥¤¥º? 7.1°Ê¹ß¤ÇÀ©¸Â̵¤·
¥Õ¥£¡¼¥ë¥É¤ÎºÇÂ祵¥¤¥º? 7.1°Ê¹ß¤Ç1GB
¥Æ¡¼¥Ö¥ëÆâ¤Ç¤ÎºÇÂç¥í¥¦¿ô? À©¸Â̵¤·
¥Æ¡¼¥Ö¥ëÆâ¤Ç¤ÎºÇÂ祫¥é¥à¿ô? ¥«¥é¥à¤Î·¿¤Ë¤è¤ê250-1600
¥Õ¥¡¥¤¥ë¤ÎÂ礤µ¤Ï¼¡¤Î¤è¤¦¤ËÌó6.4MB¤È¸«ÀѤâ¤ë¤³¤È¤¬¤Ç¤¤Þ¤¹¡§
<PRE>
- 36 bytes: ³Æ¹Ô¤Î¥Ø¥Ã¥À(³µ»»)
+ 36 bytes: ³Æ¥í¥¦¤Î¥Ø¥Ã¥À(³µ»»)
24 bytes: À°¿ô(int)¥Õ¥£¡¼¥ë¥É¤È¥Æ¥¥¹¥È(text)¥Õ¥£¡¼¥ë¥É
+ 4 bytes: ¥Ú¡¼¥¸¾å¤Î¥¿¥Ã¥×¥ë¤Ø¤Î¥Ý¥¤¥ó¥¿
----------------------------------------
¥¤¥ó¥Ç¥Ã¥¯¥¹¤Ï¡¢¤³¤ì¤Û¤É¤Î¥ª¡¼¥Ð¥Ø¥Ã¥É¤ÏÍ׵ᤷ¤Þ¤»¤ó¤¬¡¢¥¤¥ó¥Ç¥Ã¥¯¥¹ÉÕ¤±¤µ¤ì¤ë¥Ç¡¼¥¿¤ò´Þ¤à°Ê¾å¡¢¤½¤ì¤Ê¤ê¤ËÂ礤¯¤Ê¤ê¤Þ¤¹¡£
<P>
-<H4><A NAME="4.7">4.7</A>) ¥Ç¡¼¥¿¥Ù¡¼¥¹Æâ¤ËÄêµÁ¤µ¤ì¤¿¥Æ¡¼¥Ö¥ë¤ä¥¤¥ó¥Ç¥Ã¥¯¥¹¤ò¤É¤Î¤è¤¦¤Ë¤·¤Æ¸«¤Ä¤±½Ð¤·¤Þ¤¹¤«¡©
+<H4><A NAME="4.7">4.7</A>) ÄêµÁ¤µ¤ì¤¿¥Æ¡¼¥Ö¥ë¡¢¥¤¥ó¥Ç¥Ã¥¯¥¹¡¢¥Ç¡¼¥¿¥Ù¡¼¥¹¡¢¤ª¤è¤Ó¡¢¥æ¡¼¥¶¤ò¤É¤Î¤è¤¦¤Ë¤·¤Æ¸«¤Ä¤±½Ð¤·¤Þ¤¹¤«¡©
</H4>
<P> <I>psql</I> ¤Ë¤Ï¤¤¤í¤¤¤í¤Ê¥Ð¥Ã¥¯¥¹¥é¥Ã¥·¥å¡¦¥³¥Þ¥ó¥É¤¬¤¢¤ê¡¢¤³¤¦¤·¤¿¾ðÊó¤òɽ¼¨¤·¤Þ¤¹¡£¥Ð¥Ã¥¯¥¹¥é¥Ã¥·¥å¡¦¥³¥Þ¥ó¥É¤Î¼ïÎà¤ò¸«¤ë¤Ë¤Ï \? ¤ò»È¤Ã¤Æ²¼¤µ¤¤¡£
-<P> ¤Þ¤¿¡¢<I>pgsql/src/tutorial/syscat.source</I> ¥Õ¥¡¥¤¥ë¤òÁö¤é¤»¤Æ¤ß¤Æ²¼¤µ¤¤¡£¤½¤ì¤Ï¡¢Âô»³¤Î <small>SELECT</small> ʸ¤Ë¤è¤êɬÍפʾðÊó¤ò¥Ç¡¼¥¿¥Ù¡¼¥¹¤Î¥·¥¹¥Æ¥à¡¦¥Æ¡¼¥Ö¥ë¤«¤é¼è¤ê½Ð¤·¤ÆÎ㼨¤·¤Æ¤¯¤ì¤Þ¤¹¡£
+<P> ¤Þ¤¿¡¢<I>pgsql/src/tutorial/syscat.source</I> ¥Õ¥¡¥¤¥ë¤òÁö¤é¤»¤Æ¤ß¤Æ²¼¤µ¤¤¡£¤½¤ì¤Ï¡¢Âô»³¤Î <small>SELECT</small> ʸ¤Ë¤è¤êɬÍפʾðÊó¤ò¥Ç¡¼¥¿¥Ù¡¼¥¹¤Î¥·¥¹¥Æ¥à¡¦¥Æ¡¼¥Ö¥ë¤«¤é¼è¤ê½Ð¤·¤ÆÎ㼨¤·¤Æ¤¯¤ì¤Þ¤¹¡£¤Þ¤¿¡¢<i>pg_</i> ¤Ç»Ï¤Þ¤ë¥·¥¹¥Æ¥à¥Æ¡¼¥Ö¥ë¤Ë¤âµ½Ò¤µ¤ì¤Æ¤¤¤Þ¤¹¡£¤µ¤é¤Ë¡¢<i>psql -l</i> ¤Ï¤¹¤Ù¤Æ¤Î¥Ç¡¼¥¿¥Ù¡¼¥¹¤ò¥ê¥¹¥Èɽ¼¨¤·¤Þ¤¹¡£
<P>
<H4><A NAME="4.8">4.8</A>) Ì䤤¹ç¤ï¤»¤¬ÃÙ¤¤¤¦¤¨¡¢¥¤¥ó¥Ç¥Ã¥¯¥¹¤ò»È¤Ã¤Æ¤¤¤ëÍͻҤ¬¤¢¤ê¤Þ¤»¤ó¡£¤Ê¤¼¤Ç¤¹¤«¡©
</H4>
¥¤¥ó¥Ç¥Ã¥¯¥¹¤Ï¼«Æ°Åª¤Ë¤¹¤Ù¤Æ¤ÎÌ䤤¹ç¤ï¤»¤Ç»È¤ï¤ì¤ë¤ï¤±¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£¥Æ¡¼
-¥Ö¥ë¤¬ºÇ¾®¥µ¥¤¥º¤è¤êÂ礤¯¡¢Ì䤤¹ç¤ï¤»¤Ç¤½¤Î¤ï¤º¤«¤Ê¥Ñ¡¼¥»¥ó¥Æ¡¼¥¸¤Î¹Ô¤ò
+¥Ö¥ë¤¬ºÇ¾®¥µ¥¤¥º¤è¤êÂ礤¯¡¢Ì䤤¹ç¤ï¤»¤Ç¤½¤Î¤ï¤º¤«¤Ê¥Ñ¡¼¥»¥ó¥Æ¡¼¥¸¤Î¥í¥¦¤ò
ÁªÂò¤¹¤ë»þ¤À¤±¡¢¥¤¥ó¥Ç¥Ã¥¯¥¹¤Ï»È¤ï¤ì¤Þ¤¹¡£¤³¤ì¤Ï¥¤¥ó¥Ç¥Ã¥¯¥¹¥¹¥¥ã¥ó¤Ë¤è
¤êµ¯¤³¤µ¤ì¤ë¥é¥ó¥À¥à¤Ê¥Ç¥£¥¹¥¯¥¢¥¯¥»¥¹¤Ï¡¢¥Æ¡¼¥Ö¥ë¤ò¥¹¥È¥ì¡¼¥È¤ËÆɤà½ç¼¡
Áöºº¤è¤ê¤âÃÙ¤¯¤Ê¤ë¤³¤È¤¬¤È¤¤É¤¤¢¤ë¤«¤é¤Ç¤¹¡£
<P>¥¤¥ó¥Ç¥Ã¥¯¥¹¤ò»È¤¦¤«¤ò·èÄꤹ¤ë¤¿¤á¤Ë¡¢PostgreSQL ¤Ï¥Æ¡¼¥Ö¥ë¤Ë¤Ä¤¤
¤Æ¤ÎÅý·×¾ðÊó¤ò»ý¤¿¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó¡£¤³¤ÎÅý·×¾ðÊó¤Ï¡¢<SMALL>VACUUM
ANALYZE</SMALL>¤Þ¤¿¤Ï¡¢Ã±¤Ë <SMALL>ANALYZE</SMALL> ¤ò»È¤Ã¤Æ¼ý½¸¤¹¤ë¤³¤È
-¤¬¤Ç¤¤Þ¤¹¡£Åý·×¾ðÊó¤ò»È¤Ã¤Æ¥ª¥Ö¥Æ¥£¥Þ¥¤¥¶¤Ï¥Æ¡¼¥Ö¥ë¤ÎÃæ¤Ë²¿¹Ô¤¢¤ë¤«¤òÃÎ
+¤¬¤Ç¤¤Þ¤¹¡£Åý·×¾ðÊó¤ò»È¤Ã¤Æ¥ª¥Ö¥Æ¥£¥Þ¥¤¥¶¤Ï¥Æ¡¼¥Ö¥ë¤ÎÃæ¤Ë¤¢¤ë¥í¥¦¿ô¤òÃÎ
¤ê¡¢¥¤¥ó¥Ç¥Ã¥¯¥¹¤ò»È¤¦¤Ù¤¤«¤Î¤Î·èÄê¤ò¤è¤êÀµ¤·¤¯¤Ç¤¤Þ¤¹¡£Åý·×¾ðÊó¤ÏºÇŬ
¤Ê·ë¹ç½ç¤ä·ë¹çÊýË¡¤ò·è¤á¤ë¾å¤Ç¤âµ®½Å¤Ê¤â¤Î¤â¤¢¤ê¤Þ¤¹¡£Åý·×¾ðÊó¤Î¼ý½¸¤Ï¡¢
¥Æ¡¼¥Ö¥ë¤ÎÆâÍƤ¬¤«¤ï¤ë¤ÈËè¤Ë·«ÊÖ¤·¤Ê¤µ¤ì¤ë¤Ù¤¤Ç¤¹¡£</P>
"char" char 1 character
CHAR(#) bpchar »ØÄꤵ¤ì¤¿¸ÇÄêĹ¤È¤Ê¤ë¤è¤¦¤Ë¶õÇò¤¬µÍ¤á¤é¤ì¤ë
VARCHAR(#) varchar Ťµ¤Î¾å¸Â¤Î̵¤¤¥Æ¥¥¹¥È
-TEXT text Ťµ¤ÎÀ©¸Â¤ÏºÇÂç¹ÔŤˤè¤ë
+TEXT text Ťµ¤ÎÀ©¸Â¤ÏºÇÂç¥í¥¦Ä¹¤Ë¤è¤ë
BYTEA bytea ²ÄÊÑĹ¤Î¥Ð¥¤¥ÈÇÛÎó(null-byte safe)
</PRE>
<P> ÆâÉô̾¤Ë¤ªÌܤˤ«¤«¤ë¤Î¤Ï¡¢¥·¥¹¥Æ¥à¡¦¥«¥¿¥í¥°¤òÄ´¤Ù¤ë¤È¤¤ä¡¢¥¨¥é¡¼¥á¥Ã¥»¡¼¥¸¤ò¼õ¤±¼è¤ë¤È¤¤Ç¤¹¡£
-<P> ¾åµ¤Î·¿¤Î¤¦¤Á¸å¤Î£´¤Ä¤Î·¿¤Ï "varlena" ·¿¤Ç¤¹(¤¹¤Ê¤ï¤Á¡¢¥Ç¥£¥¹¥¯¤ÎºÇ½é¤Î£´¥Ð¥¤¥È¤¬¥Ç¡¼¥¿Ä¹¤Ç¡¢¤½¤ì¤Î¸å¤Ë¼ÂºÝ¤Î¥Ç¡¼¥¿¤¬Â³¤¤Þ¤¹)¡£¤³¤Î¤è¤¦¤Ë¼ÂºÝ¤Î¶õ´Ö¤ÏÀë¸À¤µ¤ì¤¿Â礤µ¤è¤ê¤â¾¯¤·Â礤¯¤Ê¤ê¤Þ¤¹¡£¤·¤«¤·¡¢¤³¤ì¤é¤Î¥Ç¡¼¥¿·¿¤Ï<small>TOAST</small>¤Ë¤è¤ê°µ½Ì¤µ¤ì¤¿¤êÊ£¿ô¹Ô¤ËÅϤäÆÊݸ¤µ¤ì¤¿¤ê¤·¤Æ¡¢¥Ç¥£¥¹¥¯¾å¤Î¶õ´Ö¤Ï»×¤Ã¤¿¤è¤ê¾®¤µ¤¯¤Ê¤ê¤Þ¤¹¡£
+<P> ¾åµ¤Î·¿¤Î¤¦¤Á¸å¤Î£´¤Ä¤Î·¿¤Ï "varlena" ·¿¤Ç¤¹(¤¹¤Ê¤ï¤Á¡¢¥Ç¥£¥¹¥¯¤ÎºÇ½é¤Î£´¥Ð¥¤¥È¤¬¥Ç¡¼¥¿Ä¹¤Ç¡¢¤½¤ì¤Î¸å¤Ë¼ÂºÝ¤Î¥Ç¡¼¥¿¤¬Â³¤¤Þ¤¹)¡£¤³¤Î¤è¤¦¤Ë¼ÂºÝ¤Î¶õ´Ö¤ÏÀë¸À¤µ¤ì¤¿Â礤µ¤è¤ê¤â¾¯¤·Â礤¯¤Ê¤ê¤Þ¤¹¡£¤·¤«¤·¡¢¤³¤ì¤é¤Î¥Ç¡¼¥¿·¿¤Ï<small>TOAST</small>¤Ë¤è¤ê°µ½Ì¤µ¤ì¤¿¤êÊ£¿ô¥í¥¦¤ËÅϤäÆÊݸ¤µ¤ì¤¿¤ê¤·¤Æ¡¢¥Ç¥£¥¹¥¯¾å¤Î¶õ´Ö¤Ï»×¤Ã¤¿¤è¤ê¾®¤µ¤¯¤Ê¤ê¤Þ¤¹¡£
<P><SMALL>CHAR()</SMALL>¤Ï¤¤¤Ä¤âŤµ¤¬Æ±¤¸Ê¸»úÎó¤òÊݸ¤¹¤ë¤Î¤ËºÇŬ¤Ç
¤¹¡£<SMALL>VARCHAR()</SMALL> ¤Ï²ÄÊÑŤÎʸ»úÎó¤òÊݸ¤¹¤ë¤Î¤ËºÇŬ¤Ç¤¹¤¬¡¢
<H4><A NAME="4.15.1">4.15.1</A>) ÄÌÈÖ(serial)¡¿¼«Æ°Áýʬ¥Õ¥£¡¼¥ë¥É¤Ï¤É¤Î¤è¤¦¤Ë¤Ä¤¯¤ê¤Þ¤¹¤«¡©
</H4>
-<P> PostgreSQL ¤Ï <small>SERIAL</small> ¥Ç¡¼¥¿·¿¤ò¥µ¥Ý¡¼¥È¤·¤Þ¤¹¡£Îó¾å¤ËÄÌÈ֤ȥ¤¥ó¥Ç¥Ã¥¯¥¹¤ò¼«Æ°ºîÀ®¤·¤Þ¤¹¡£¤¿¤È¤¨¤Ð¡¢
+<P> PostgreSQL ¤Ï <small>SERIAL</small> ¥Ç¡¼¥¿·¿¤ò¥µ¥Ý¡¼¥È¤·¤Þ¤¹¡£¥«¥é¥à¾å¤ËÄÌÈ֤ȥ¤¥ó¥Ç¥Ã¥¯¥¹¤ò¼«Æ°ºîÀ®¤·¤Þ¤¹¡£¤¿¤È¤¨¤Ð¡¢
<PRE>
CREATE TABLE person (
CREATE UNIQUE INDEX person_id_key ON person ( id );
</PRE>
ÄÌÈ֤ˤĤ¤¤Æ¤Î¤â¤Ã¤È¾Ü¤·¤¤¾ðÊó¤Ï¡¢¥ª¥ó¥é¥¤¥ó¥Þ¥Ë¥å¥¢¥ë¤Ç <I>create_sequence</I> ¤ò¤´Í÷²¼¤µ¤¤¡£
-<P> ¤Þ¤¿¡¢³Æ¹Ô¤Î<I>OID</I>¥Õ¥£¡¼¥ë¥É¤ò°ì°ÕÃͤȤ·¤Æ»È¤¦¤³¤È¤â¤Ç¤¤Þ¤¹¡£¤·¤«¤·¤Ê¤¬¤é¡¢¤â¤·¤â¥Ç¡¼¥¿¥Ù¡¼¥¹¤ò¥À¥ó¥×¤·¤Æ¤ê¥í¡¼¥É¤¹¤ëɬÍפ¬¤¢¤ë¾ì¹ç¤Ï¡¢<small>OID</small>¤ò²¹Â¸¤¹¤ë¤¿¤á¤Ë<I>pg_dump</I> ¤Ç <I>-o</I>¥ª¥×¥·¥ç¥ó¤ò»È¤¦¤«¡¢¤Þ¤¿¤Ï¡¢<small>COPY WITH OIDS</I>¥ª¥×¥·¥ç¥ó¤ò»È¤¦É¬Íפ¬¤¢¤ê¤Þ¤¹¡£
+<P> ¤Þ¤¿¡¢³Æ¥í¥¦¤Î<I>OID</I>¥Õ¥£¡¼¥ë¥É¤ò°ì°ÕÃͤȤ·¤Æ»È¤¦¤³¤È¤â¤Ç¤¤Þ¤¹¡£¤·¤«¤·¤Ê¤¬¤é¡¢¤â¤·¤â¥Ç¡¼¥¿¥Ù¡¼¥¹¤ò¥À¥ó¥×¤·¤Æ¤ê¥í¡¼¥É¤¹¤ëɬÍפ¬¤¢¤ë¾ì¹ç¤Ï¡¢<small>OID</small>¤ò²¹Â¸¤¹¤ë¤¿¤á¤Ë<I>pg_dump</I> ¤Ç <I>-o</I>¥ª¥×¥·¥ç¥ó¤ò»È¤¦¤«¡¢¤Þ¤¿¤Ï¡¢<small>COPY WITH OIDS</I>¥ª¥×¥·¥ç¥ó¤ò»È¤¦É¬Íפ¬¤¢¤ê¤Þ¤¹¡£
Bruce Momjian ¤Î<A HREF="http://www.PostgreSQL.org/docs/aw_pgsql_book">(http://www.PostgreSQL.org/docs/aw_pgsql_book)¤Î Numbering Rows</A>¤Î¾Ï¤Ë¤¢¤ê¤¢¤Þ¤¹¡£
INSERT INTO person (id, name) VALUES (new_id, 'Blaise Pascal');
</PRE>
-¤½¤¦¤·¤Æ¡¢<tt>new_id</tt> ¤ËÊݸ¤·¤¿¿·¤·¤¤Ãͤò¾¤ÎÌ䤤¹ç¤ï¤»¤Ë(¤¿¤È¤¨¤Ð¡¢<tt>person</tt> ¥Æ¡¼¥Ö¥ë¤ËÂФ¹¤ë³°Éô¥¡¼(foreign key)¤Î¤è¤¦¤Ë)»È¤¦¤È¤è¤¤¤Ç¤·¤ç¤¦¡£¼«Æ°Åª¤Ëºî¤é¤ì¤¿<small>SEQUENCE</small>¥ª¥Ö¥¸¥§¥¯¥È¤Î̾Á°¤Ï¡¢<<I>table</I>>_<<I>serialcolumn</I>>_<I>seq</I> ¤Î¤è¤¦¤Ë¤Ê¤ê¡¢¤³¤Î¤¦¤Á¡¢<I>table</I> ¤È <I>serialcolumn</I> ¤Ï¤½¤ì¤¾¤ì¥Æ¡¼¥Ö¥ë¤Î̾Á°¤È<small>SERIAL</small>Îó¤Î̾Á°¤Ç¤¹¡£
+¤½¤¦¤·¤Æ¡¢<tt>new_id</tt> ¤ËÊݸ¤·¤¿¿·¤·¤¤Ãͤò¾¤ÎÌ䤤¹ç¤ï¤»¤Ë(¤¿¤È¤¨¤Ð¡¢<tt>person</tt> ¥Æ¡¼¥Ö¥ë¤ËÂФ¹¤ë³°Éô¥¡¼(foreign key)¤Î¤è¤¦¤Ë)»È¤¦¤È¤è¤¤¤Ç¤·¤ç¤¦¡£¼«Æ°Åª¤Ëºî¤é¤ì¤¿<small>SEQUENCE</small>¥ª¥Ö¥¸¥§¥¯¥È¤Î̾Á°¤Ï¡¢<<I>table</I>>_<<I>serialcolumn</I>>_<I>seq</I> ¤Î¤è¤¦¤Ë¤Ê¤ê¡¢¤³¤Î¤¦¤Á¡¢<I>table</I> ¤È <I>serialcolumn</I> ¤Ï¤½¤ì¤¾¤ì¥Æ¡¼¥Ö¥ë¤Î̾Á°¤È<small>SERIAL</small>¥«¥é¥à¤Î̾Á°¤Ç¤¹¡£
<P>
¤¢¤ë¤¤¤Ï¡¢Í¿¤¨¤é¤ì¤¿<small>SERIAL</small>Ãͤò¡¢¤½¤ì¤¬´ûÄêÃͤȤ·¤ÆÁÞÆþ¤µ¤ì¤¿<I>¸å¤Ç(after)</I>¡¢ <I>currval</I>() ´Ø¿ô¤ò»È¤Ã¤Æ¼è¤ê½Ð¤¹¤³¤È¤â¤Ç¤¤Þ¤¹¡£¤¿¤È¤¨¤Ð¡¢
<H4><A NAME="4.16">4.16</A>) <small>OID</small> ¤È¤Ï²¿¤Ç¤¹¤«¡© <small>TID</small> ¤È¤Ï²¿¤Ç¤¹¤«¡©
</H4>
-<P> <small>OID</small> ¤È¤Ï°ì°Õ¤Î¹Ô ID ¤ËÂФ¹¤ë PostgreSQL ¤ÎÅú¤¨¤Ç¤¹¡£PostgreSQL ¤ÎÃæ¤Ç¤Ä¤¯¤é¤ì¤ë¤¹¤Ù¤Æ¤Î¹Ô¤Ï°ì°Õ¤Î <small>OID</small> ¤òÆÀ¤Þ¤¹¡£<I>initdb</I> ¤ÇȯÀ¸¤µ¤ì¤ë <small>OID</small> ¤Ï¤¹¤Ù¤Æ 16384 (<I>backend/access/transam.h</I> ¤«¤é)¤è¤ê¾®¤µ¤ÊÃͤǤ¹¡£<I>initdb</I> ¸å¤Î¤¹¤Ù¤Æ¤Î <small>OID</small> (¥æ¡¼¥¶ºîÀ®)¤Ï¤½¤ì°Ê¾å¤ÎÃͤˤʤê¤Þ¤¹¡£
+<P> <small>OID</small> ¤È¤Ï°ì°Õ¤Î¥í¥¦ID ¤ËÂФ¹¤ë PostgreSQL ¤ÎÅú¤¨¤Ç¤¹¡£PostgreSQL ¤ÎÃæ¤Ç¤Ä¤¯¤é¤ì¤ë¤¹¤Ù¤Æ¤Î¥í¥¦¤Ï°ì°Õ¤Î <small>OID</small> ¤òÆÀ¤Þ¤¹¡£<I>initdb</I> ¤ÇȯÀ¸¤µ¤ì¤ë <small>OID</small> ¤Ï¤¹¤Ù¤Æ 16384 (<I>backend/access/transam.h</I> ¤«¤é)¤è¤ê¾®¤µ¤ÊÃͤǤ¹¡£<I>initdb</I> ¸å¤Î¤¹¤Ù¤Æ¤Î <small>OID</small> (¥æ¡¼¥¶ºîÀ®)¤Ï¤½¤ì°Ê¾å¤ÎÃͤˤʤê¤Þ¤¹¡£
´ûÄê¤Ç¤Ï¡¢¤³¤ì¤é¤¹¤Ù¤Æ¤Î <small>OID</small>¤Ï°ì¤Ä¤Î¥Ç¡¼¥Ö¥ë¤ä¥Ç¡¼¥¿¥Ù¡¼¥¹Æâ¤Ëα¤Þ¤é¤º¡¢PostgreSQL ¥¤¥ó¥¹¥È¥ì¡¼¥·¥ç¥óÁ´ÂΤÎÃæ¤Ç°ì°Õ¤Ç¤¹¡£
-<P> PostgreSQL ¤Ï¥Æ¡¼¥Ö¥ë´Ö¤Î¹Ô¤ò·ë¤Ó¤Ä¤±¤ë¤¿¤á¤Ë¡¢¤½¤Î¥·¥¹¥Æ¥à¥Æ¡¼¥Ö¥ëÆâ¤Ë <small>OID</small> ¤ò»È¤¤¤Þ¤¹¡£¤³¤Î <small>OID</small> ¤ÏÆÃÄê¤Î¥æ¡¼¥¶¤Î¹Ô¤ò¼±Ê̤¹¤ë¤¿¤á¤ä·ë¹ç¤ÎÃæ¤Ç»È¤ï¤ì¤ë¤³¤È¤¬¤Ç¤¤Þ¤¹¡£<small>OID</small> ¤ÎÃͤòÊݸ¤¹¤ë¤¿¤á¤Ë¤Ï <I>OID</I> ·¿¤òÎó¤Ë»È¤¦¤³¤È¤ò¾©¤á¤Þ¤¹¡£¤è¤ê®¤¯¥¢¥¯¥»¥¹¤¹¤ë¤¿¤á¤Ë <I>OID</I> ¥Õ¥£¡¼¥ë¥É¤Ë¥¤¥ó¥Ç¥Ã¥¯¥¹¤òºî¤ë¤³¤È¤¬¤Ç¤¤Þ¤¹¡£
+<P> PostgreSQL ¤Ï¥Æ¡¼¥Ö¥ë´Ö¤Î¥í¥¦¤ò·ë¤Ó¤Ä¤±¤ë¤¿¤á¤Ë¡¢¤½¤Î¥·¥¹¥Æ¥à¥Æ¡¼¥Ö¥ëÆâ¤Ë <small>OID</small> ¤ò»È¤¤¤Þ¤¹¡£¤³¤Î <small>OID</small> ¤ÏÆÃÄê¤Î¥æ¡¼¥¶¤Î¥í¥¦¤ò¼±Ê̤¹¤ë¤¿¤á¤ä·ë¹ç¤ÎÃæ¤Ç»È¤ï¤ì¤ë¤³¤È¤¬¤Ç¤¤Þ¤¹¡£<small>OID</small> ¤ÎÃͤòÊݸ¤¹¤ë¤¿¤á¤Ë¤Ï <I>OID</I> ·¿¤ò¥«¥é¥à¤Ë»È¤¦¤³¤È¤ò¾©¤á¤Þ¤¹¡£¤è¤ê®¤¯¥¢¥¯¥»¥¹¤¹¤ë¤¿¤á¤Ë <I>OID</I> ¥Õ¥£¡¼¥ë¥É¤Ë¥¤¥ó¥Ç¥Ã¥¯¥¹¤òºî¤ë¤³¤È¤¬¤Ç¤¤Þ¤¹¡£
- O<small>ID</small> ¤Ï¡¢Á´¤Æ¤Î¥Ç¡¼¥¿¥Ù¡¼¥¹¤Ç»È¤ï¤ì¤ëÃæ±ûÎΰ褫¤é¡¢Á´¤Æ¤Î¿·¤·¤¤¹Ô¤Ë³ä¤êÅö¤Æ¤é¤ì¤Þ¤¹¡£<small>OID</small> ¤ò¾¤Î²¿¤«¤ËÊѤ¨¤¿¤¤¡¢¤¢¤ë¤¤¤Ï¸µ¤Î <small>OID</small> ¤â¥Æ¡¼¥Ö¥ë¤È°ì½ï¤Ë¥³¥Ô¡¼¤·¤¿¤¤¤Î¤Ê¤é¡¢¤Ç¤¤Ê¤¯¤Ï¤¢¤ê¤Þ¤»¤ó¡£
+ O<small>ID</small> ¤Ï¡¢Á´¤Æ¤Î¥Ç¡¼¥¿¥Ù¡¼¥¹¤Ç»È¤ï¤ì¤ëÃæ±ûÎΰ褫¤é¡¢Á´¤Æ¤Î¿·¤·¤¤¥í¥¦¤Ë³ä¤êÅö¤Æ¤é¤ì¤Þ¤¹¡£<small>OID</small> ¤ò¾¤Î²¿¤«¤ËÊѤ¨¤¿¤¤¡¢¤¢¤ë¤¤¤Ï¸µ¤Î <small>OID</small> ¤â¥Æ¡¼¥Ö¥ë¤È°ì½ï¤Ë¥³¥Ô¡¼¤·¤¿¤¤¤Î¤Ê¤é¡¢¤Ç¤¤Ê¤¯¤Ï¤¢¤ê¤Þ¤»¤ó¡£
<PRE>
<P> O<small>ID</small> ¤Ï¡¢4¥Ð¥¤¥È¤ÎÀ°¿ô¤È¤·¤ÆÊݸ¤µ¤ì¤Æ¤¤¤ë¤Î¤Ç¡¢40²¯¤ò±Û¤¨¤ë¤È°î¤ì¤Æ¤·¤Þ¤¦¤Ç¤·¤ç¤¦¡£Ã¯¤â¤³¤ì¤¬µ¯¤¤¿¤ÈÊó¹ð¤·¤Æ¤¯¤ë¿Í¤Ï¤¤¤Þ¤»¤ó¤Ç¤·¤¿¤¬¡¢¤½¤¦¤Ê¤ëÁ°¤Ë¤³¤ÎÀ©¸Â¤ò¼è¤ê½ü¤¯¤³¤È¤ò·×²è¤·¤Æ¤¤¤Þ¤¹¡£
-<P> T<small>ID</small> ¤ÏÆÃÄê¤ÎʪÍý¹Ô¤ò¤½¤Î¥Ö¥í¥Ã¥¯¤È¥ª¥Õ¥»¥Ã¥ÈÃͤǼ±Ê̤¹¤ë¤¿¤á¤Ë»È¤ï¤ì¤Þ¤¹¡£<small>TID</small> ¤Ï¹Ô¤¬½¤Àµ¤µ¤ì¤¿¤êºÆ¥í¡¼¥É¤µ¤ì¤ë¤ÈÊѤï¤ê¤Þ¤¹¡£¤½¤ì¤é¤Î <small>TID</small> ¤Ï¡¢ÊªÍý¹Ô¤ò»Ø¤¹¤¿¤á¤Ë¥¤¥ó¥Ç¥Ã¥¯¥¹µºÜ¤Ç»È¤ï¤ì¤Þ¤¹¡£
+<P> T<small>ID</small> ¤ÏÆÃÄê¤ÎʪÍý¥í¥¦¤ò¤½¤Î¥Ö¥í¥Ã¥¯¤È¥ª¥Õ¥»¥Ã¥ÈÃͤǼ±Ê̤¹¤ë¤¿¤á¤Ë»È¤ï¤ì¤Þ¤¹¡£<small>TID</small> ¤Ï¥í¥¦¤¬½¤Àµ¤µ¤ì¤¿¤êºÆ¥í¡¼¥É¤µ¤ì¤ë¤ÈÊѤï¤ê¤Þ¤¹¡£¤½¤ì¤é¤Î <small>TID</small> ¤Ï¡¢ÊªÍý¥í¥¦¤ò»Ø¤¹¤¿¤á¤Ë¥¤¥ó¥Ç¥Ã¥¯¥¹µºÜ¤Ç»È¤ï¤ì¤Þ¤¹¡£
<P>
<H4><A NAME="4.17">4.17</A>) PostgreSQL ¤Ç»È¤ï¤ì¤ë¤¤¤¯¤Ä¤«¤ÎÍѸì¤Î°ÕÌ£¤Ï²¿¤Ç¤¹¤«¡©
<UL>
<LI> ¥Æ¡¼¥Ö¥ë(table)¡¢´Ø·¸(relation)¡¢¥¯¥é¥¹(class)
-<LI> ¹Ô(row)¡¢¥ì¥³¡¼¥É(record)¡¢¥¿¥Ã¥×¥ë(tuple)
-<LI> Îó(column)¡¢¥Õ¥£¡¼¥ë¥É(field)¡¢Â°À(attribute)
+<LI> ¥í¥¦(row)¡¢¥ì¥³¡¼¥É(record)¡¢¥¿¥Ã¥×¥ë(tuple)
+<LI> ¥«¥é¥à(column)¡¢¥Õ¥£¡¼¥ë¥É(field)¡¢Â°À(attribute)
<LI> ¼èÆÀ(retrieve)¡¢ÁªÂò(select)
<LI> ÃÖ´¹(replace)¡¢¹¹¿·(update)
<LI> ÄɲÃ(append)¡¢ÁÞÆþ(insert)
<P>¥é¡¼¥¸¡¦¥ª¥Ö¥¸¥§¥¯¥ÈÁàºî¤ò¤¹¤ë¤È¤¤Ï¡¢Á°¸å¤Ë<tt>BEGIN WORK</tt>¤È<tt>COMMIT</tt>¤òÉÕ¤±¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£¤¹¤Ê¤ï¤Á¡¢<tt>lo_open</tt> ... <tt>lo_close</tt>¤ò¤Ï¤µ¤ß¹þ¤ß¤Þ¤¹¡£
-<P>¸½ºß¤Ï¡¢PostgreSQL¤Î¥È¥é¥ó¥¶¥¯¥·¥ç¥ó¤Î¥³¥ß¥Ã¥È»þ¤Ë¥é¡¼¥¸¡¦¥ª¥Ö¥¸¥§¥¯¥È¡¦¥Ï¥ó¥É¥ë¤òÊĤ¸¤ë¤³¤È¤Ë¤è¤ê¡¢<I>lo_open</I>¥³¥Þ¥ó¥É¤¬´°Î»¤·¤¿Ä¾¸å¤Ë¶¯À©Åª¤Ë¥ë¡¼¥ë¤ò¼Â¹Ô¤·¤Þ¤¹¡£¤³¤Î¤¿¤á¡¢ºÇ½é¤Ë¥Ï¥ó¥É¥ë¤ËÂФ·¤Æ²¿¤«¤ò¤·¤è¤¦¤È¤¹¤ë¤È¡¢<I>invalid large obj descriptor(¥é¡¼¥¸¥ª¥Ö¥¸¥§¥¯¥È¤Îµ½Ò»Ò¤¬ÉÔÀµ)</I>¤È¤Ê¤ê¤Þ¤¹¡£¤½¤ì¤Ç¡¢¤â¤·¡¢¥È¥é¥ó¥¶¥¯¥·¥ç¥ó¤ò»È¤¦¤Î¤ò˺¤ì¤ë¤È¡¢¡Ê¾¯¤Ê¤¯¤È¤â¤Û¤È¤ó¤É¤Î»þ´Ö¡ËƯ¤¤¤Æ¤¤¤¿¥³¡¼¥É¤¬¥¨¥é¡¼¥á¥Ã¥»¡¼¥¸¤ò½Ð¤¹¤Î¤Ç¤¹¡£
+<P>¸½ºß¤Ï¡¢PostgreSQL¤Î¥È¥é¥ó¥¶¥¯¥·¥ç¥ó¤Î¥³¥ß¥Ã¥È»þ¤Ë¥é¡¼¥¸¡¦¥ª¥Ö¥¸¥§¥¯¥È¡¦¥Ï¥ó¥É¥ë¤òÊĤ¸¤ë¤³¤È¤Ë¤è¤ê¡¢<I>lo_open</I>¥³¥Þ¥ó¥É¤¬´°Î»¤·¤¿Ä¾¸å¤Ë¶¯À©Åª¤Ë¥ë¡¼¥ë¤ò¼Â¹Ô¤·¤Þ¤¹¡£¤³¤Î¤¿¤á¡¢ºÇ½é¤Ë¥Ï¥ó¥É¥ë¤ËÂФ·¤Æ²¿¤«¤ò¤·¤è¤¦¤È¤¹¤ë¤È¡¢<I>invalid large obj descriptor(¥é¡¼¥¸¡¦¥ª¥Ö¥¸¥§¥¯¥È¤Îµ½Ò»Ò¤¬ÉÔÀµ)</I>¤È¤Ê¤ê¤Þ¤¹¡£¤½¤ì¤Ç¡¢¤â¤·¡¢¥È¥é¥ó¥¶¥¯¥·¥ç¥ó¤ò»È¤¦¤Î¤ò˺¤ì¤ë¤È¡¢¡Ê¾¯¤Ê¤¯¤È¤â¤Û¤È¤ó¤É¤Î»þ´Ö¡ËƯ¤¤¤Æ¤¤¤¿¥³¡¼¥É¤¬¥¨¥é¡¼¥á¥Ã¥»¡¼¥¸¤ò½Ð¤¹¤Î¤Ç¤¹¡£
<P>¤â¤·¡¢<small>ODBC</small>¤Î¤è¤¦¤Ê¥¯¥é¥¤¥¢¥ó¥È¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤ò¤ª»È¤¤¤Ê¤é¡¢<tt>auto-commit off</tt>¤òÀßÄꤹ¤ëɬÍפ¬¤¢¤ë¤«¤â¤·¤ì¤Þ¤»¤ó¡£
<P>
-<H4><A NAME="4.21">4.21</A>) ¸½ºß¤Î»þ¹ï¤¬¥Ç¥Õ¥©¥ë¥È¤È¤Ê¤ë¤è¤¦¤ÊÎó¤Ï¤É¤Î¤è¤¦¤Ë¤Ä¤¯¤ê¤Þ¤¹¤«¡©<BR></H4>
+<H4><A NAME="4.21">4.21</A>) ¸½ºß¤Î»þ¹ï¤¬¥Ç¥Õ¥©¥ë¥È¤È¤Ê¤ë¤è¤¦¤Ê¥«¥é¥à¤Ï¤É¤Î¤è¤¦¤Ë¤Ä¤¯¤ê¤Þ¤¹¤«¡©<BR></H4>
<P><i>CURRENT_TIMESTAMP</i>¤ò»È¤¤¤Þ¤¹:
<PRE>
<H4><A NAME="4.22">4.22</A>) ¤Ê¤¼¡¢<small>IN</small>¤ò»È¤¦ÉûÌ䤤¹ç¤ï¤»¤¬¤È¤Æ¤âÃÙ¤¤¤Î¤Ç¤¹¤«¡©
</H4>
<P>
-¸½ºß¡¢³°ÉôÌ䤤¹ç¤ï¤»¤Î³Æ¹Ô¤Ë¤Ä¤¤¤ÆÉûÌ䤤¹ç¤ï¤»¤Î·ë²Ì¤ò½çÈ֤˥¹¥¥ã¥ó¤¹¤ë¤³¤È¤Ë¤è¤ê¡¢ÉûÌ䤤¹ç¤ï¤»¤ò³°ÉôÌ䤤¹ç¤ï¤»¤Ë·ë¹ç¤·¤Æ¤¤¤Þ¤¹¡£ÅöÌ̤Ï<small>IN</small>¤ò<small>EXIST</small>S¤ÇÃÖ¤´¹¤¨¤ë¤³¤È¤Ç¤¹¡§
+¸½ºß¡¢³°ÉôÌ䤤¹ç¤ï¤»¤Î³Æ¥í¥¦¤Ë¤Ä¤¤¤ÆÉûÌ䤤¹ç¤ï¤»¤Î·ë²Ì¤ò½çÈ֤˥¹¥¥ã¥ó¤¹¤ë¤³¤È¤Ë¤è¤ê¡¢ÉûÌ䤤¹ç¤ï¤»¤ò³°ÉôÌ䤤¹ç¤ï¤»¤Ë·ë¹ç¤·¤Æ¤¤¤Þ¤¹¡£ÅöÌ̤Ï<small>IN</small>¤ò<small>EXIST</small>S¤ÇÃÖ¤´¹¤¨¤ë¤³¤È¤Ç¤¹¡§
<PRE>
<STRONG>SELECT *</STRONG>
FROM tab
<STRONG>SELECT *</STRONG>
FROM t1 LEFT OUTER JOIN t2 USING (col);</pre>
-¤³¤ì¤é¤Î¾ÝħŪ¤ÊÌ䤤¹ç¤ï¤»¤Ç¤Ï t1.col ¤ò t2.col ¤È·ë¹ç¤·¤Æ¡¢t1 ¤Î·ë¹ç¤µ¤ì¤Ê¤«¤Ã¤¿¹Ô(t2 ¤È°ìÃפ·¤Ê¤«¤Ã¤¿¹Ô)¤âÊÖ¤·¤Æ¤¤¤Þ¤¹¡£<small>RIGHT</small> ·ë¹ç¤Ï t2 ¤Î·ë¹ç¤µ¤ì¤Ê¤«¤Ã¤¿¹Ô¤ò²Ã¤¨¤ë¤Ç¤·¤ç¤¦¡£<small>FULL</small> ·ë¹ç¤Ï¡¢°ìÃפ·¤¿¹Ô¤Ë t1 ¤È t2 ¤«¤é¤Ï·ë¹ç¤µ¤ì¤Ê¤«¤Ã¤¿¹Ô¤òÊÖ¤¹¤Ç¤·¤ç¤¦¡£<small>OUTER</small> ¤È¤¤¤¦¸ÀÍդϥª¥×¥·¥ç¥ó¤Ç <small>LEFT</small>, <small>RIGHT</small>, ¤Þ¤¿¤Ï <small>FULL</small> ¤Ê¤É¤Î·ë¹ç¤ò²¾Äꤵ¤ì¤Æ¤¤¤Þ¤¹¡£
+¤³¤ì¤é¤Î¾ÝħŪ¤ÊÌ䤤¹ç¤ï¤»¤Ç¤Ï t1.col ¤ò t2.col ¤È·ë¹ç¤·¤Æ¡¢t1 ¤Î·ë¹ç¤µ¤ì¤Ê¤«¤Ã¤¿¥í¥¦(t2 ¤È°ìÃפ·¤Ê¤«¤Ã¤¿¥í¥¦)¤âÊÖ¤·¤Æ¤¤¤Þ¤¹¡£<small>RIGHT</small> ·ë¹ç¤Ï t2 ¤Î·ë¹ç¤µ¤ì¤Ê¤«¤Ã¤¿¥í¥¦¤ò²Ã¤¨¤ë¤Ç¤·¤ç¤¦¡£<small>FULL</small> ·ë¹ç¤Ï¡¢°ìÃפ·¤¿¥í¥¦¤Ë t1 ¤È t2 ¤«¤é¤Ï·ë¹ç¤µ¤ì¤Ê¤«¤Ã¤¿¥í¥¦¤òÊÖ¤¹¤Ç¤·¤ç¤¦¡£<small>OUTER</small> ¤È¤¤¤¦¸ÀÍդϥª¥×¥·¥ç¥ó¤Ç <small>LEFT</small>, <small>RIGHT</small>, ¤Þ¤¿¤Ï <small>FULL</small> ¤Ê¤É¤Î·ë¹ç¤ò²¾Äꤵ¤ì¤Æ¤¤¤Þ¤¹¡£
°ÊÁ°¤Î¥ê¥ê¡¼¥¹¤Ç¤Ï³°Éô·ë¹ç(outer join)¤ò<small>UNION</small> ¤È <small>NOT IN</small> ¤ò»È¤Ã¤Æ¥·¥ß¥å¥ì¡¼¥È¤Ç¤¤Þ¤¹¡£
¤¿¤È¤¨¤Ð¡¢<i>tab1</i> ¤È <i>tab2</i> ¤ò·ë¹ç¤¹¤ë¤È¤¤Ï¡¢¼¡¤ÎÌ䤤¹ç¤ï¤»¤ÇÆó¤Ä¤Î¥Æ¡¼¥Ö¥ë¤ò<i>³°Éô</i>·ë¹ç¤·¤Þ¤¹¡£
<P>
¤â¤Á¤í¤ó¡¢¥¯¥é¥¤¥¢¥ó¥È¤ÏƱ»þ¤Ë°Û¤Ê¤ëÊ£¿ô¤Î¥Ç¡¼¥¿¥Ù¡¼¥¹¤ØÀܳ¤·¤Æ¤½¤³¤Ë¤¢¤ë¾ðÊó¤ò¥Þ¡¼¥¸¤¹¤ë¤³¤È¤Ï¤Ç¤¤Þ¤¹¡£
+<P>
+<H4><A NAME="4.25">4.25</A>) ´Ø¿ô¤ÇÊ£¿ô¤Î¥í¥¦¤Þ¤¿¤Ï¥«¥é¥à¤òÊÖ¤¹¤Ë¤Ï¤É¤¦¤·¤Þ¤¹¤«¡©<BR></H4>
+
+ <P>¤â¤·¡¢PL/pgSQL ´Ø¿ô¤Ç<i>refcursors</i>¤ò»È¤¦¤È·ë²Ì¤ÎÁȤòÊÖ¤¹¤³¤È¤¬¤Ç¤¤Þ¤¹¡£<a
+href="http://developer.postgresql.org/docs/postgres/plpgsql-cursors.html">
+http://developer.postgresql.org/docs/postgres/plpgsql-cursors.html</a> ¤Î
+23.7.3.3 Àá¤ò¤´Í÷²¼¤µ¤¤¡£</P>
+
+
<P>
<HR>
<H2><CENTER>PostgreSQL¤Î³ÈÄ¥¤Ë¤Ä¤¤¤Æ¤Î¼ÁÌä</CENTER></H2>
[ÌõÃí¡§
ÆüËܸìÈǤÎÀ½ºî¤Ë¤Ä¤¤¤Æ¤Ï°Ê²¼¤ÎÄ̤ê¤Ç¤¹¡£
- ºÇ½ª¹¹¿·Æü: 2002ǯ04·î05Æü
+ ºÇ½ª¹¹¿·Æü: 2002ǯ05·î08Æü
ËÝÌõ¼Ô: ·¬Â¼ ½á (<A HREF="mailto:juk@postgresql.jp">Jun Kuwamura <juk@postgresql.jp></A>)
¤³¤ÎFAQ¤ÎÏÂÌõ¤ÎºîÀ®¤Ë¤¢¤¿¤ê¶¨ÎϤò¤·¤Æ¤¯¤À¤µ¤Ã¤¿Êý¡¹(·É¾Î¤Ïά¤µ¤»¤Æ¤¤¤¿¤À¤¤Þ¤¹):