[GENERAL] How Copy from a view to CSV file

2010-02-01 Thread Vijay Sharma
I want to copy view's data into a .CSV file. But postgresql is generating an error as ERROR: cannot copy from view 'myview' I am executing the command COPY temp_error_view TO '/tmp/tempError.csv' USING DELIMITERS ',' WITH CSV ; I think postgresql doesn't allow to copy from view to csv directly

[GENERAL] How Copy from a view to CSV file

2010-02-01 Thread Vijay Sharma
I want to copy view's data into a .CSV file. But postgresql is generating an error as ERROR: cannot copy from view 'myview' I am executing the command COPY temp_error_view TO '/tmp/tempError.csv' USING DELIMITERS ',' WITH CSV ; I think postgresql doesn't allow to copy from view to csv directly

[GENERAL] how to update a view from a table

2010-01-28 Thread Vijay Sharma
How can i update all the fields of a view from a table(this is table different from the table which has created the view)? I don't want to specify the name of the columns in the commands e.g i want to do something like this UPDATE any_view SET (SELECT * FROM any_view) = (SELECT * FROM another_ta