Skip to content

Commit 1778c85

Browse files
committed
apply sharded sequence to all primary bigint primary keys
1 parent bdefa3f commit 1778c85

1 file changed

Lines changed: 1 addition & 8 deletions

File tree

  • pgdog/src/backend/schema

pgdog/src/backend/schema/mod.rs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -133,18 +133,11 @@ impl Schema {
133133
server.addr(),
134134
);
135135

136-
let supported_defaults = [
137-
"nextval",
138-
"generated always as identity",
139-
"generated by default as identity",
140-
];
141-
142136
for table in tables {
143137
for column in table.columns().iter().filter(|column| {
144138
column.1.is_primary_key // Only primary keys.
145139
&& matches!(column.1.data_type.as_str(), "bigint" | "int8") // Only BIGINT.
146-
&& supported_defaults.iter().any(|p| column.1.column_default.contains(p))
147-
// Only the ones that rely on a sequence.
140+
// Only the ones that rely on a sequence.
148141
}) {
149142
info!(
150143
"[schema] creating sharded sequence for \"{}\".\"{}\".\"{}\"",

0 commit comments

Comments
 (0)