1

im trying to export my table from Postgresql (RDS) on Amazon Web Services using the following command:

psql -t -A -F"," -c "select * from Album" > album.csv -h amazon-instance -p 5432 -U username -W -d chinook

I get this error message:

ERROR:  relation "album" does not exist
LINE 1: select * from Album

The reason for that error message is that my table starts with a capital (A)lbum so how can I escape my command to make this work?

Thank You

user1896576
  • 75
  • 1
  • 9

1 Answers1

3

I had to escape the capital letter in the Album table on my psql command as follows:

psql -t -A -F"," -c "select * from "\""Album\"" > album.csv -h amazon-instance -p 5432 -U username -W -d chinook
user1896576
  • 75
  • 1
  • 9