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
230e8962
Commit
230e8962
authored
Dec 11, 2007
by
Alvaro Herrera
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make CSV column ordering a bit more logical.
parent
1ebff9ba
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
15 deletions
+14
-15
doc/src/sgml/config.sgml
doc/src/sgml/config.sgml
+8
-8
src/backend/utils/error/elog.c
src/backend/utils/error/elog.c
+6
-7
No files found.
doc/src/sgml/config.sgml
View file @
230e8962
<!-- $PostgreSQL: pgsql/doc/src/sgml/config.sgml,v 1.1
59 2007/12/11 15:19:05
alvherre Exp $ -->
<!-- $PostgreSQL: pgsql/doc/src/sgml/config.sgml,v 1.1
60 2007/12/11 20:07:31
alvherre Exp $ -->
<chapter Id="runtime-config">
<title>Server Configuration</title>
...
...
@@ -3001,7 +3001,7 @@ local0.* /var/log/postgresql
</row>
<row>
<entry><literal>%l</literal></entry>
<entry>Number of the log line for each process, starting at 1</entry>
<entry>Number of the log line for each
session or
process, starting at 1</entry>
<entry>no</entry>
</row>
<row>
...
...
@@ -3167,7 +3167,7 @@ local0.* /var/log/postgresql
provides a convenient way to import log files into a database table.
This option emits log lines in comma-separated-value format,
with these columns: timestamp with milliseconds, user name, database
name,
session ID, host:port number, process ID, per
-process line
name,
process ID, host:port number, session ID, per-session or
-process line
number, command tag, session start time, virtual transaction ID,
regular transaction id, error severity, SQL state code, error message,
error message detail, hint, internal query that led to the error (if
...
...
@@ -3181,13 +3181,13 @@ local0.* /var/log/postgresql
<programlisting>
CREATE TABLE postgres_log
(
log_time timestamp with time zone,
log_time timestamp
(3)
with time zone,
user_name text,
database_name text,
session_id text,
connection_from text,
process_id integer,
process_line_num bigint,
connection_from text,
session_id text,
session_line_num bigint,
command_tag text,
session_start_time timestamp with time zone,
virtual_transaction_id text,
...
...
@@ -3203,7 +3203,7 @@ CREATE TABLE postgres_log
query text,
query_pos integer,
location text,
PRIMARY KEY (session_id,
process
_line_num)
PRIMARY KEY (session_id,
session
_line_num)
);
</programlisting>
</para>
...
...
src/backend/utils/error/elog.c
View file @
230e8962
...
...
@@ -42,7 +42,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/utils/error/elog.c,v 1.
199 2007/12/11 15:19:05
alvherre Exp $
* $PostgreSQL: pgsql/src/backend/utils/error/elog.c,v 1.
200 2007/12/11 20:07:31
alvherre Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -1667,7 +1667,6 @@ write_csvlog(ErrorData *edata)
initStringInfo
(
&
buf
);
/*
* timestamp with milliseconds
*
...
...
@@ -1715,8 +1714,9 @@ write_csvlog(ErrorData *edata)
appendCSVLiteral
(
&
buf
,
MyProcPort
->
database_name
);
appendStringInfoChar
(
&
buf
,
','
);
/* session id */
appendStringInfo
(
&
buf
,
"%lx.%x"
,
(
long
)
MyStartTime
,
MyProcPid
);
/* Process id */
if
(
MyProcPid
!=
0
)
appendStringInfo
(
&
buf
,
"%d"
,
MyProcPid
);
appendStringInfoChar
(
&
buf
,
','
);
/* Remote host and port */
...
...
@@ -1730,9 +1730,8 @@ write_csvlog(ErrorData *edata)
}
appendStringInfoChar
(
&
buf
,
','
);
/* Process id */
if
(
MyProcPid
!=
0
)
appendStringInfo
(
&
buf
,
"%d"
,
MyProcPid
);
/* session id */
appendStringInfo
(
&
buf
,
"%lx.%x"
,
(
long
)
MyStartTime
,
MyProcPid
);
appendStringInfoChar
(
&
buf
,
','
);
/* Line number */
...
...
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