On 3/26/2014 1:07 PM, Hall, Samuel L (Sam) wrote:

ERROR: syntax error at or near "LIKE"

LINE 2: CREATE TABLE tse_history_old (LIKE tse_history)


thats the syntax from http://www.postgresql.org/docs/current/static/sql-createtable.html

try it in psql instead of pgadmin ?


earlier, you mentioned...

"PostgreSQL 9.3.0 on x86_64-unknown-linux-gnu, compiled by gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3, 64-bit"


BTW, you really should update that database server to 9.3.4


What I need to do is copy a table completely, all data, indexes, keys


COPY TABLE ... (LIKE ...) will copy fields, constraints, and indexes (given that you used INCLUDING ALL), but it doesn't copy data.



Reply via email to