snapshot of https://github.com/sqlc-dev/sqlc.git (main, 2026-09-16; blobs > 131072B omitted)
Some checks failed
kotlin / test (push) Has been skipped
python / test (push) Has been skipped
typescript / test (push) Has been skipped
go / build darwin/amd64 (push) Has been cancelled
go / build linux/amd64 (push) Has been cancelled
go / build windows/amd64 (push) Has been cancelled
go / build darwin/arm64 (push) Has been cancelled
go / build linux/arm64 (push) Has been cancelled
go / build windows/arm64 (push) Has been cancelled
go / test (push) Has been cancelled
go / vuln_check (push) Has been cancelled
Some checks failed
kotlin / test (push) Has been skipped
python / test (push) Has been skipped
typescript / test (push) Has been skipped
go / build darwin/amd64 (push) Has been cancelled
go / build linux/amd64 (push) Has been cancelled
go / build windows/amd64 (push) Has been cancelled
go / build darwin/arm64 (push) Has been cancelled
go / build linux/arm64 (push) Has been cancelled
go / build windows/arm64 (push) Has been cancelled
go / test (push) Has been cancelled
go / vuln_check (push) Has been cancelled
This commit is contained in:
24
internal/endtoend/testdata/ddl_create_trigger/postgresql/stdlib/schema.sql
vendored
Normal file
24
internal/endtoend/testdata/ddl_create_trigger/postgresql/stdlib/schema.sql
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
CREATE SCHEMA tdd;
|
||||
|
||||
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
|
||||
CREATE EXTENSION IF NOT EXISTS pgcrypto
|
||||
SCHEMA public
|
||||
VERSION "1.3";
|
||||
|
||||
CREATE FUNCTION tdd.trigger_set_timestamp() RETURNS trigger
|
||||
LANGUAGE plpgsql
|
||||
AS $$BEGIN
|
||||
NEW.ts_updated = NOW();
|
||||
RETURN NEW;
|
||||
END;
|
||||
$$;
|
||||
|
||||
CREATE TABLE tdd.tests (
|
||||
test_id uuid DEFAULT uuid_generate_v4() PRIMARY KEY,
|
||||
title text DEFAULT ''::text NOT NULL,
|
||||
descr text DEFAULT ''::text NOT NULL,
|
||||
ts_created timestamp with time zone DEFAULT now() NOT NULL,
|
||||
ts_updated timestamp with time zone DEFAULT now() NOT NULL
|
||||
);
|
||||
|
||||
CREATE TRIGGER set_timestamp BEFORE UPDATE ON tdd.tests FOR EACH ROW EXECUTE FUNCTION tdd.trigger_set_timestamp();
|
||||
Reference in New Issue
Block a user