Skip to content

Commit

Permalink
sql: New tables added will have columns in the correct order
Browse files Browse the repository at this point in the history
Release note (sql change): Reordered unimplemented tables in pg_catalog and information_schema to match postgresql
  • Loading branch information
Fenil-P committed Feb 3, 2022
1 parent be1b6c4 commit 69f31e2
Show file tree
Hide file tree
Showing 12 changed files with 15,177 additions and 11,947 deletions.
2 changes: 1 addition & 1 deletion pkg/cmd/generate-metadata-tables/rdbms/mysql.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const mysqlDescribeSchema = `
data_type
FROM information_schema.columns
WHERE table_schema = ?
ORDER BY table_name, column_name
ORDER BY table_name
`

var mysqlExclusions = []*excludePattern{
Expand Down
10 changes: 5 additions & 5 deletions pkg/cmd/generate-metadata-tables/rdbms/postgres.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ const getServerVersion = `SELECT current_setting('server_version');`
var unimplementedEquivalencies = map[oid.Oid]oid.Oid{
// These types only exists in information_schema.
// cardinal_number in postgres is an INT4 but we already implemented columns as INT8.
oid.Oid(13438): oid.T_int8, // cardinal_number
oid.Oid(13450): oid.T_text, // yes_or_no
oid.Oid(13441): oid.T_text, // character_data
oid.Oid(13443): oid.T_text, // sql_identifier
oid.Oid(13448): oid.T_timestamptz, // time_stamp
oid.Oid(12653): oid.T_int8, // cardinal_number
oid.Oid(12665): oid.T_text, // yes_or_no
oid.Oid(12656): oid.T_text, // character_data
oid.Oid(12658): oid.T_text, // sql_identifier
oid.Oid(12663): oid.T_timestamptz, // time_stamp

// pg_catalog
oid.Oid(2277): oid.T__text, // anyarray
Expand Down
348 changes: 174 additions & 174 deletions pkg/sql/information_schema.go

Large diffs are not rendered by default.

Loading

0 comments on commit 69f31e2

Please sign in to comment.