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
5af6b2ab
Commit
5af6b2ab
authored
Jan 25, 2007
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Properly detoast access to bytea field pg_trigger.tgargs. Old code
might cause server crash. Backpatch to 8.2.X.
parent
25128176
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
9 deletions
+6
-9
src/backend/commands/tablecmds.c
src/backend/commands/tablecmds.c
+2
-3
src/backend/commands/trigger.c
src/backend/commands/trigger.c
+2
-3
src/backend/utils/adt/ruleutils.c
src/backend/utils/adt/ruleutils.c
+2
-3
No files found.
src/backend/commands/tablecmds.c
View file @
5af6b2ab
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/commands/tablecmds.c,v 1.21
0 2007/01/05 22:19:26
momjian Exp $
* $PostgreSQL: pgsql/src/backend/commands/tablecmds.c,v 1.21
1 2007/01/25 04:17:45
momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -1800,8 +1800,7 @@ update_ri_trigger_args(Oid relid,
...
@@ -1800,8 +1800,7 @@ update_ri_trigger_args(Oid relid,
* line; so does trigger.c ...
* line; so does trigger.c ...
*/
*/
tgnargs
=
pg_trigger
->
tgnargs
;
tgnargs
=
pg_trigger
->
tgnargs
;
val
=
(
bytea
*
)
val
=
DatumGetByteaP
(
fastgetattr
(
tuple
,
DatumGetPointer
(
fastgetattr
(
tuple
,
Anum_pg_trigger_tgargs
,
Anum_pg_trigger_tgargs
,
tgrel
->
rd_att
,
&
isnull
));
tgrel
->
rd_att
,
&
isnull
));
if
(
isnull
||
tgnargs
<
RI_FIRST_ATTNAME_ARGNO
||
if
(
isnull
||
tgnargs
<
RI_FIRST_ATTNAME_ARGNO
||
...
...
src/backend/commands/trigger.c
View file @
5af6b2ab
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
* Portions Copyright (c) 1994, Regents of the University of California
*
*
* IDENTIFICATION
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/commands/trigger.c,v 1.21
1 2007/01/05 22:19:2
6 momjian Exp $
* $PostgreSQL: pgsql/src/backend/commands/trigger.c,v 1.21
2 2007/01/25 04:17:4
6 momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -906,8 +906,7 @@ RelationBuildTriggers(Relation relation)
...
@@ -906,8 +906,7 @@ RelationBuildTriggers(Relation relation)
char
*
p
;
char
*
p
;
int
i
;
int
i
;
val
=
(
bytea
*
)
val
=
DatumGetByteaP
(
fastgetattr
(
htup
,
DatumGetPointer
(
fastgetattr
(
htup
,
Anum_pg_trigger_tgargs
,
Anum_pg_trigger_tgargs
,
tgrel
->
rd_att
,
&
isnull
));
tgrel
->
rd_att
,
&
isnull
));
if
(
isnull
)
if
(
isnull
)
...
...
src/backend/utils/adt/ruleutils.c
View file @
5af6b2ab
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/utils/adt/ruleutils.c,v 1.24
5 2007/01/20 23:13:01 tgl
Exp $
* $PostgreSQL: pgsql/src/backend/utils/adt/ruleutils.c,v 1.24
6 2007/01/25 04:17:46 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -529,8 +529,7 @@ pg_get_triggerdef(PG_FUNCTION_ARGS)
...
@@ -529,8 +529,7 @@ pg_get_triggerdef(PG_FUNCTION_ARGS)
char
*
p
;
char
*
p
;
int
i
;
int
i
;
val
=
(
bytea
*
)
val
=
DatumGetByteaP
(
fastgetattr
(
ht_trig
,
DatumGetPointer
(
fastgetattr
(
ht_trig
,
Anum_pg_trigger_tgargs
,
Anum_pg_trigger_tgargs
,
tgrel
->
rd_att
,
&
isnull
));
tgrel
->
rd_att
,
&
isnull
));
if
(
isnull
)
if
(
isnull
)
...
...
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