-- 57_copy_to_from_csv.sql
-- Banking Pattern Pack — PostgreSQL
-- Purpose: COPY TO/FROM CSV ETL snippets.
-- Context: Retail bank example with customers, accounts, transactions, cards, loans.
-- Date: 2025-08-18
-- Notes:
--   * Safe to read; run on a development DB.
--   * Requires: CREATE privileges; some files may need superuser for extensions.
--   * Search path set to 'bank' schema for clarity.
SET search_path = bank, public;

-- COPY TO/FROM CSV
-- \copy bank.accounts TO '/tmp/accounts.csv' CSV HEADER;
-- \copy bank.accounts FROM '/tmp/accounts.csv' CSV HEADER;
