Files
threshold/internal/db/sqltest/tests/history/hst_table_name.sql
T
Michael Gaffney 8ae658a570 feat(sql): Add history table and triggers for iam_scope
This adds a history table for `iam_scope`. It also includes reusable
triggers to maintain the included history table and future history
tables.

This also includes a test suite that runs on any table ending in `_hst`.
2023-05-31 12:18:14 +00:00

17 lines
471 B
PL/PgSQL

-- Copyright (c) HashiCorp, Inc.
-- SPDX-License-Identifier: MPL-2.0
begin;
select plan(5);
-- Verify the function exists and is declared properly
select has_function('hst_table_name', array['name', 'name']);
select volatility_is('hst_table_name', 'immutable');
select is_strict('hst_table_name');
select is(hst_table_name('public', 'iam_scope'), 'public.iam_scope_hst');
select is(hst_table_name(null, null), null);
select * from finish();
rollback;