Re: [GENERAL] Rollback on include error in psql

2014-12-28 Thread Viktor Shitkovskiy
So should I report a bug somewhere? As a workaround I'm currently using a wrapper bash script that parses the source psql script and checks if the 'include' and 'copy-from' files do really exist. On Mon, Dec 29, 2014 at 4:04 AM, David G Johnston < david.g.johns...@gmail.com> wrote: > > I would s

Re: [GENERAL] Rollback on include error in psql

2014-12-28 Thread David G Johnston
Adrian Klaver-4 wrote > On 12/28/2014 10:06 AM, Viktor Shitkovskiy wrote: >> I include my own scripts. Each of them creates some table or makes some >> changes to existing tables. > > It is hard to say where to go from here without more information. really? This seems like a documentation bug (o

Re: [GENERAL] help troubleshooting invalid page header error

2014-12-28 Thread Cory Zue
Hi again, I was able to get the database back to a normal functional state using the zero_damaged_pages flag. However, after getting everything working and starting to use the database again, I am again getting "invalid page header" errors on a certain table. Does this imply there is a hardware i

[GENERAL] Improving performance of merging data between tables

2014-12-28 Thread Pawel Veselov
Hi. I was wondering if anybody would have any ideas on how to improve certain operations that we are having. PostgreSQL 9.3.3. Table layout: main_table: PK, N key columns, M data columns. The key columns are bound in a unique key together. PK is pure sequence number. There are few separate non-u

Re: [GENERAL] Rollback on include error in psql

2014-12-28 Thread Adrian Klaver
On 12/28/2014 10:06 AM, Viktor Shitkovskiy wrote: I include my own scripts. Each of them creates some table or makes some changes to existing tables. It is hard to say where to go from here without more information. The options you are passing to psql all have caveats: AUTOCOMMIT When o

Re: [GENERAL] Rollback on include error in psql

2014-12-28 Thread Viktor Shitkovskiy
I include my own scripts. Each of them creates some table or makes some changes to existing tables. Yes, I want a complete rollback. > > Where is the \include coming from? > > What is in the tableX.cre files? > > So if I am following you want a complete rollback on non-SQL or SQL > errors, correc

Re: [GENERAL] Rollback on include error in psql

2014-12-28 Thread Viktor Shitkovskiy
I use --single-transaction flag. But anyway, adding BEGIN and COMMIT doesn't change anything. I stil get that problem. On Sun, Dec 28, 2014 at 5:43 PM, Melvin Davidson wrote: > You did not show the complete script. > Did you remember to start the "transaction" with BEGIN; and end with > COMMIT;?

Re: [GENERAL] Rollback on include error in psql

2014-12-28 Thread Adrian Klaver
On 12/28/2014 12:02 AM, Viktor Shitkovskiy wrote: Hello. I'm trying to execute an sql script file in a single transation. The file contains includes for some other scripts which in my example create some tables. It looks like this: \include ../tables/table1.cre \include ../tables/table

Re: [GENERAL] Rollback on include error in psql

2014-12-28 Thread Melvin Davidson
You did not show the complete script. Did you remember to start the "transaction" with BEGIN; and end with COMMIT;? eg: BEGIN; \include ../tables/table1.cre \include ../tables/table2.cre ... \include ../tables/table10.cre COMMIT; On Sun, Dec 28, 2014 at 3:02 AM, Viktor Shitkovskiy wrote: > Hell

Re: [GENERAL] HINT: Perhaps you need a different "datestyle" setting - postgresql

2014-12-28 Thread Arup Rakshit
On Sunday, December 28, 2014 01:24:00 PM you wrote: > > > On 28 Dec 2014, at 12:06, Arup Rakshit wrote: > > > > Now I have another problem: > > > > prac_db=# SET datestyle = "SQL, DMY"; > > SET > > prac_db=# copy orders from '/home/arup/postgresql/order.csv' with CSV > > DELIMITER ',' HEADER ;

Re: [GENERAL] HINT: Perhaps you need a different "datestyle" setting - postgresql

2014-12-28 Thread Alban Hertroys
> On 28 Dec 2014, at 12:06, Arup Rakshit wrote: > > Now I have another problem: > > prac_db=# SET datestyle = "SQL, DMY"; > SET > prac_db=# copy orders from '/home/arup/postgresql/order.csv' with CSV > DELIMITER ',' HEADER ; > ERROR: time zone displacement out of range: " 9-25 AM" > CONTEXT:

Re: [GENERAL] HINT: Perhaps you need a different "datestyle" setting - postgresql

2014-12-28 Thread Pavel Stehule
2014-12-28 12:06 GMT+01:00 Arup Rakshit : > On Sunday, December 28, 2014 12:54:30 PM Pavel Stehule wrote: > > Hi > > > > try > > > > postgres=# set datestyle to DMY; > > SET > > postgres=# SELECT '19/08/2014'::date; > > date > > > > 2014-08-19 > > (1 row) > > > > Postgres support

Re: [GENERAL] HINT: Perhaps you need a different "datestyle" setting - postgresql

2014-12-28 Thread Arup Rakshit
On Sunday, December 28, 2014 12:54:30 PM Pavel Stehule wrote: > Hi > > try > > postgres=# set datestyle to DMY; > SET > postgres=# SELECT '19/08/2014'::date; > date > > 2014-08-19 > (1 row) > > Postgres supports following styles only: > > DEFAULT EUROPEAN ISO

Re: [GENERAL] HINT: Perhaps you need a different "datestyle" setting - postgresql

2014-12-28 Thread Pavel Stehule
Hi try postgres=# set datestyle to DMY; SET postgres=# SELECT '19/08/2014'::date; date 2014-08-19 (1 row) Postgres supports following styles only: DEFAULT EUROPEAN ISO NONEUROPEAN SQL YMD DMY GERMAN MDY POSTGRES US or more exactl

[GENERAL] HINT: Perhaps you need a different "datestyle" setting - postgresql

2014-12-28 Thread Arup Rakshit
Hi, I am actually trying to copy data from my csv file to DB. But I am getting the DateStyle error. I tried different ways to make it workable. But no luck! prac_db=# copy orders from '/home/arup/postgresql/order.csv' with CSV DELIMITER ',' HEADER ; ERROR: date/time field value out of range:

[GENERAL] attaching a process in eclipse

2014-12-28 Thread Ravi Kiran
hi, I am working with postgresql 9.4.0 source using eclipse(indigo version) in ubuntu 14.04. I am facing a problem of attaching a client process to postgresql server. I am following the steps given in this link https://wiki.postgresql.org/wiki/Working_with_Eclipse#Debugging_PostgreSQL_from_Eclips

[GENERAL] Rollback on include error in psql

2014-12-28 Thread Viktor Shitkovskiy
Hello. I'm trying to execute an sql script file in a single transation. The file contains includes for some other scripts which in my example create some tables. It looks like this: \include ../tables/table1.cre \include ../tables/table2.cre ... \include ../tables/table10.cre I'm