We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2063c92 commit 79c9e04Copy full SHA for 79c9e04
src/ops/sources/postgres.rs
@@ -65,7 +65,7 @@ async fn fetch_table_schema(
65
c.column_name,
66
c.data_type,
67
c.is_nullable,
68
- CASE WHEN pk.column_name IS NOT NULL THEN true ELSE false END as is_primary_key
+ (pk.column_name IS NOT NULL) as is_primary_key
69
FROM
70
information_schema.columns c
71
LEFT JOIN (
@@ -113,6 +113,9 @@ async fn fetch_table_schema(
113
}
114
115
if primary_key_columns.is_empty() {
116
+ if value_columns.is_empty() {
117
+ api_bail!("Table `{table_name}` not found");
118
+ }
119
api_bail!("Table `{table_name}` has no primary key defined");
120
121
0 commit comments