Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8ae6b4c

Browse files
committed
Make the columns is_insertable_into and is_updatable behave uniformly
correctly. They are supposed to examine which kinds of rules are present,which they did in some of the info schema views but not in others.
1 parent8b583ba commit8ae6b4c

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

‎src/backend/catalog/information_schema.sql

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
* Copyright (c) 2003-2009, PostgreSQL Global Development Group
66
*
7-
* $PostgreSQL: pgsql/src/backend/catalog/information_schema.sql,v 1.48 2009/01/01 17:23:37 momjian Exp $
7+
* $PostgreSQL: pgsql/src/backend/catalog/information_schema.sql,v 1.49 2009/01/14 21:12:09 petere Exp $
88
*/
99

1010
/*
@@ -655,6 +655,9 @@ CREATE VIEW columns AS
655655
CAST(nullAS character_data)AS generation_expression,
656656

657657
CAST(CASE WHENc.relkind='r'
658+
OR (c.relkind='v'
659+
AND EXISTS (SELECT1FROM pg_rewriteWHERE ev_class=c.oidAND ev_type='2'AND is_instead)
660+
AND EXISTS (SELECT1FROM pg_rewriteWHERE ev_class=c.oidAND ev_type='4'AND is_instead))
658661
THEN'YES' ELSE'NO' ENDAS character_data)AS is_updatable
659662

660663
FROM (pg_attribute aLEFT JOIN pg_attrdef adON attrelid= adrelidAND attnum= adnum),
@@ -1882,7 +1885,10 @@ CREATE VIEW tables AS
18821885
CAST(nullAS sql_identifier)AS user_defined_type_name,
18831886

18841887
CAST(CASE WHENc.relkind='r'
1888+
OR (c.relkind='v'
1889+
AND EXISTS (SELECT1FROM pg_rewriteWHERE ev_class=c.oidAND ev_type='3'AND is_instead))
18851890
THEN'YES' ELSE'NO' ENDAS character_data)AS is_insertable_into,
1891+
18861892
CAST('NO'AS character_data)AS is_typed,
18871893
CAST(
18881894
CASE WHENnc.oid= pg_my_temp_schema() THEN'PRESERVE'-- FIXME

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp