วันจันทร์ที่ 14 กรกฎาคม พ.ศ. 2557

Postgres Command line for dump table

EX

pg_dump -t <<table>> -f  <<file>>  <<database name>>

สร้าง Table สำหรับ รวม partition table For postgres

ตัวอย่าง คำสั่ง
create table <<table temp>> as select * from  <<temp>>

คำสั่งนี้ ใช้สำหรับ สร้าง table ที่ มี filed เหมือนกับ ต้นฉบับ ทุกประกาศ ให้ ใส่เงื่อนไข ที่เป็นเท็จ ลงไป ก็จะได้ table ที่ มี filed เหมือน ต้นฉบับ แต่ไม่มี data