pgpack-dumper 0.3.2.2__cp311-cp311-macosx_10_14_x86_64.whl → 0.3.3.0__cp311-cp311-macosx_10_14_x86_64.whl
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.
Potentially problematic release.
This version of pgpack-dumper might be problematic. Click here for more details.
- pgpack_dumper/common/queryes/attributes.sql +6 -6
- pgpack_dumper/common/reader.cpython-311-darwin.so +0 -0
- pgpack_dumper/dumper.py +4 -4
- pgpack_dumper/version.py +1 -1
- {pgpack_dumper-0.3.2.2.dist-info → pgpack_dumper-0.3.3.0.dist-info}/METADATA +1 -1
- {pgpack_dumper-0.3.2.2.dist-info → pgpack_dumper-0.3.3.0.dist-info}/RECORD +9 -9
- {pgpack_dumper-0.3.2.2.dist-info → pgpack_dumper-0.3.3.0.dist-info}/WHEEL +0 -0
- {pgpack_dumper-0.3.2.2.dist-info → pgpack_dumper-0.3.3.0.dist-info}/licenses/LICENSE +0 -0
- {pgpack_dumper-0.3.2.2.dist-info → pgpack_dumper-0.3.3.0.dist-info}/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
select json_agg(json_build_array(
|
|
2
|
-
|
|
3
|
-
case when
|
|
4
|
-
|
|
5
|
-
(atttypmod - 4) & 65535 end else 0 end, attndims)
|
|
6
|
-
from pg_attribute where attrelid = '{table_name}'::regclass and attnum > 0 and not attisdropped;
|
|
1
|
+
select json_agg(json_build_array(num, json_string))::text::bytea as metadata from (
|
|
2
|
+
select row_number() over(order by attnum) as num, json_build_array(attname, atttypid::int4,
|
|
3
|
+
case when atttypid = 1042 then atttypmod - 4 when atttypid = 1700 then case when (atttypmod - 4) >> 16 = -1
|
|
4
|
+
then 10 else (atttypmod - 4) >> 16 end else attlen end, case when atttypid = 1700 then case when
|
|
5
|
+
(atttypmod - 4) >> 16 = -1 then 0 else (atttypmod - 4) & 65535 end else 0 end, attndims ) as json_string
|
|
6
|
+
from pg_attribute where attrelid = '{table_name}'::regclass and attnum > 0 and not attisdropped) as num_json;
|
|
Binary file
|
pgpack_dumper/dumper.py
CHANGED
|
@@ -106,11 +106,11 @@ class PGPackDumper:
|
|
|
106
106
|
query: str = kwargs.get("query_src") or kwargs.get("query")
|
|
107
107
|
part: int = 1
|
|
108
108
|
first_part, second_part = chunk_query(self.query_formatter(query))
|
|
109
|
-
total_prts = len(sum((first_part, second_part), []))
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
self.logger.info("Multiquery detected.")
|
|
109
|
+
total_prts = len(sum((first_part, second_part), [])) + int(
|
|
110
|
+
bool(kwargs.get("table_name") or kwargs.get("table_src"))
|
|
111
|
+
)
|
|
113
112
|
|
|
113
|
+
if len(first_part) > 1:
|
|
114
114
|
for query in first_part:
|
|
115
115
|
self.logger.info(f"Execute query {part}/{total_prts}")
|
|
116
116
|
cursor.execute(query)
|
pgpack_dumper/version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.3.
|
|
1
|
+
__version__ = "0.3.3.0"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pgpack_dumper
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.3.0
|
|
4
4
|
Summary: Library for read and write PGPack format between PostgreSQL and file.
|
|
5
5
|
Author-email: 0xMihalich <bayanmobile87@gmail.com>
|
|
6
6
|
Project-URL: Homepage, https://github.com/0xMihalich/pgpack_dumper
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
pgpack_dumper-0.3.
|
|
2
|
-
pgpack_dumper-0.3.
|
|
3
|
-
pgpack_dumper-0.3.
|
|
4
|
-
pgpack_dumper-0.3.
|
|
5
|
-
pgpack_dumper-0.3.
|
|
6
|
-
pgpack_dumper/version.py,sha256=
|
|
1
|
+
pgpack_dumper-0.3.3.0.dist-info/RECORD,,
|
|
2
|
+
pgpack_dumper-0.3.3.0.dist-info/WHEEL,sha256=gZUvnl0fZ0gu04plqrprF6eeMGjvWv_GBOhuG6nGay8,138
|
|
3
|
+
pgpack_dumper-0.3.3.0.dist-info/top_level.txt,sha256=AhxLKWTyGtJWNLWUSyBu54xY4wjVS8vSXgW4wwq4bYk,14
|
|
4
|
+
pgpack_dumper-0.3.3.0.dist-info/METADATA,sha256=VusqKoKehKE8OvYOg6F0Xn_qzc5ObGJPcbpEh6NHYu8,5069
|
|
5
|
+
pgpack_dumper-0.3.3.0.dist-info/licenses/LICENSE,sha256=9IYMxtPlcVkrfjeRPA9GRUmaQkLG_FL-Gx7HxLvcLDQ,1067
|
|
6
|
+
pgpack_dumper/version.py,sha256=aNXeiNHEfnCcinecueAUs7woEEyAwS-vF1YS8ONPQEo,24
|
|
7
7
|
pgpack_dumper/__init__.py,sha256=2x9LRaKPMjMuOoP9pBAeSRZoAeCo9B8fxFbnW_N7kh8,966
|
|
8
|
-
pgpack_dumper/dumper.py,sha256=
|
|
9
|
-
pgpack_dumper/common/reader.cpython-311-darwin.so,sha256=
|
|
8
|
+
pgpack_dumper/dumper.py,sha256=y9ed80MAX2-C9q08kqPWTjCQVRR6o_ahSgr7-Icet9A,14302
|
|
9
|
+
pgpack_dumper/common/reader.cpython-311-darwin.so,sha256=m3S3Fp2Ish1WrPqBox_L85ykoe04rrX6dIUsOGPOOc4,86440
|
|
10
10
|
pgpack_dumper/common/metadata.py,sha256=Z_vbgi1V85jgPR0h1xbUtt3Ru7vMcmG06bd13Gn_ocY,864
|
|
11
11
|
pgpack_dumper/common/diagram.py,sha256=2w5-s5qwYjCd0cqqlBRbHQ8E90jU7Ay7TNLeROHjCa0,2505
|
|
12
12
|
pgpack_dumper/common/query.py,sha256=NHLtv_JmaSKq9jugef808vLqn2OoIThCzzPNdSJoQHE,1511
|
|
@@ -25,6 +25,6 @@ pgpack_dumper/common/queryes/copy_from.sql,sha256=hEHfzW7P9-q74jtgMMA94kGpiMeyUR
|
|
|
25
25
|
pgpack_dumper/common/queryes/gpversion.sql,sha256=iUwW40pFCVAZhDZ6ah8CIW75_KMBLyvUxMyqOI7vxtA,80
|
|
26
26
|
pgpack_dumper/common/queryes/relkind.sql,sha256=wpyWaIiuCqQ0YaFPsNAEwwxSxuErNnRmP__-bfZ1vho,66
|
|
27
27
|
pgpack_dumper/common/queryes/copy_to.sql,sha256=AUSsFl_WFB88UcC45SLd8lD_1La1MIkV2CKX-gCOxEE,49
|
|
28
|
-
pgpack_dumper/common/queryes/attributes.sql,sha256=
|
|
28
|
+
pgpack_dumper/common/queryes/attributes.sql,sha256=4hGJ6UYhbsqj-pspUk9uJ72h4a2YDpI0QpSjrCcqtt0,595
|
|
29
29
|
pgpack_dumper/common/queryes/dbname.sql,sha256=Z3b6a_566PxA52ywRJw1JDSCUMC_c-FyulvW8mC1C7c,141
|
|
30
30
|
pgpack_dumper/common/queryes/prepare.sql,sha256=oqRk3GU0gjFzM0nLNsKWeD8GfeThZVKsFiMY1-tdb8g,182
|
|
File without changes
|
|
File without changes
|
|
File without changes
|