dbt-postgres 1.7.12__tar.gz → 1.7.14__tar.gz

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.
Files changed (53) hide show
  1. {dbt_postgres-1.7.12/dbt_postgres.egg-info → dbt_postgres-1.7.14}/PKG-INFO +2 -2
  2. dbt_postgres-1.7.14/dbt/adapters/postgres/__version__.py +1 -0
  3. {dbt_postgres-1.7.12 → dbt_postgres-1.7.14}/dbt/adapters/postgres/relation.py +11 -8
  4. {dbt_postgres-1.7.12 → dbt_postgres-1.7.14}/dbt/adapters/postgres/relation_configs/materialized_view.py +2 -2
  5. {dbt_postgres-1.7.12 → dbt_postgres-1.7.14}/dbt/include/postgres/macros/adapters.sql +1 -1
  6. {dbt_postgres-1.7.12 → dbt_postgres-1.7.14/dbt_postgres.egg-info}/PKG-INFO +2 -2
  7. {dbt_postgres-1.7.12 → dbt_postgres-1.7.14}/dbt_postgres.egg-info/requires.txt +1 -1
  8. {dbt_postgres-1.7.12 → dbt_postgres-1.7.14}/setup.py +1 -1
  9. dbt_postgres-1.7.12/dbt/adapters/postgres/__version__.py +0 -1
  10. {dbt_postgres-1.7.12 → dbt_postgres-1.7.14}/MANIFEST.in +0 -0
  11. {dbt_postgres-1.7.12 → dbt_postgres-1.7.14}/README.md +0 -0
  12. {dbt_postgres-1.7.12 → dbt_postgres-1.7.14}/dbt/__init__.py +0 -0
  13. {dbt_postgres-1.7.12 → dbt_postgres-1.7.14}/dbt/adapters/__init__.py +0 -0
  14. {dbt_postgres-1.7.12 → dbt_postgres-1.7.14}/dbt/adapters/postgres/__init__.py +0 -0
  15. {dbt_postgres-1.7.12 → dbt_postgres-1.7.14}/dbt/adapters/postgres/column.py +0 -0
  16. {dbt_postgres-1.7.12 → dbt_postgres-1.7.14}/dbt/adapters/postgres/connections.py +0 -0
  17. {dbt_postgres-1.7.12 → dbt_postgres-1.7.14}/dbt/adapters/postgres/impl.py +0 -0
  18. {dbt_postgres-1.7.12 → dbt_postgres-1.7.14}/dbt/adapters/postgres/relation_configs/__init__.py +0 -0
  19. {dbt_postgres-1.7.12 → dbt_postgres-1.7.14}/dbt/adapters/postgres/relation_configs/constants.py +0 -0
  20. {dbt_postgres-1.7.12 → dbt_postgres-1.7.14}/dbt/adapters/postgres/relation_configs/index.py +0 -0
  21. {dbt_postgres-1.7.12 → dbt_postgres-1.7.14}/dbt/include/postgres/__init__.py +0 -0
  22. {dbt_postgres-1.7.12 → dbt_postgres-1.7.14}/dbt/include/postgres/dbt_project.yml +0 -0
  23. {dbt_postgres-1.7.12 → dbt_postgres-1.7.14}/dbt/include/postgres/macros/catalog.sql +0 -0
  24. {dbt_postgres-1.7.12 → dbt_postgres-1.7.14}/dbt/include/postgres/macros/materializations/incremental_strategies.sql +0 -0
  25. {dbt_postgres-1.7.12 → dbt_postgres-1.7.14}/dbt/include/postgres/macros/materializations/snapshot_merge.sql +0 -0
  26. {dbt_postgres-1.7.12 → dbt_postgres-1.7.14}/dbt/include/postgres/macros/relations/materialized_view/alter.sql +0 -0
  27. {dbt_postgres-1.7.12 → dbt_postgres-1.7.14}/dbt/include/postgres/macros/relations/materialized_view/create.sql +0 -0
  28. {dbt_postgres-1.7.12 → dbt_postgres-1.7.14}/dbt/include/postgres/macros/relations/materialized_view/describe.sql +0 -0
  29. {dbt_postgres-1.7.12 → dbt_postgres-1.7.14}/dbt/include/postgres/macros/relations/materialized_view/drop.sql +0 -0
  30. {dbt_postgres-1.7.12 → dbt_postgres-1.7.14}/dbt/include/postgres/macros/relations/materialized_view/refresh.sql +0 -0
  31. {dbt_postgres-1.7.12 → dbt_postgres-1.7.14}/dbt/include/postgres/macros/relations/materialized_view/rename.sql +0 -0
  32. {dbt_postgres-1.7.12 → dbt_postgres-1.7.14}/dbt/include/postgres/macros/relations/table/drop.sql +0 -0
  33. {dbt_postgres-1.7.12 → dbt_postgres-1.7.14}/dbt/include/postgres/macros/relations/table/rename.sql +0 -0
  34. {dbt_postgres-1.7.12 → dbt_postgres-1.7.14}/dbt/include/postgres/macros/relations/table/replace.sql +0 -0
  35. {dbt_postgres-1.7.12 → dbt_postgres-1.7.14}/dbt/include/postgres/macros/relations/view/drop.sql +0 -0
  36. {dbt_postgres-1.7.12 → dbt_postgres-1.7.14}/dbt/include/postgres/macros/relations/view/rename.sql +0 -0
  37. {dbt_postgres-1.7.12 → dbt_postgres-1.7.14}/dbt/include/postgres/macros/relations/view/replace.sql +0 -0
  38. {dbt_postgres-1.7.12 → dbt_postgres-1.7.14}/dbt/include/postgres/macros/relations.sql +0 -0
  39. {dbt_postgres-1.7.12 → dbt_postgres-1.7.14}/dbt/include/postgres/macros/timestamps.sql +0 -0
  40. {dbt_postgres-1.7.12 → dbt_postgres-1.7.14}/dbt/include/postgres/macros/utils/any_value.sql +0 -0
  41. {dbt_postgres-1.7.12 → dbt_postgres-1.7.14}/dbt/include/postgres/macros/utils/columns_spec_ddl.sql +0 -0
  42. {dbt_postgres-1.7.12 → dbt_postgres-1.7.14}/dbt/include/postgres/macros/utils/dateadd.sql +0 -0
  43. {dbt_postgres-1.7.12 → dbt_postgres-1.7.14}/dbt/include/postgres/macros/utils/datediff.sql +0 -0
  44. {dbt_postgres-1.7.12 → dbt_postgres-1.7.14}/dbt/include/postgres/macros/utils/last_day.sql +0 -0
  45. {dbt_postgres-1.7.12 → dbt_postgres-1.7.14}/dbt/include/postgres/macros/utils/listagg.sql +0 -0
  46. {dbt_postgres-1.7.12 → dbt_postgres-1.7.14}/dbt/include/postgres/macros/utils/split_part.sql +0 -0
  47. {dbt_postgres-1.7.12 → dbt_postgres-1.7.14}/dbt/include/postgres/profile_template.yml +0 -0
  48. {dbt_postgres-1.7.12 → dbt_postgres-1.7.14}/dbt/include/postgres/sample_profiles.yml +0 -0
  49. {dbt_postgres-1.7.12 → dbt_postgres-1.7.14}/dbt_postgres.egg-info/SOURCES.txt +0 -0
  50. {dbt_postgres-1.7.12 → dbt_postgres-1.7.14}/dbt_postgres.egg-info/dependency_links.txt +0 -0
  51. {dbt_postgres-1.7.12 → dbt_postgres-1.7.14}/dbt_postgres.egg-info/not-zip-safe +0 -0
  52. {dbt_postgres-1.7.12 → dbt_postgres-1.7.14}/dbt_postgres.egg-info/top_level.txt +0 -0
  53. {dbt_postgres-1.7.12 → dbt_postgres-1.7.14}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dbt-postgres
3
- Version: 1.7.12
3
+ Version: 1.7.14
4
4
  Summary: The postgres adapter plugin for dbt (data build tool)
5
5
  Home-page: https://github.com/dbt-labs/dbt-core
6
6
  Author: dbt Labs
@@ -16,7 +16,7 @@ Classifier: Programming Language :: Python :: 3.10
16
16
  Classifier: Programming Language :: Python :: 3.11
17
17
  Requires-Python: >=3.8
18
18
  Description-Content-Type: text/markdown
19
- Requires-Dist: dbt-core==1.7.12
19
+ Requires-Dist: dbt-core==1.7.14
20
20
  Requires-Dist: psycopg2-binary~=2.8
21
21
  Requires-Dist: agate
22
22
 
@@ -0,0 +1 @@
1
+ version = "1.7.14"
@@ -1,5 +1,5 @@
1
1
  from dataclasses import dataclass, field
2
- from typing import Optional, Set, FrozenSet
2
+ from typing import FrozenSet, List, Optional
3
3
 
4
4
  from dbt.adapters.base.relation import BaseRelation
5
5
  from dbt.adapters.relation_configs import (
@@ -26,7 +26,6 @@ class PostgresRelation(BaseRelation):
26
26
  {
27
27
  RelationType.View,
28
28
  RelationType.Table,
29
- RelationType.MaterializedView,
30
29
  }
31
30
  )
32
31
  )
@@ -83,7 +82,7 @@ class PostgresRelation(BaseRelation):
83
82
  self,
84
83
  existing_indexes: FrozenSet[PostgresIndexConfig],
85
84
  new_indexes: FrozenSet[PostgresIndexConfig],
86
- ) -> Set[PostgresIndexConfigChange]:
85
+ ) -> List[PostgresIndexConfigChange]:
87
86
  """
88
87
  Get the index updates that will occur as a result of a new run
89
88
 
@@ -94,18 +93,22 @@ class PostgresRelation(BaseRelation):
94
93
  3. Index is old -> drop these
95
94
  4. Indexes are not equal -> drop old, create new -> two actions
96
95
 
96
+ *Note:*
97
+ The order of the operations matters here because if the same index is dropped and recreated
98
+ (e.g. via --full-refresh) then we need to drop it first, then create it.
99
+
97
100
  Returns: a set of index updates in the form {"action": "drop/create", "context": <IndexConfig>}
98
101
  """
99
- drop_changes = set(
102
+ drop_changes = [
100
103
  PostgresIndexConfigChange.from_dict(
101
104
  {"action": RelationConfigChangeAction.drop, "context": index}
102
105
  )
103
106
  for index in existing_indexes.difference(new_indexes)
104
- )
105
- create_changes = set(
107
+ ]
108
+ create_changes = [
106
109
  PostgresIndexConfigChange.from_dict(
107
110
  {"action": RelationConfigChangeAction.create, "context": index}
108
111
  )
109
112
  for index in new_indexes.difference(existing_indexes)
110
- )
111
- return set().union(drop_changes, create_changes)
113
+ ]
114
+ return drop_changes + create_changes
@@ -102,7 +102,7 @@ class PostgresMaterializedViewConfig(RelationConfigBase, RelationConfigValidatio
102
102
 
103
103
  @dataclass
104
104
  class PostgresMaterializedViewConfigChangeCollection:
105
- indexes: Set[PostgresIndexConfigChange] = field(default_factory=set)
105
+ indexes: List[PostgresIndexConfigChange] = field(default_factory=list)
106
106
 
107
107
  @property
108
108
  def requires_full_refresh(self) -> bool:
@@ -110,4 +110,4 @@ class PostgresMaterializedViewConfigChangeCollection:
110
110
 
111
111
  @property
112
112
  def has_changes(self) -> bool:
113
- return self.indexes != set()
113
+ return self.indexes != []
@@ -39,7 +39,7 @@
39
39
  on {{ relation }} {% if index_config.type -%}
40
40
  using {{ index_config.type }}
41
41
  {%- endif %}
42
- ({{ comma_separated_columns }});
42
+ ({{ comma_separated_columns }})
43
43
  {%- endmacro %}
44
44
 
45
45
  {% macro postgres__create_schema(relation) -%}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dbt-postgres
3
- Version: 1.7.12
3
+ Version: 1.7.14
4
4
  Summary: The postgres adapter plugin for dbt (data build tool)
5
5
  Home-page: https://github.com/dbt-labs/dbt-core
6
6
  Author: dbt Labs
@@ -16,7 +16,7 @@ Classifier: Programming Language :: Python :: 3.10
16
16
  Classifier: Programming Language :: Python :: 3.11
17
17
  Requires-Python: >=3.8
18
18
  Description-Content-Type: text/markdown
19
- Requires-Dist: dbt-core==1.7.12
19
+ Requires-Dist: dbt-core==1.7.14
20
20
  Requires-Dist: psycopg2-binary~=2.8
21
21
  Requires-Dist: agate
22
22
 
@@ -1,3 +1,3 @@
1
- dbt-core==1.7.12
1
+ dbt-core==1.7.14
2
2
  psycopg2-binary~=2.8
3
3
  agate
@@ -41,7 +41,7 @@ def _dbt_psycopg2_name():
41
41
 
42
42
 
43
43
  package_name = "dbt-postgres"
44
- package_version = "1.7.12"
44
+ package_version = "1.7.14"
45
45
  description = """The postgres adapter plugin for dbt (data build tool)"""
46
46
 
47
47
  this_directory = os.path.abspath(os.path.dirname(__file__))
@@ -1 +0,0 @@
1
- version = "1.7.12"
File without changes
File without changes
File without changes