Skip to content

Commit 5352e3e

Browse files
committed
skip multi-word aliases
1 parent 8213c85 commit 5352e3e

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

crates/parser/src/parse/libpg_query_node.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -412,22 +412,18 @@ impl<'p> LibpgQueryNodeParser<'p> {
412412
}
413413

414414
/// list of aliases from https://www.postgresql.org/docs/current/datatype.html
415-
const ALIASES: [&[&str]; 15] = [
415+
/// NOTE: support for multi-word alias (e.g. time with time zone) requires parser change
416+
const ALIASES: [&[&str]; 10] = [
416417
&["bigint", "int8"],
417418
&["bigserial", "serial8"],
418-
&["bit varying", "varbit"],
419419
&["boolean", "bool"],
420420
&["character", "char"],
421-
&["character varying", "varchar"],
422-
&["double precision", "float8"],
423421
&["integer", "int", "int4"],
424422
&["numeric", "decimal"],
425423
&["real", "float4"],
426424
&["smallint", "int2"],
427425
&["smallserial", "serial2"],
428426
&["serial", "serial4"],
429-
&["time with time zone", "timetz"],
430-
&["timestamp with time zone", "timestamptz"],
431427
];
432428

433429
fn cmp_tokens(p: &crate::codegen::TokenProperty, token: &crate::lexer::Token) -> bool {

0 commit comments

Comments
 (0)