formatting consistency for 'create function' statements (#2620)
This commit is contained in:
1 parent
8908dccf6d
commit
96a630905f
7 files changed
+15
-36
No files matched your search
@@ -59,9 +59,7 @@ func TestEnsureMigrationLog_UpdateForEditionSupport(t *testing.T) {
|
||||
timestamp with time zone
|
||||
default current_timestamp;
|
||||
|
||||
create or replace function
|
||||
default_create_time()
|
||||
returns trigger
|
||||
create or replace function default_create_time() returns trigger
|
||||
as $$
|
||||
begin
|
||||
if new.create_time is distinct from now() then
|
||||
@@ -72,9 +70,7 @@ func TestEnsureMigrationLog_UpdateForEditionSupport(t *testing.T) {
|
||||
end;
|
||||
$$ language plpgsql;
|
||||
|
||||
create or replace function
|
||||
immutable_columns()
|
||||
returns trigger
|
||||
create or replace function immutable_columns() returns trigger
|
||||
as $$
|
||||
declare
|
||||
col_name text;
|
||||
@@ -118,9 +114,7 @@ func TestEnsureMigrationLog_UpdateForEditionSupport(t *testing.T) {
|
||||
update on log_migration
|
||||
for each row execute procedure immutable_columns('id', 'migration_version', 'create_time', 'entry');
|
||||
|
||||
create or replace function
|
||||
log_migration_version()
|
||||
returns trigger
|
||||
create or replace function log_migration_version() returns trigger
|
||||
as $$
|
||||
declare current_version bigint;
|
||||
begin
|
||||
|
||||
@@ -120,9 +120,7 @@ alter table log_migration
|
||||
alter column edition drop default;
|
||||
`
|
||||
migrationLogReplaceVersionTrigger = `
|
||||
create or replace function
|
||||
log_migration_version()
|
||||
returns trigger
|
||||
create or replace function log_migration_version() returns trigger
|
||||
as $$
|
||||
declare current_version bigint;
|
||||
begin
|
||||
|
||||
@@ -9,9 +9,7 @@ create table log_migration(
|
||||
comment on table log_migration is
|
||||
'log_migration entries are logging output from database migrations';
|
||||
|
||||
create or replace function
|
||||
log_migration_version()
|
||||
returns trigger
|
||||
create or replace function log_migration_version() returns trigger
|
||||
as $$
|
||||
declare current_version bigint;
|
||||
begin
|
||||
|
||||
@@ -20,8 +20,7 @@ begin;
|
||||
|
||||
-- session_credentials_sha256_credential sets the credential_sha256
|
||||
-- to digest(credential, 'sha256')
|
||||
create function session_credentials_sha256_credential()
|
||||
returns trigger
|
||||
create function session_credentials_sha256_credential() returns trigger
|
||||
as $$
|
||||
begin
|
||||
new.credential_sha256 = digest(new.credential, 'sha256');
|
||||
|
||||
@@ -12,8 +12,7 @@ begin;
|
||||
--
|
||||
-- Note that some aggregates depend on data from other aggretates, so the order
|
||||
-- that they are passed to this function matters.
|
||||
create function wtt_load(persona text, variadic aggregates text[])
|
||||
returns void
|
||||
create function wtt_load(persona text, variadic aggregates text[]) returns void
|
||||
as $$
|
||||
declare
|
||||
agg text;
|
||||
|
||||
@@ -2,8 +2,7 @@ begin;
|
||||
-- _wtt_load_widgets_iam populates all iam_ tables for the widgets persona.
|
||||
-- iam does not depend on any other aggregates, but others depend on it,
|
||||
-- as such is it should be first in the list.
|
||||
create function _wtt_load_widgets_iam()
|
||||
returns void
|
||||
create function _wtt_load_widgets_iam() returns void
|
||||
as $$
|
||||
begin
|
||||
-- Add organizations
|
||||
@@ -91,8 +90,7 @@ begin;
|
||||
|
||||
-- _wtt_load_kms populates all kms_ tables for the widgets persona.
|
||||
-- kms depends on iam.
|
||||
create function _wtt_load_widgets_kms()
|
||||
returns void
|
||||
create function _wtt_load_widgets_kms() returns void
|
||||
as $$
|
||||
begin
|
||||
insert into kms_root_key
|
||||
@@ -130,8 +128,7 @@ begin;
|
||||
|
||||
-- _wtt_load_widgets_auth populates all auth_ tables for the widgets persona.
|
||||
-- auth depends on iam, and kms.
|
||||
create function _wtt_load_widgets_auth()
|
||||
returns void
|
||||
create function _wtt_load_widgets_auth() returns void
|
||||
as $$
|
||||
begin
|
||||
insert into auth_password_conf
|
||||
@@ -197,8 +194,7 @@ begin;
|
||||
|
||||
-- _wtt_load_widgets_hosts populates all host_ tables for the widgets persona.
|
||||
-- hosts depend on iam.
|
||||
create function _wtt_load_widgets_hosts()
|
||||
returns void
|
||||
create function _wtt_load_widgets_hosts() returns void
|
||||
as $$
|
||||
begin
|
||||
insert into static_host_catalog
|
||||
@@ -312,8 +308,7 @@ begin;
|
||||
|
||||
-- _wtt_load_widgets_targets populates all target_ tables for the widgets persona.
|
||||
-- targets depend on iam, auth, hosts.
|
||||
create function _wtt_load_widgets_targets()
|
||||
returns void
|
||||
create function _wtt_load_widgets_targets() returns void
|
||||
as $$
|
||||
begin
|
||||
insert into target_tcp
|
||||
@@ -337,8 +332,7 @@ begin;
|
||||
end;
|
||||
$$ language plpgsql;
|
||||
|
||||
create function _wtt_load_widgets_credentials()
|
||||
returns void
|
||||
create function _wtt_load_widgets_credentials() returns void
|
||||
as $$
|
||||
begin
|
||||
insert into credential_vault_store
|
||||
@@ -434,8 +428,7 @@ begin;
|
||||
end;
|
||||
$$ language plpgsql;
|
||||
|
||||
create function _wtt_load_widgets_sessions()
|
||||
returns void
|
||||
create function _wtt_load_widgets_sessions() returns void
|
||||
as $$
|
||||
begin
|
||||
insert into session
|
||||
|
||||
@@ -33,9 +33,7 @@ func Init(t testing.TB, db *dbw.DB) {
|
||||
version wt_version
|
||||
);
|
||||
|
||||
create or replace function
|
||||
oplog_test_version_column()
|
||||
returns trigger
|
||||
create or replace function oplog_test_version_column() returns trigger
|
||||
as $$
|
||||
begin
|
||||
if pg_trigger_depth() = 1 then
|
||||
|
||||
Reference in new issue
Block a user