mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-04-22 02:32:50 +08:00
- 修复 PostgreSQL CodeFirst/DbFirst 系统表的版本兼容问题;
This commit is contained in:
parent
1d09b7fba3
commit
6ea5c5d103
@ -183,7 +183,7 @@ case when a.atttypmod > 0 and a.atttypmod < 32767 then a.atttypmod - 4 else a.at
|
|||||||
case when t.typelem > 0 and t.typinput::varchar = 'array_in' then t2.typname else t.typname end,
|
case when t.typelem > 0 and t.typinput::varchar = 'array_in' then t2.typname else t.typname end,
|
||||||
case when a.attnotnull then '0' else '1' end as is_nullable,
|
case when a.attnotnull then '0' else '1' end as is_nullable,
|
||||||
--e.adsrc,
|
--e.adsrc,
|
||||||
(select pg_get_expr(adbin, adrelid) from pg_attrdef where adrelid = e.adrelid) is_identity,
|
(select pg_get_expr(adbin, adrelid) from pg_attrdef where adrelid = e.adrelid limit 1) is_identity,
|
||||||
a.attndims,
|
a.attndims,
|
||||||
d.description as comment
|
d.description as comment
|
||||||
from pg_class c
|
from pg_class c
|
||||||
|
@ -210,7 +210,7 @@ case when a.atttypmod > 0 and a.atttypmod < 32767 then a.atttypmod - 4 else a.at
|
|||||||
case when t.typelem = 0 then t.typname else t2.typname end,
|
case when t.typelem = 0 then t.typname else t2.typname end,
|
||||||
case when a.attnotnull then 0 else 1 end as is_nullable,
|
case when a.attnotnull then 0 else 1 end as is_nullable,
|
||||||
--e.adsrc as is_identity, pg12以下
|
--e.adsrc as is_identity, pg12以下
|
||||||
(select pg_get_expr(adbin, adrelid) from pg_attrdef where adrelid = e.adrelid) is_identity,
|
(select pg_get_expr(adbin, adrelid) from pg_attrdef where adrelid = e.adrelid limit 1) is_identity,
|
||||||
d.description as comment,
|
d.description as comment,
|
||||||
a.attndims,
|
a.attndims,
|
||||||
case when t.typelem = 0 then t.typtype else t2.typtype end,
|
case when t.typelem = 0 then t.typtype else t2.typtype end,
|
||||||
|
@ -218,7 +218,7 @@ case when a.atttypmod > 0 and a.atttypmod < 32767 then a.atttypmod - 4 else a.at
|
|||||||
case when t.typelem > 0 and t.typinput::varchar = 'array_in' then t2.typname else t.typname end,
|
case when t.typelem > 0 and t.typinput::varchar = 'array_in' then t2.typname else t.typname end,
|
||||||
case when a.attnotnull then '0' else '1' end as is_nullable,
|
case when a.attnotnull then '0' else '1' end as is_nullable,
|
||||||
--e.adsrc,
|
--e.adsrc,
|
||||||
(select pg_get_expr(adbin, adrelid) from pg_attrdef where adrelid = e.adrelid) is_identity,
|
(select pg_get_expr(adbin, adrelid) from pg_attrdef where adrelid = e.adrelid limit 1) is_identity,
|
||||||
a.attndims,
|
a.attndims,
|
||||||
d.description as comment
|
d.description as comment
|
||||||
from pg_class c
|
from pg_class c
|
||||||
|
@ -320,7 +320,7 @@ case when a.atttypmod > 0 and a.atttypmod < 32767 then a.atttypmod - 4 else a.at
|
|||||||
case when t.typelem = 0 then t.typname else t2.typname end,
|
case when t.typelem = 0 then t.typname else t2.typname end,
|
||||||
case when a.attnotnull then 0 else 1 end as is_nullable,
|
case when a.attnotnull then 0 else 1 end as is_nullable,
|
||||||
--e.adsrc as is_identity, pg12以下
|
--e.adsrc as is_identity, pg12以下
|
||||||
(select pg_get_expr(adbin, adrelid) from pg_attrdef where adrelid = e.adrelid) is_identity,
|
(select pg_get_expr(adbin, adrelid) from pg_attrdef where adrelid = e.adrelid limit 1) is_identity,
|
||||||
d.description as comment,
|
d.description as comment,
|
||||||
a.attndims,
|
a.attndims,
|
||||||
case when t.typelem = 0 then t.typtype else t2.typtype end,
|
case when t.typelem = 0 then t.typtype else t2.typtype end,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user