-
Notifications
You must be signed in to change notification settings - Fork 733
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
postgres: Column merging for table inheritence (#2315)
- Loading branch information
1 parent
0c340f2
commit d37c9d4
Showing
11 changed files
with
96 additions
and
8 deletions.
There are no files selected for viewing
9 changes: 8 additions & 1 deletion
9
internal/endtoend/testdata/ddl_create_table_inherits/postgresql/pgx/v4/go/models.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 8 additions & 1 deletion
9
internal/endtoend/testdata/ddl_create_table_inherits/postgresql/pgx/v5/go/models.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 8 additions & 1 deletion
9
internal/endtoend/testdata/ddl_create_table_inherits/postgresql/stdlib/go/models.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
internal/endtoend/testdata/ddl_create_table_invalid_inherits/postgresql/stdlib/query.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
-- name: GetAllParties :many | ||
SELECT * FROM party; | ||
|
||
-- name: GetAllOrganisations :many | ||
SELECT * FROM organisation; |
7 changes: 7 additions & 0 deletions
7
internal/endtoend/testdata/ddl_create_table_invalid_inherits/postgresql/stdlib/schema.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
CREATE TABLE party ( | ||
name text NOT NULL | ||
); | ||
|
||
CREATE TABLE organisation ( | ||
name integer NOT NULL | ||
) INHERITS (party); |
12 changes: 12 additions & 0 deletions
12
internal/endtoend/testdata/ddl_create_table_invalid_inherits/postgresql/stdlib/sqlc.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"version": "1", | ||
"packages": [ | ||
{ | ||
"path": "go", | ||
"engine": "postgresql", | ||
"name": "querytest", | ||
"schema": "schema.sql", | ||
"queries": "query.sql" | ||
} | ||
] | ||
} |
2 changes: 2 additions & 0 deletions
2
internal/endtoend/testdata/ddl_create_table_invalid_inherits/postgresql/stdlib/stderr.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# package querytest | ||
schema.sql:1:1: column "name" has a type conflict |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters