Skip to content

Commit

Permalink
Merge pull request #68 from supabase/deji/fix/use-backticks-for-cols
Browse files Browse the repository at this point in the history
fix: wrap bq column names in backticks
  • Loading branch information
imor authored Nov 29, 2024
2 parents 662de0e + aedd10b commit 14be796
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pg_replicate/src/clients/bigquery.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,9 @@ impl BigQueryClient {
}

fn column_spec(column_schema: &ColumnSchema, s: &mut String) {
s.push('`');
s.push_str(&column_schema.name);
s.push('`');
s.push(' ');
let typ = Self::postgres_to_bigquery_type(&column_schema.typ);
s.push_str(typ);
Expand All @@ -147,7 +149,9 @@ impl BigQueryClient {
s.push_str("primary key (");

for column in identity_columns {
s.push('`');
s.push_str(&column.name);
s.push('`');
s.push(',');
}

Expand Down

0 comments on commit 14be796

Please sign in to comment.