Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
3c505ef5
Commit
3c505ef5
authored
Dec 30, 2009
by
Peter Eisentraut
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fill in information schema column for trigger WHEN condition
parent
e6df063c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
4 deletions
+13
-4
doc/src/sgml/information_schema.sgml
doc/src/sgml/information_schema.sgml
+6
-2
src/backend/catalog/information_schema.sql
src/backend/catalog/information_schema.sql
+7
-2
No files found.
doc/src/sgml/information_schema.sgml
View file @
3c505ef5
<!-- $PostgreSQL: pgsql/doc/src/sgml/information_schema.sgml,v 1.4
2 2009/12/05 21:31:05
petere Exp $ -->
<!-- $PostgreSQL: pgsql/doc/src/sgml/information_schema.sgml,v 1.4
3 2009/12/30 22:48:10
petere Exp $ -->
<chapter id="information-schema">
<title>The Information Schema</title>
...
...
@@ -4875,7 +4875,11 @@ ORDER BY c.ordinal_position;
<row>
<entry><literal>action_condition</literal></entry>
<entry><type>character_data</type></entry>
<entry>Applies to a feature not available in <productname>PostgreSQL</></entry>
<entry>
<literal>WHEN</literal> condition of the trigger, null if none
(also null if the table is not owned by a currently enabled
role)
</entry>
</row>
<row>
...
...
src/backend/catalog/information_schema.sql
View file @
3c505ef5
...
...
@@ -4,7 +4,7 @@
*
* Copyright (c) 2003-2009, PostgreSQL Global Development Group
*
* $PostgreSQL: pgsql/src/backend/catalog/information_schema.sql,v 1.6
0 2009/12/07 05:22:21 tgl
Exp $
* $PostgreSQL: pgsql/src/backend/catalog/information_schema.sql,v 1.6
1 2009/12/30 22:48:10 petere
Exp $
*/
/*
...
...
@@ -1909,7 +1909,12 @@ CREATE VIEW triggers AS
CAST
(
n
.
nspname
AS
sql_identifier
)
AS
event_object_schema
,
CAST
(
c
.
relname
AS
sql_identifier
)
AS
event_object_table
,
CAST
(
null
AS
cardinal_number
)
AS
action_order
,
CAST
(
null
AS
character_data
)
AS
action_condition
,
-- XXX strange hacks follow
CAST
(
CASE
WHEN
pg_has_role
(
c
.
relowner
,
'USAGE'
)
THEN
(
SELECT
m
[
1
]
FROM
regexp_matches
(
pg_get_triggerdef
(
t
.
oid
),
E
'.{35,} WHEN
\\
((.+)
\\
) EXECUTE PROCEDURE'
)
AS
rm
(
m
)
LIMIT
1
)
ELSE
null
END
AS
character_data
)
AS
action_condition
,
CAST
(
substring
(
pg_get_triggerdef
(
t
.
oid
)
from
position
(
'EXECUTE PROCEDURE'
in
substring
(
pg_get_triggerdef
(
t
.
oid
)
from
48
))
+
47
)
...
...
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