pglogger

tables/LOG.pg_sql

Tables

LOG
Contains the log entries. There are as little constraints and trigger things as possible to keep the entering as fast as possible. The user is resposible for sensible use of the facility.
Columns:
ColumnData TypeDescription
FUNCTIONTEXT 
MESSAGETEXT 
LEVELTEXT 
PRESENT_USERNAME 
SESS_USERNAME 
TRANSACTION_TIMESTAMPTIMESTAMPTZ(6) 
TRANSACTION_IDBIGINT 
SERVER_PIDBIGINT 
REMOTE_ADDRESSINET 
REMOTE_PORTINT 
CLOCK_TIMESTAMPTIMESTAMPTZ(6) 
IDBIGINT 
Copyright:
Thiemo Kellner, 2018 -
Webpage:
https://www.sourceforge.net/projects/pglogger
Version Info:
$Id: LOG.pg_sql 21 2018-06-15 20:25:19Z thiemo $
Additional Info:
License LGPLv3
TODO:
Once HyperSQL supports a license tag, convert the corresponding info tag into one.

Source

001: \echo Start tables/LOG.pg_sql
002: 
003: drop table if exists LOG;
004: 
005: /** Contains the log entries.
006:  *  There are as little constraints and trigger things as possible to keep
007:  *  the entering as fast as possible. The user is resposible for sensible use
008:  *  of the facility.
009:  *
010:  *  @table LOG
011:  *  @col text FUNCTION
012:  *  @col text MESSAGE
013:  *  @col text LEVEL
014:  *  @col name PRESENT_USER
015:  *  @col name SESS_USER
016:  *  @col timestamptz(6) TRANSACTION_TIMESTAMP
017:  *  @col bigint TRANSACTION_ID
018:  *  @col bigint SERVER_PID
019:  *  @col inet REMOTE_ADDRESS
020:  *  @col int REMOTE_PORT
021:  *  @col timestamptz(6) CLOCK_TIMESTAMP
022:  *  @col bigint ID
023:  *  @version $Id: LOG.pg_sql 21 2018-06-15 20:25:19Z thiemo $
024:  *  @todo Once HyperSQL supports a license tag, convert the corresponding
025:  *        info tag into one.
026:  *  @copyright Thiemo Kellner, 2018 -
027:  *  @info License LGPLv3
028:  *  @webpage https://www.sourceforge.net/projects/pglogger
029:  */
030: create table LOG (
031:     FUNCTION text,
032:     MESSAGE text,
033:     LEVEL text,
034:     PRESENT_USER name,
035:     SESS_USER name,
036:     TRANSACTION_TIMESTAMP timestamp(6) with time zone,
037:     TRANSACTION_ID bigint,
038:     SERVER_PID bigint,
039:     REMOTE_ADDRESS inet,
040:     REMOTE_PORT int,
041:     CLOCK_TIMESTAMP timestamp(6) with time zone default clock_timestamp(),
042:     ID bigserial
043: );
044: 
045: 
046: comment on table LOG is
047:   'Contains the log entries. There are as little constraints and trigger things as possible to keep the entering as fast as possible. The user is resposible for sensible use of the facility.
048: $Header: svn+ssh://thiemo@svn.code.sf.net/p/pglogger/code/tables/LOG.pg_sql 21 2018-06-15 20:25:19Z thiemo $';
049: 
050: 
051: comment on column LOG.ID is
052:   'Primary key';
053: comment on column LOG.FUNCTION is
054:   'Name of the code object that supposedly entered the record.';
055: comment on column LOG.MESSAGE is
056:   'Is what ever the code object is trying to preserve in the history books.';
057: comment on column LOG.LEVEL is
058:   'Level the entry was made for';
059: comment on column LOG.PRESENT_USER is
060:   'user name of current execution context';
061: comment on column LOG.SESS_USER is
062:   'session user name';
063: comment on column LOG.TRANSACTION_TIMESTAMP is
064:   'Is to get a notion about when the transaction was started.';
065: comment on column LOG.TRANSACTION_ID is
066:   'current transaction id if there is one assigned';
067: comment on column LOG.SERVER_PID is
068:   'Process ID of the server process attached to the current session';
069: comment on column LOG.REMOTE_ADDRESS is
070:   'address of the remote connection';
071: comment on column LOG.REMOTE_PORT is
072:   'port of the remote connection';
073: comment on column LOG.CLOCK_TIMESTAMP is
074:   'Is to get a notion about when the entry was made.';
075: 
076: commit; -- unlike Oracle not all ddl commit implicitly
077: 
078: \echo End tables/LOG.pg_sql


pglogger
Generated by HyperSQL v3.9.8 at Wed Jul 4 07:48:53 2018