Search Postgresql Archives

Re: reading cvs logs with pgadmin queries

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Adrian,

1) yes I am using the example table 

CREATE TABLE postgres_log
(
  log_time timestamp(3) with time zone,
  user_name text,
  database_name text,
  process_id integer,
  connection_from text,
  session_id text,
  session_line_num bigint,
  command_tag text,
  session_start_time timestamp with time zone,
  virtual_transaction_id text,
  transaction_id bigint,
  error_severity text,
  sql_state_code text,
  message text,
  detail text,
  hint text,
  internal_query text,
  internal_query_pos integer,
  context text,
  query text,
  query_pos integer,
  location text,
  application_name text,
  PRIMARY KEY (session_id, session_line_num)
);

2) The exact error message is  ERROR:  extra data after last expected column

considering ~39000 lines go in before this line I am fairly certain it is the line.


Dave

Dave Cramer

dave.cramer(at)credativ(dot)ca
http://www.credativ.ca


On Thu, Sep 19, 2013 at 8:25 PM, Adrian Klaver <adrian.klaver@xxxxxxxxx> wrote:
On 09/19/2013 08:26 AM, Dave Cramer wrote:
The errors are extra lines after .... with a query like this

2013-09-12 10:33:19.145 WST,"user","dbname",14581,"192.168.1.22:58840  <http://192.168.1.22:58840>",523126d3.38f5,1,"SELECT",2013-09-12

10:28:35 WST,6/503023,0,ERROR,42P01,"relation ""dds_stores"" does not
exist",,,,,,"WITH RECURSIVE recursive_stores(id, name) AS (

I going to assume you mean after the ,,,,,, and are referring to the WITH query.

Several questions:

1) Are you using the example table from the docs?:

http://www.postgresql.org/docs/9.3/interactive/runtime-config-logging.html#RUNTIME-CONFIG-LOGGING-CSVLOG

If not what is the table definition?


2) What is the actual error message you get when running COPY?

--
Adrian Klaver
adrian.klaver@xxxxxxxxx


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux