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
6c498285
Commit
6c498285
authored
Aug 30, 1998
by
Marc G. Fournier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
parent
6f3de1bb
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
295 additions
and
117 deletions
+295
-117
src/backend/commands/async.c
src/backend/commands/async.c
+226
-99
src/backend/tcop/postgres.c
src/backend/tcop/postgres.c
+43
-12
src/man/create_sequence.l
src/man/create_sequence.l
+18
-1
src/man/listen.l
src/man/listen.l
+8
-5
No files found.
src/backend/commands/async.c
View file @
6c498285
This diff is collapsed.
Click to expand it.
src/backend/tcop/postgres.c
View file @
6c498285
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.8
6 1998/08/25 21:34:04
scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.8
7 1998/08/30 21:05:27
scrappy Exp $
*
*
* NOTES
* NOTES
* this is the "main" module of the postgres backend and
* this is the "main" module of the postgres backend and
...
@@ -443,11 +443,41 @@ pg_parse_and_plan(char *query_string, /* string to execute */
...
@@ -443,11 +443,41 @@ pg_parse_and_plan(char *query_string, /* string to execute */
querytree
=
querytree_list
->
qtrees
[
i
];
querytree
=
querytree_list
->
qtrees
[
i
];
if
(
DebugPrintQuery
==
true
)
if
(
DebugPrintQuery
)
{
{
printf
(
"
\n
----
\t
query is:
\n
%s
\n
"
,
query_string
);
if
(
DebugPrintQuery
>
3
)
{
printf
(
"
\n
"
);
/* Print the query string as is if query debug level > 3 */
fflush
(
stdout
);
TPRINTF
(
TRACE_QUERY
,
"query: %s"
,
query_string
);
}
else
{
/* Print condensed query string to fit in one log line */
char
buff
[
8192
+
1
];
char
c
,
*
s
,
*
d
;
int
n
,
is_space
=
1
;
for
(
s
=
query_string
,
d
=
buff
,
n
=
0
;
(
c
=*
s
)
&&
(
n
<
8192
);
s
++
)
{
switch
(
c
)
{
case
'\r'
:
case
'\n'
:
case
'\t'
:
c
=
' '
;
/* fall through */
case
' '
:
if
(
is_space
)
continue
;
is_space
=
1
;
break
;
default:
is_space
=
0
;
break
;
}
*
d
++
=
c
;
n
++
;
}
*
d
=
'\0'
;
TPRINTF
(
TRACE_QUERY
,
"query: %s"
,
buff
);
}
}
}
/* don't rewrite utilites */
/* don't rewrite utilites */
...
@@ -457,11 +487,10 @@ pg_parse_and_plan(char *query_string, /* string to execute */
...
@@ -457,11 +487,10 @@ pg_parse_and_plan(char *query_string, /* string to execute */
continue
;
continue
;
}
}
if
(
DebugPrintParse
==
true
)
if
(
DebugPrintParse
)
{
{
printf
(
"
\n
----
\t
parser outputs :
\n
"
);
TPRINTF
(
TRACE_PARSE
,
"parser outputs:
"
);
nodeDisplay
(
querytree
);
nodeDisplay
(
querytree
);
printf
(
"
\n
"
);
}
}
/* rewrite queries (retrieve, append, delete, replace) */
/* rewrite queries (retrieve, append, delete, replace) */
...
@@ -906,8 +935,10 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[])
...
@@ -906,8 +935,10 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[])
char
firstchar
;
char
firstchar
;
char
parser_input
[
MAX_PARSE_BUFFER
];
char
parser_input
[
MAX_PARSE_BUFFER
];
char
*
userName
;
char
*
userName
;
char
*
remote_info
;
char
*
remote_host
;
/* Used if verbose is set, must be initialized */
char
*
remote_info
=
"interactive"
;
char
*
remote_host
=
""
;
unsigned
short
remote_port
=
0
;
unsigned
short
remote_port
=
0
;
char
*
DBDate
=
NULL
;
char
*
DBDate
=
NULL
;
...
@@ -1490,7 +1521,7 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[])
...
@@ -1490,7 +1521,7 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[])
if
(
!
IsUnderPostmaster
)
if
(
!
IsUnderPostmaster
)
{
{
puts
(
"
\n
POSTGRES backend interactive interface"
);
puts
(
"
\n
POSTGRES backend interactive interface"
);
puts
(
"$Revision: 1.8
6 $ $Date: 1998/08/25 21:34:04
$"
);
puts
(
"$Revision: 1.8
7 $ $Date: 1998/08/30 21:05:27
$"
);
}
}
/* ----------------
/* ----------------
...
...
src/man/create_sequence.l
View file @
6c498285
.\" This is -*-nroff-*-
.\" This is -*-nroff-*-
.\" XXX standard disclaimer belongs here....
.\" XXX standard disclaimer belongs here....
.\" $Header: /cvsroot/pgsql/src/man/Attic/create_sequence.l,v 1.
5 1998/07/14 01:45:25 momjian
Exp $
.\" $Header: /cvsroot/pgsql/src/man/Attic/create_sequence.l,v 1.
6 1998/08/30 21:03:19 scrappy
Exp $
.TH "CREATE SEQUENCE" SQL 07/13/98 PostgreSQL PostgreSQL
.TH "CREATE SEQUENCE" SQL 07/13/98 PostgreSQL PostgreSQL
.SH NAME
.SH NAME
create sequence - create a new sequence number generator
create sequence - create a new sequence number generator
...
@@ -82,6 +82,14 @@ given sequence in the current backend session. Also beware that it
...
@@ -82,6 +82,14 @@ given sequence in the current backend session. Also beware that it
does not give the last number ever allocated, only the last one allocated
does not give the last number ever allocated, only the last one allocated
by this backend.
by this backend.
.PP
.PP
The function
.BR setval
('sequence_name', value)
may be used to set the current value of the specified sequence.
The next call to
.BR nextval
will return the given value + the sequence increment.
.PP
Use a query like
Use a query like
.nf
.nf
SELECT * FROM <sequence_name>;
SELECT * FROM <sequence_name>;
...
@@ -134,6 +142,15 @@ select nextval ('seq');
...
@@ -134,6 +142,15 @@ select nextval ('seq');
-- Use sequence in insert
-- Use sequence in insert
--
--
insert into table _table_ values (nextval ('seq'),...);
insert into table _table_ values (nextval ('seq'),...);
.nf
--
-- Set the sequence value after a copy in
--
create function table_id_max() returns int4
as 'select max(id) from _table_'
language 'sql';
copy _table_ from 'input_file';
select setval('seq', table_id_max());
.fi
.fi
.SH "SEE ALSO"
.SH "SEE ALSO"
drop_sequence(l).
drop_sequence(l).
src/man/listen.l
View file @
6c498285
.\" This is -*-nroff-*-
.\" This is -*-nroff-*-
.\" XXX standard disclaimer belongs here....
.\" XXX standard disclaimer belongs here....
.\" $Header: /cvsroot/pgsql/src/man/Attic/listen.l,v 1.
7 1998/07/09 03:29:09
scrappy Exp $
.\" $Header: /cvsroot/pgsql/src/man/Attic/listen.l,v 1.
8 1998/08/30 21:03:20
scrappy Exp $
.TH "LISTEN" SQL 03/12/94 PostgreSQL PostgreSQL
.TH "LISTEN" SQL 03/12/94 PostgreSQL PostgreSQL
.SH NAME
.SH NAME
listen - listen for notification on a relation
listen - listen for notification on a relation
...
@@ -27,16 +27,19 @@ in order to find out the name of the class to which a given
...
@@ -27,16 +27,19 @@ in order to find out the name of the class to which a given
notification corresponds. If this code is not included in
notification corresponds. If this code is not included in
the application, the event notification will be queued and
the application, the event notification will be queued and
never be processed.
never be processed.
.PP
Note that
.IR class_name
needs not to be a valid class name but can be any ascii string up to 32
characters long. It must however be eclosed in double-quotes if it is
not valid as class name.
.SH "SEE ALSO"
.SH "SEE ALSO"
create_rule(l),
create_rule(l),
notify(l),
notify(l),
select(l),
select(l),
unlisten(l),
libpq.
libpq.
.SH BUGS
.SH BUGS
There is no way to un-\c
.BR listen
except to drop the connection (i.e., restart the backend server).
.PP
The
The
.IR psql(1)
.IR psql(1)
command does not poll for asynchronous events.
command does not poll for asynchronous events.
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