[GENERAL] Can't Bringing the former Primary up as a Standby

2011-08-11 Thread Sergey Levchenko
Hello! I got: root@reactor:~# invoke-rc.d postgresql start Starting PostgreSQL 9.1 database server: mainThe PostgreSQL server failed to start. Please check the log output: 2011-08-11 12:12:42 EEST LOG: database system was interrupted; last known up at 2011-08-11 12:04:21 EEST 2011-08-11 12:12:42

Re: [GENERAL] need help with query, how to fold select result to array?

2010-01-12 Thread Sergey Levchenko
CREATE TYPE varchararray AS (f varchar[]); SELECT office_id, serial, commit_date, service_id, array_agg(DISTINCT ROW(ARRAY(SELECT meter_id::varchar UNION ALL SELECT organization_reading::varchar UNION ALL SELECT reading::varchar))::varchararray) FROM meter_readings WHERE office_id

Re: [GENERAL] need help with query, how to fold select result to array?

2010-01-12 Thread Sergey Levchenko
but I have to fold it in multi-dimensional, array like {{71629130, 15518, 0}, {2668722, 616, 0}} ? but it's not possible to pass more then one argument to the array_agg function :/ 2010/1/12 A. Kretschmer : > In response to Sergey Levchenko : >> eps=# SELECT office_id, seria

[GENERAL] need help with query, how to fold select result to array?

2010-01-12 Thread Sergey Levchenko
eps=# SELECT office_id, serial, commit_date, service_id, meter_id, organization_reading, reading FROM meter_readings WHERE office_id = 134 AND serial = 27 AND commit_date = '2010-01-11' AND commit_time = '13:44:37' AND person_id = 300871; office_id | serial | commit_date | service_id | meter_id |

[GENERAL] Problem with SET CONSTRAINTS some_constraint_fkey DEFERRED

2009-12-09 Thread Sergey Levchenko
Why I get: update or delete on table "people" violates foreign key constraint "transactions_person_id_fkey" on table "transactions" But before that query I run: SET CONSTRAINTS transactions_person_id_fkey DEFERRED; before delete from people table Log: 2009-12-09 20:01:51 EET LOG: statement: BEG

[GENERAL] partitioning question. need current month and archive partitions.

2008-10-24 Thread Sergey Levchenko
Hi All! I have a table - transaction pool - with a lot of rows, but I use only data for the latest month, or current year in my computations. How can I split data to partitions like that if I can't use CHECK constraints with non constant objects like, extract('month' from CURRENT_DATE), extract('y

[GENERAL] ERROR: "TZ"/"tz" not supported

2005-06-28 Thread Sergey Levchenko
When I execute query, I've got error message. test=> SELECT to_timestamp('00:00:05.601 SAMST Tue Jun 28 2005', 'HH24:MI:SS.MS TZ Dy Mon DD '); ERROR: "TZ"/"tz" not supported How can I convert '00:00:05.601 SAMST Tue Jun 28 2005' (varchar type) to timestamp with time zone? -

[GENERAL] ilike, ~*, ~~* does not work on 8.0.3 (db encoding - UNICODE)

2005-06-14 Thread Sergey Levchenko
I can not get work ilike, ~*, ~~* with not ascii chars, but upper, lower, order by - work good. db encoding is UNICODE. test=> SELECT 'Тест' ~~* 'тест'; ?column? -- f test=> SELECT 'Тест'' ~* 'тест'; ?column? -- f test=> SELECT 'Тест'' ILIKE 'тест'; ?column? -- f

Re: [GENERAL] postgresql unicode lower/upper problem

2005-03-24 Thread Sergey Levchenko
bad that we can not modify lc_ctype and lc_collate from postgresql.conf like lc_messages, lc_monetary, ... I think that it will be good idea to add locale specific options to pg_createcluster... On Wed, 23 Mar 2005 12:17:14 -0500, Tom Lane <[EMAIL PROTECTED]> wrote: > Sergey Levchenko <[EMAI

[GENERAL] postgresql unicode lower/upper problem

2005-03-23 Thread Sergey Levchenko
I am not able to get work lower and upper functions on postgresql v8.0.1 and 8.1b(current cvs copy). I use Debian SID i686 GNU/Linux. Locale: ru_RU.KOI8-R createdb -E UNICODE test psql test test=> SET client_encoding TO KOI8; SET test=> SELECT t FROM t1; t ÐÐ tEsT (2 rows)