From b9fe34f0d8bf760a24b5682111b95cd558855e77 Mon Sep 17 00:00:00 2001 From: sparkyx Date: Thu, 4 Nov 2004 20:25:49 +0000 Subject: [PATCH] Log database for debugging purpose --- sql/log/log.sql | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 sql/log/log.sql diff --git a/sql/log/log.sql b/sql/log/log.sql new file mode 100644 index 000000000..0596c63e2 --- /dev/null +++ b/sql/log/log.sql @@ -0,0 +1,29 @@ +-- +-- PostgreSQL database dump +-- + +SET search_path = public, pg_catalog; + +-- +-- TOC entry 2 (OID 679385) +-- Name: log; Type: TABLE; Schema: public; Owner: phpcompta +-- + +CREATE TABLE log ( + lg_timestamp timestamp without time zone DEFAULT now(), + lg_file text, + lg_type text DEFAULT 'debug', + lg_line text, + lg_msg text +); + + +-- +-- TOC entry 3 (OID 680272) +-- Name: last_log; Type: VIEW; Schema: public; Owner: dany +-- + +CREATE VIEW last_log AS + SELECT log.lg_timestamp, log.lg_file, log.lg_type, log.lg_line, log.lg_msg FROM log WHERE ((log.lg_timestamp)::timestamp with time zone > (now() - (reltime('00:05'::interval))::interval)); + +