aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/sequence.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/commands/sequence.c')
-rw-r--r--src/backend/commands/sequence.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/backend/commands/sequence.c b/src/backend/commands/sequence.c
index 0f06bba8039..6e0930f8d02 100644
--- a/src/backend/commands/sequence.c
+++ b/src/backend/commands/sequence.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/commands/sequence.c,v 1.169 2010/07/25 23:21:21 rhaas Exp $
+ * $PostgreSQL: pgsql/src/backend/commands/sequence.c,v 1.170 2010/08/13 20:10:51 rhaas Exp $
*
*-------------------------------------------------------------------------
*/
@@ -472,7 +472,7 @@ nextval_internal(Oid relid)
RelationGetRelationName(seqrel))));
/* read-only transactions may only modify temp sequences */
- if (!seqrel->rd_islocaltemp)
+ if (seqrel->rd_backend != MyBackendId)
PreventCommandIfReadOnly("nextval()");
if (elm->last != elm->cached) /* some numbers were cached */
@@ -749,7 +749,7 @@ do_setval(Oid relid, int64 next, bool iscalled)
RelationGetRelationName(seqrel))));
/* read-only transactions may only modify temp sequences */
- if (!seqrel->rd_islocaltemp)
+ if (seqrel->rd_backend != MyBackendId)
PreventCommandIfReadOnly("setval()");
/* lock page' buffer and read tuple */