Re: [GENERAL] Load Data with COPY

2015-03-24 Thread Nicolas Paris
Every day I discover Postgresql's new features. Today : make women happy :) 2015-03-25 4:27 GMT+01:00 : > Successfully loaded two files into two different tables. Happy. :-) > > Diana > > > Yes, it is a header in the .csv file. I did not know that there is such > an > > option as specifying WITH

Re: [GENERAL] Load Data with COPY

2015-03-24 Thread dpopova
Successfully loaded two files into two different tables. Happy. :-) Diana > Yes, it is a header in the .csv file. I did not know that there is such an > option as specifying WITH HEADER in COPY. > I should have tried to delete the header and specify the loading columns > in the COPY itself. > > T

Re: [GENERAL] Load Data with COPY

2015-03-24 Thread dpopova
Yes, it is a header in the .csv file. I did not know that there is such an option as specifying WITH HEADER in COPY. I should have tried to delete the header and specify the loading columns in the COPY itself. Thank you, Adrian, Ray, and John. Diana > On 03/24/2015 02:16 PM, Raymond O'Donnell w

Re: [GENERAL] Load Data with COPY

2015-03-24 Thread Adrian Klaver
On 03/24/2015 02:16 PM, Raymond O'Donnell wrote: On 24/03/2015 21:00, dpop...@uvic.ca wrote: I have 7,000+ rows of data in Numbers. Exported to .csv file, tried to load into postgres table with COPY FROM, failed. Postgres does not recognize the format: ERROR: invalid input syntax for integer:

Re: [GENERAL] Load Data with COPY

2015-03-24 Thread John R Pierce
On 3/24/2015 2:16 PM, Raymond O'Donnell wrote: Is there a header row in the CSV file? - if so, delete it and try again. or specify 'WITH HEADER' on the COPY command -- john, recycling bits in santa cruz -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to

Re: [GENERAL] Load Data with COPY

2015-03-24 Thread Raymond O'Donnell
On 24/03/2015 21:00, dpop...@uvic.ca wrote: > I have 7,000+ rows of data in Numbers. Exported to .csv file, tried to > load into postgres table with COPY FROM, failed. Postgres does not > recognize the format: > > ERROR: invalid input syntax for integer: "project_name,... > > Is there any way to

[GENERAL] Load Data with COPY

2015-03-24 Thread dpopova
I have 7,000+ rows of data in Numbers. Exported to .csv file, tried to load into postgres table with COPY FROM, failed. Postgres does not recognize the format: ERROR: invalid input syntax for integer: "project_name,... Is there any way to export/convert the data in Numbers into a format recogniz

Re: [GENERAL] Index corruption

2015-03-24 Thread Kevin Grittner
John R Pierce wrote: > On 3/24/2015 12:05 PM, Bankim Bhavsar wrote: >> If possible, can someone point to corruption related issues fixed >> after 9.2.0? > > in the postgres manual, see the release notes for 9.2.1 through 9.2.10 You can find links to those from here: http://www.postgresql.org/do

Re: [GENERAL] How to distinguish serialization errors from others using pqxx

2015-03-24 Thread Kevin Grittner
Saimon wrote: > As I undersand, the only way to determine serialization errors is > to parse pqxx::sql_error exceptions' messages for keywords like > "could not serialize" etc. I had to do a web search to find out what pqxx was. It is a C++ connector for PostgreSQL that's been around for ten ye

Re: [GENERAL] Index corruption

2015-03-24 Thread John R Pierce
On 3/24/2015 12:05 PM, Bankim Bhavsar wrote: We'll upgrade to 9.2.10 and attempt to reproduce the issue. If possible, can someone point to corruption related issues fixed after 9.2.0? in the postgres manual, see the release notes for 9.2.1 through 9.2.10 -- john, recycling bits in santa cr

Re: [GENERAL] Index corruption

2015-03-24 Thread Bankim Bhavsar
Thanks for the input. We'll upgrade to 9.2.10 and attempt to reproduce the issue. If possible, can someone point to corruption related issues fixed after 9.2.0? Thanks, -Bankim. On 03/24/2015 11:56 AM, David G. Johnston wrote: On Tuesday, March 24, 2015, Bankim Bhavsar

Re: [GENERAL] Index corruption

2015-03-24 Thread David G. Johnston
On Tuesday, March 24, 2015, Bankim Bhavsar wrote: > Hello postgres experts, > > We are running a test that periodically abruptly kills postgres > process(equivalent to kill -9) and restarts it. > After running this test for 24 hrs or so, we see duplicate primary key > entries in postgres table. >

Re: [GENERAL] Index corruption

2015-03-24 Thread John R Pierce
On 3/24/2015 11:49 AM, Bankim Bhavsar wrote: - 9.2.0 9.2 is currently at 9.2.10. 9.2.0 was released 2.5 years ago. several of the bugs fixed in the 10 incremental updates were data corruption related. -- john, recycling bits in santa cruz -- Sent via pgsql-general mailing list (pgsql-

[GENERAL] Index corruption

2015-03-24 Thread Bankim Bhavsar
Hello postgres experts, We are running a test that periodically abruptly kills postgres process(equivalent to kill -9) and restarts it. After running this test for 24 hrs or so, we see duplicate primary key entries in postgres table. We detect this as we load internal hash-table data-structur

Re: [GENERAL] SELinux context of PostgreSQL connection process

2015-03-24 Thread John R Pierce
On 3/24/2015 5:16 AM, Мартынов Александр wrote: There is postgres db with sepgsql enabled. When user connect to postgres db with psql, postgres create new process for each connection. These processes have selinux context unconfined_u:unconfined_r:postgresql_t. Is there a way to assign the proc

Re: [GENERAL] How to distinguish serialization errors from others using pqxx

2015-03-24 Thread Saimon
As I undersand, the only way to determine serialization errors is to parse pqxx::sql_error exceptions' messages for keywords like "could not serialize" etc. Or am I wrong? Thanks in advance Saimon -- View this message in context: http://postgresql.nabble.com/How-to-distinguish-serialization-e

[GENERAL] SELinux context of PostgreSQL connection process

2015-03-24 Thread Мартынов Александр
There is postgres db with sepgsql enabled. When user connect to postgres db with psql, postgres create new process for each connection. These processes have selinux context unconfined_u:unconfined_r:postgresql_t. Is there a way to assign the process a context of user that connected to db? --