-- 49_sequences_and_setval.sql
-- Banking Pattern Pack — PostgreSQL
-- Purpose: Sequences and setval for IDs.
-- 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;

-- Sequences demo
CREATE SEQUENCE IF NOT EXISTS bank.ticket_seq START 1000;
SELECT nextval('bank.ticket_seq');
-- SELECT setval('bank.ticket_seq', 5000, true);
