Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dinky
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangpeng
dinky
Commits
d8964f76
Unverified
Commit
d8964f76
authored
Mar 21, 2023
by
javaht
Committed by
GitHub
Mar 21, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Fix][metadata] Fix postgres schema error (#1751)
* fix postgres schema error * fix postgres schema
parent
d61c197f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
PostgreSqlQuery.java
...c/main/java/org/dinky/metadata/query/PostgreSqlQuery.java
+4
-2
No files found.
dinky-metadata/dinky-metadata-postgresql/src/main/java/org/dinky/metadata/query/PostgreSqlQuery.java
View file @
d8964f76
...
@@ -52,13 +52,15 @@ public class PostgreSqlQuery extends AbstractDBQuery {
...
@@ -52,13 +52,15 @@ public class PostgreSqlQuery extends AbstractDBQuery {
return
"SELECT col.column_name as name\n"
return
"SELECT col.column_name as name\n"
+
" , col.character_maximum_length as length\n"
+
" , col.character_maximum_length as length\n"
+
" , col.is_nullable as is_nullable
is_nullable
\n"
+
" , col.is_nullable as is_nullable\n"
+
" , col.numeric_precision as numeric_precision\n"
+
" , col.numeric_precision as numeric_precision\n"
+
" , col.numeric_scale as numeric_scale\n"
+
" , col.numeric_scale as numeric_scale\n"
+
" , col.ordinal_position as ordinal_position\n"
+
" , col.ordinal_position as ordinal_position\n"
+
" , col.udt_name as type\n"
+
" , col.udt_name as type\n"
+
" , (CASE\n"
+
" , (CASE\n"
+
" WHEN (SELECT COUNT(*) FROM pg_constraint AS PC WHERE b.attnum = PC.conkey[1] AND PC.contype = 'p') > 0\n"
+
" WHEN (SELECT COUNT(*) FROM pg_constraint AS PC WHERE b.attnum = PC.conkey[1] AND PC.contype = 'p' and PC.conname like concat('"
+
tableName
+
"','_%')) > 0\n"
+
" THEN 'PRI'\n"
+
" THEN 'PRI'\n"
+
" ELSE '' END) AS key\n"
+
" ELSE '' END) AS key\n"
+
" , col_description(c.oid, col.ordinal_position) AS comment\n"
+
" , col_description(c.oid, col.ordinal_position) AS comment\n"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment