There are times when it is desirable to pass the results of a select a file, postgres allows you to perform this operation. For this you must run the following command at the console of postgres.
- postgres = # copy (select * from table_name) to 'directorio_name / file_name',
- postgres = # copy (select * from students) to '/ tmp / data.txt';
IMPORTANT:
is important to remember some postgres commands that allow assistance.
- postgres = # \\ h => can get help from the postgres commands.
- postgres = # \\ help command => can get help from a postgres specific command.
- postgres = # \\? => Can get help from the postgres client commands. Before concluding
"Thank you for sharing your knowledge"
0 comments:
Post a Comment