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
0e39c8ac
Commit
0e39c8ac
authored
Feb 13, 2001
by
Philip Warner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added some comments to setval, setval_is_called and do_setval
parent
4a19bd87
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
1 deletion
+22
-1
src/backend/commands/sequence.c
src/backend/commands/sequence.c
+22
-1
No files found.
src/backend/commands/sequence.c
View file @
0e39c8ac
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/sequence.c,v 1.
49 2001/01/24 19:42:53 momjian
Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/sequence.c,v 1.
50 2001/02/13 01:57:12 pjw
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -374,6 +374,19 @@ currval(PG_FUNCTION_ARGS)
PG_RETURN_INT32
(
result
);
}
/*
* Main internal procedure that handles 2 & 3 arg forms of SETVAL.
*
* Note that the 3 arg version (which sets the is_called flag) is
* only for use in pg_dump, and setting the is_called flag may not
* work if multiple users are attached to the database and referencing
* the sequence (unlikely if pg_dump is restoring it).
*
* It is necessary to have the 3 arg version so that pg_dump can
* restore the state of a sequence exactly during data-only restores -
* it is the only way to clear the is_called flag in an existing
* sequence.
*/
static
void
do_setval
(
char
*
seqname
,
int32
next
,
bool
iscalled
)
{
...
...
@@ -440,6 +453,10 @@ do_setval(char *seqname, int32 next, bool iscalled)
}
/*
* Implement the 2 arg setval procedure.
* See do_setval for discussion.
*/
Datum
setval
(
PG_FUNCTION_ARGS
)
{
...
...
@@ -452,6 +469,10 @@ setval(PG_FUNCTION_ARGS)
PG_RETURN_INT32
(
next
);
}
/*
* Implement the 3 arg setval procedure.
* See do_setval for discussion.
*/
Datum
setval_and_iscalled
(
PG_FUNCTION_ARGS
)
{
...
...
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