pg_cron and more
0) What you’ll end up with AWS confirms: 1) Create & attach a custom DB parameter group (required for pg_cron) In the AWS Console Parameters to set A) shared_preload_libraries AWS…
0) What you’ll end up with AWS confirms: 1) Create & attach a custom DB parameter group (required for pg_cron) In the AWS Console Parameters to set A) shared_preload_libraries AWS…
CREATE TABLE sales.orders_new3 ( created_at timestamp(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, order_id uuid NOT NULL DEFAULT gen_random_uuid(), customer_id bigint NOT NULL, amount numeric(12,2) NOT NULL, PRIMARY KEY (created_at, order_id) ) PARTITION…
DROP TABLE IF EXISTS sales CASCADE; -- Create parent table with partitioning CREATE TABLE sales ( id bigint NOT NULL GENERATED ALWAYS AS IDENTITY, sale_date DATE NOT NULL, amount NUMERIC(10,…
-- Use or create database (adjust as needed) -- \c test; DROP TABLE IF EXISTS calendar_basic; CREATE TABLE calendar_basic ( date_id INT NOT NULL PRIMARY KEY, full_date DATE NOT NULL,…