pg_partitioner 0.3.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/pg_partitioner/separation_type/month.rb +4 -2
- data/lib/pg_partitioner/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e4719f544121f8676abcbe5306730004a0aaf656ee91900358b1fe4a2fd9f267
|
4
|
+
data.tar.gz: 5189fe8eaf6e09eee78b49bf0b443af8f78f7ab2ccb3f61f4a1b844c5299d93b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fb60a6c18291ee2010b5b3774dbdaeba8809a1330116d679415f254a15279a04068eb8d6957ae239f992049e9d83e5fc1184cb1bf5fc32b82591f948bc1c9b0d
|
7
|
+
data.tar.gz: 49b5da00fccf38cc3616486e06f14c13c17d019c23477c3a84299f789fa2c61dccbc4111a55c240c0691dbce8efc35ea30721f6e8a8a7d89a85353463c069546
|
@@ -41,7 +41,7 @@ module PgPartitioner
|
|
41
41
|
DECLARE
|
42
42
|
curY varchar(4);
|
43
43
|
curM varchar(2);
|
44
|
-
tbl varchar(
|
44
|
+
tbl varchar(40);
|
45
45
|
BEGIN
|
46
46
|
select cast(DATE_PART('year', new.#{parting_column}) as varchar) into curY;
|
47
47
|
select lpad(cast(DATE_PART('month', new.#{parting_column}) as varchar), 2, '0') into curM;
|
@@ -78,10 +78,12 @@ module PgPartitioner
|
|
78
78
|
end
|
79
79
|
|
80
80
|
def drop_partitioning_by_month_trigger_sql
|
81
|
-
"DROP TRIGGER #{table_name}_insert ON #{table_name};
|
81
|
+
sql = "DROP TRIGGER #{table_name}_insert ON #{table_name};
|
82
82
|
DROP FUNCTION #{table_name}_insert_trigger();
|
83
83
|
DROP TRIGGER #{table_name}_after_insert ON #{table_name};
|
84
84
|
DROP FUNCTION #{table_name}_delete_trigger();"
|
85
|
+
|
86
|
+
execute_sql(sql)
|
85
87
|
end
|
86
88
|
|
87
89
|
def create_partition_indexes(partition_table_name)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pg_partitioner
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ovsapyan Mishel
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-10-
|
11
|
+
date: 2022-10-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|