From e6d984eaaae7f2e4ad6034fd7f4e6bb4e1b0808f Mon Sep 17 00:00:00 2001 From: Copple <10214025+kiwicopple@users.noreply.github.com> Date: Wed, 15 Feb 2023 16:19:46 +0100 Subject: [PATCH] Revert "Update apps/docs/pages/guides/database/tables.mdx" This reverts commit ad91ee8d5901aa1c260e98bd46f6c350dddb3707. --- apps/docs/pages/guides/database/tables.mdx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/apps/docs/pages/guides/database/tables.mdx b/apps/docs/pages/guides/database/tables.mdx index c3eec681172..535da8bcb9d 100644 --- a/apps/docs/pages/guides/database/tables.mdx +++ b/apps/docs/pages/guides/database/tables.mdx @@ -243,6 +243,14 @@ You would [connect](../../guides/database/connecting-to-postgres#direct-connecti ```bash psql -h DATABASE_URL -p 5432 -d postgres -U postgres \ -c "\COPY movies FROM './movies.csv';" +``` +Additionally use the `DELIMITER`, `HEADER` and `FORMAT` options as defined in the PostgreSQL [COPY](https://www.postgresql.org/docs/current/sql-copy.html) docs. +```bash +psql -h DATABASE_URL -p 5432 -d postgres -U postgres \ + -c "\COPY movies FROM './movies.csv' WITH DELIMITER ',' CSV HEADER" +``` + +Tip: If you get a `FATAL: password authentication failed for user "postgres"` error, reset the password in your Database settings and try again. ## Joining tables with Foreign Keys