[GENERAL] Query with error - DOW FROM timestamp

2014-05-23 Thread Victor Sterpu
Hello When I run the query from down I receive an error. How can I write this query to receive the day ot the week. SELECT EXTRACT(DOW FROM timestamp TO_TIMESTAMP('14-10-2011', 'DD-MM-')); Thank you

Re: [GENERAL] Query with error - DOW FROM timestamp

2014-05-25 Thread Victor Sterpu
Yes, thank you. -- Original Message -- From: "Albe Laurenz" To: "Victor Sterpu" ; "PostgreSQL General" Sent: 5/23/2014 12:51:30 PM Subject: RE: [GENERAL] Query with error - DOW FROM timestamp Victor Sterpu wrote: When I run the query from down

[GENERAL] Lock problem

2014-04-02 Thread Victor Sterpu
Hello I have a problem that it seems to be very hard to debug. Problem is from some postgresql locks. I use PostgreSQL 9.1.8. I runned this query to fid the locks: SELECT bl.pid AS blocked_pid, a.usename AS blocked_user, kl.pid AS blocking_pid, ka.usename AS blocking_user, a.current_query AS b

Re: [GENERAL] Lock problem

2014-04-02 Thread Victor Sterpu
-- Original Message -- From: "Tom Lane" To: "Victor Sterpu" Cc: pgsql-general@postgresql.org Sent: 4/2/2014 6:31:13 PM Subject: Re: [GENERAL] Lock problem "Victor Sterpu" writes: I have a problem that it seems to be very hard to debug. Problem is

Re: [GENERAL] Lock problem

2014-04-02 Thread Victor Sterpu
-- Original Message -- From: "Merlin Moncure" To: "Victor Sterpu" Cc: "PostgreSQL General" Sent: 4/2/2014 6:49:28 PM Subject: Re: [GENERAL] Lock problem On Wed, Apr 2, 2014 at 10:19 AM, Victor Sterpu wrote: Hello I have a problem that it

Re: [GENERAL] Lock problem

2014-04-02 Thread Victor Sterpu
-- Original Message -- From: "Igor Neyman" To: "Victor Sterpu" ; "pgsql-general@postgresql.org" Sent: 4/2/2014 6:29:17 PM Subject: RE: [GENERAL] Lock problem From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On

Re: [GENERAL] Lock problem

2014-04-02 Thread Victor Sterpu
I followed all your advice and it is obiuos that this log will show exactly what I need to debug the situation. Great tip, thank you. -- Original Message -- From: "Merlin Moncure" To: "Victor Sterpu" Cc: "PostgreSQL General" Sent: 4/2/2014 7:08:08

Re: [GENERAL] Lock problem

2014-04-02 Thread Victor Sterpu
arted transaction will never be commited 3. from the server point of view there is a unfinished transaction that will block future statements Is this normal behaviour? -- Original Message -- From: "Victor Sterpu" To: "Merlin Moncure" Cc: "PostgreSQL General"

Re: [GENERAL] Lock problem

2014-04-02 Thread Victor Sterpu
I'm sure is not right, but is a there a server side solution for such sitations? A configuration - timeout for idle transactions. -- Original Message -- From: "Victor Sterpu" To: "Victor Sterpu" ; "Merlin Moncure" Cc: "PostgreSQL General&q

[GENERAL] Correct syntax

2014-04-11 Thread Victor Sterpu
How would I write sutch a query? SELECT to_timestamp ('10-10-2013 15:00', 'DD-MM- HH24:MI') + interval REPLACE('1.30', '.', ':')||' hours' This gives error at REPLACE. Thank you.