fix: WherePri function wrong in pgsql #3330 (#3339)

This commit is contained in:
oldme
2024-03-06 19:19:07 +08:00
committed by GitHub
parent 290f4a3e65
commit 240dadff92
2 changed files with 76 additions and 1 deletions

View File

@ -17,7 +17,7 @@ import (
var (
tableFieldsSqlTmp = `
SELECT a.attname AS field, t.typname AS type,a.attnotnull as null,
(case when d.contype is not null then 'pri' else '' end) as key
(case when d.contype = 'p' then 'pri' when d.contype = 'u' then 'uni' else '' end) as key
,ic.column_default as default_value,b.description as comment
,coalesce(character_maximum_length, numeric_precision, -1) as length
,numeric_scale as scale