Index: /temp/trunk/html/admin/system/bkup.php
===================================================================
--- /temp/trunk/html/admin/system/bkup.php	(revision 5677)
+++ /temp/trunk/html/admin/system/bkup.php	(revision 5678)
@@ -145,8 +145,9 @@
 		
 		if ($val != "dtb_bkup") {
-			// ¥Æ¡¼¥Ö¥ë¹½À®¤ò¼èÆÀ
-			$arrAutoInc = lfGetAutoIncrement($val);
 			
-			sfprintr($arrAutoInc);
+			// ¼«Æ°ºÎÈÖ·¿¤Î¹½À®¤ò¼èÆÀ¤¹¤ë
+			$csv_autoinc = lfGetAutoIncrement($val);
+			
+			//sfprintr($csv_autoinc);
 			
 			// Á´¥Ç¡¼¥¿¤ò¼èÆÀ
@@ -246,6 +247,34 @@
 }
 
-// ¼«Æ°ºÎÈÖ·¿ÃÍ¤ò¼èÆÀ¤¹¤ë
+// ¼«Æ°ºÎÈÖ·¿¤òCSV½ÐÎÏ·Á¼°¤ËÊÑ´¹¤¹¤ë
 function lfGetAutoIncrement($table_name){
+	$arrColList = lfGetColumnList($table_name);
+	
+	sfprintr($arrColList);
+	
+}
+
+// ¥Æ¡¼¥Ö¥ë¹½À®¤ò¼èÆÀ¤¹¤ë
+function lfGetColumnList($table_name){
+	$objQuery = new SC_Query();
+
+	if(DB_TYPE == "pgsql"){
+		$sql = "SELECT 
+					a.attname, t.typname, a.attnotnull, d.adsrc as defval, a.atttypmod,	a.attnum as fldnum,	e.description 
+				FROM 
+					pg_class c,
+					pg_type t,
+					pg_attribute a left join pg_attrdef d on (a.attrelid=d.adrelid and a.attnum=d.adnum)
+								   left join pg_description e on (a.attrelid=e.objoid and a.attnum=e.objsubid)
+				WHERE (c.relname=?) AND (c.oid=a.attrelid) AND (a.atttypid=t.oid) AND a.attnum > 0
+				ORDER BY fldnum";
+		$arrRet = $objQuery->getAll($sql, array($table_name));
+	}
+	
+	return sfSwapArray($arrRet);
+}
+
+// ¼«Æ°ºÎÈÖ·¿¤ÎÃÍ¤ò¼èÆÀ¤¹¤ë
+function lfGetAutoIncrementVal($table_name){
 	$objQuery = new SC_Query();
 
@@ -265,7 +294,5 @@
 		$arrRet = $objQuery->getAll($sql, array($table_name));
 	}
-	
 	return $arrRet;
-
 }
 
