Re: [GENERAL] NEW in after insert trugger contained incorrect data

2014-11-14 Thread Jim Nasby
On 11/14/14, 10:09 AM, Adrian Klaver wrote: Trigger update_cpu_load_stat added to table trassa.cpu_load: CREATE TRIGGER update_cpu_load_stat_trigger AFTER INSERT ON trassa.cpu_load_stat FOR EACH ROW EXECUTE PROCEDURE trassa.update_cpu_load_stat(); Another run through showed that the

Re: [GENERAL] pg_upgrade and ubuntu

2014-11-14 Thread Peter Eisentraut
On 11/14/14 2:10 PM, Jonathan Vanasco wrote: > I ran into an issue migrating from 9.1 to 9.3 on ubuntu using pg_upgrade > > the default ubuntu package, and the one from postgresql.org, both store > `postgresql.conf` in etc as `/etc/postgresql/VERSION/main/postgresql.conf` > > however, the pg_upg

Re: [GENERAL] pg_upgrade and ubuntu

2014-11-14 Thread David G Johnston
David G Johnston wrote > > David G Johnston wrote >> >> Jonathan Vanasco-7 wrote >>> I ran into an issue migrating from 9.1 to 9.3 on ubuntu using pg_upgrade >>> >>> the default ubuntu package, and the one from postgresql.org, both store >>> `postgresql.conf` in etc as >>> `/etc/postgresql/VERSI

Re: [GENERAL] pg_upgrade and ubuntu

2014-11-14 Thread Alvaro Herrera
David G Johnston wrote: > David G Johnston wrote > > It would make more sense for the Debian packagers people to write a > > pg_upgradecluster wrapper like they have done for the other key programs. > > Note it appears there is a pg_upgradecluster program, but it doesn't appear > to a wrapper for

Re: [GENERAL] pg_upgrade and ubuntu

2014-11-14 Thread David G Johnston
David G Johnston wrote > > Jonathan Vanasco-7 wrote >> I ran into an issue migrating from 9.1 to 9.3 on ubuntu using pg_upgrade >> >> the default ubuntu package, and the one from postgresql.org, both store >> `postgresql.conf` in etc as >> `/etc/postgresql/VERSION/main/postgresql.conf` >> >> how

Re: [GENERAL] pg_upgrade and ubuntu

2014-11-14 Thread Adrian Klaver
On 11/14/2014 11:10 AM, Jonathan Vanasco wrote: I ran into an issue migrating from 9.1 to 9.3 on ubuntu using pg_upgrade the default ubuntu package, and the one from postgresql.org, both store `postgresql.conf` in etc as `/etc/postgresql/VERSION/main/postgresql.conf` however, the pg_upgrade sc

Re: [GENERAL] pg_upgrade and ubuntu

2014-11-14 Thread David G Johnston
Jonathan Vanasco-7 wrote > I ran into an issue migrating from 9.1 to 9.3 on ubuntu using pg_upgrade > > the default ubuntu package, and the one from postgresql.org, both store > `postgresql.conf` in etc as `/etc/postgresql/VERSION/main/postgresql.conf` > > however, the pg_upgrade script expects i

[GENERAL] pg_upgrade and ubuntu

2014-11-14 Thread Jonathan Vanasco
I ran into an issue migrating from 9.1 to 9.3 on ubuntu using pg_upgrade the default ubuntu package, and the one from postgresql.org, both store `postgresql.conf` in etc as `/etc/postgresql/VERSION/main/postgresql.conf` however, the pg_upgrade script expects it in the `datadir`. the simple solu

Re: [GENERAL] Two instances of Postgres with single data directory

2014-11-14 Thread John R Pierce
On 11/14/2014 2:24 AM, Albe Laurenz wrote: dineshkaarthick wrote: >I would like to know how is the "Shared Disk Failover" replication achieved >if it is not possible to share the data directory ? I am referring to the >1st solution in the mentioned link, >http://www.postgresql.org/docs/9.3/stati

Re: [GENERAL] NEW in after insert trugger contained incorrect data

2014-11-14 Thread Adrian Klaver
On 11/14/2014 07:32 AM, Brilliantov Kirill Vladimirovich wrote: Albe Laurenz wrote on 11/14/2014 01:28 PM: You should post the table definition and the whole trigger; the error message seems to refer to things you omitted in your quote. Yours, Laurenz Albe Turns out I was not at a suffic

Re: [GENERAL] NEW in after insert trugger contained incorrect data

2014-11-14 Thread Adrian Klaver
On 11/14/2014 07:32 AM, Brilliantov Kirill Vladimirovich wrote: Albe Laurenz wrote on 11/14/2014 01:28 PM: You should post the table definition and the whole trigger; the error message seems to refer to things you omitted in your quote. Yours, Laurenz Albe Just approaching caffeine level r

Re: [GENERAL] NEW in after insert trugger contained incorrect data

2014-11-14 Thread Brilliantov Kirill Vladimirovich
Albe Laurenz wrote on 11/14/2014 01:28 PM: You should post the table definition and the whole trigger; the error message seems to refer to things you omitted in your quote. Yours, Laurenz Albe Table with original data trassa.cpu_load: CREATE TABLE trassa.cpu_load ( id serial NOT NULL, de

Re: [GENERAL] NEW in after insert trugger contained incorrect data

2014-11-14 Thread Adrian Klaver
On 11/14/2014 07:23 AM, Brilliantov Kirill Vladimirovich wrote: Adrian Klaver wrote on 11/14/2014 05:15 PM: Actually I think there is in the table the trigger is on. From the original post: SQL statement "INSERT INTO trassa.cpu_load (device, device_timestamp, cpu, value) VALUES(5,'1970-01-02 0

Re: [GENERAL] NEW in after insert trugger contained incorrect data

2014-11-14 Thread Brilliantov Kirill Vladimirovich
Adrian Klaver wrote on 11/14/2014 05:15 PM: Actually I think there is in the table the trigger is on. From the original post: SQL statement "INSERT INTO trassa.cpu_load (device, device_timestamp, cpu, value) VALUES(5,'1970-01-02 06:02:38',0,6),(5,'1970-01-02 06:02:38',1,0),(5,'1970-01-02 06:02:

Re: service allowing arbitrary relations was Re: [GENERAL] hstore, but with fast range comparisons?

2014-11-14 Thread Andy Colson
On 11/13/2014 5:56 PM, Guyren Howe wrote: On Nov 13, 2014, at 2:28 PM, Andy Colson wrote: I want to do something that is perfectly satisfied by an hstore column. *Except* that I want to be able to do fast (ie indexed) <, > etc comparisons, not just equality. From what I can tell, there isn

Re: [GENERAL] Inconsistent results from HEX values in predicates

2014-11-14 Thread Tom Lane
Gary Cowell writes: > e5iso=# create table t1 (col1 character(3)); > CREATE TABLE > e5iso=# insert into t1 values('AAA'); > INSERT 0 1 > e5iso=# insert into t1 values('000'); > INSERT 0 1 > e5iso=# insert into t1 values(' '); > INSERT 0 1 > e5iso=# insert into t1 values(' x '); > INSERT 0 1 > e5

Re: [GENERAL] NEW in after insert trugger contained incorrect data

2014-11-14 Thread Adrian Klaver
On 11/14/2014 03:24 AM, Albe Laurenz wrote: Brilliantov Kirill Vladimirovich wrote: You should post the table definition and the whole trigger; the error message seems to refer to things you omitted in your quote. Table with statistic: CREATE TABLE trassa.cpu_load_stat ( id serial NOT NULL

[GENERAL] Encrypting/Decryption

2014-11-14 Thread VENKTESH GUTTEDAR
Hello, As i am new to postgresql and django. please help me to acheive the following. I have created a database with some tables and i want to encrypt the data in database tables, so please someone guide me how to do it.? i want to encrypt the data and also decrypt through django, so

Re: [GENERAL] Inconsistent results from HEX values in predicates

2014-11-14 Thread Gary Cowell
Actually I find this returns my row: select col1 from t1 where col1 BETWEEN E'\x01\x01\x01' AND E'\xFF\xFF\xFF' or col1=E'\x20'; Why does x'202020' match an equality condition on E'\x20' ? Is there some auto trimming going on? This is PostgreSQL 9.3.5 on Linux On 14 November 2014 11:41, Gary

[GENERAL] Inconsistent results from HEX values in predicates

2014-11-14 Thread Gary Cowell
Hello I have a table, and I want to always supply predicates in a BETWEEN format. If all data is to be returned, then the FROM and TO values of the BETWEEN are set to low hex value, and high hex value. Sometimes this is not returning rows, here's an example: e5iso=# create table t1 (col1 charac

Re: [GENERAL] NEW in after insert trugger contained incorrect data

2014-11-14 Thread Albe Laurenz
Brilliantov Kirill Vladimirovich wrote: >> You should post the table definition and the whole trigger; the error >> message seems to refer to things you omitted in your quote. > > Table with statistic: > CREATE TABLE trassa.cpu_load_stat > ( >id serial NOT NULL, >device integer NOT NULL, >

Re: [GENERAL] NEW in after insert trugger contained incorrect data

2014-11-14 Thread Brilliantov Kirill Vladimirovich
Albe Laurenz wrote on 11/14/2014 01:28 PM: You should post the table definition and the whole trigger; the error message seems to refer to things you omitted in your quote. Table with statistic: CREATE TABLE trassa.cpu_load_stat ( id serial NOT NULL, device integer NOT NULL, cpu smallin

Re: [GENERAL] NEW in after insert trugger contained incorrect data

2014-11-14 Thread Albe Laurenz
Brilliantov Kirill Vladimirovich wrote: > I use Postgre-9.3.5 on windows7 x64. > I use simple trigger for store some statistic data, it code: > SELECT field IN variable FROM table WHERE ...; > IF FOUND THEN >UPDATE table SET field = ...; > ELSE >INSERT INTO table (field) VALUES(value); > EN

Re: [GENERAL] Two instances of Postgres with single data directory

2014-11-14 Thread Albe Laurenz
dineshkaarthick wrote: > I would like to know how is the "Shared Disk Failover" replication achieved > if it is not possible to share the data directory ? I am referring to the > 1st solution in the mentioned link, > http://www.postgresql.org/docs/9.3/static/different-replication-solutions.html Yo

Re: [GENERAL] Two instances of Postgres with single data directory

2014-11-14 Thread Devrim Gündüz
Hi, On Fri, 2014-11-14 at 02:57 -0700, dineshkaarthick wrote: > I would like to know how is the "Shared Disk Failover" replication > achieved if it is not possible to share the data directory ? I am > referring to the 1st solution in the mentioned link, > http://www.postgresql.org/docs/9.3/static

Re: [GENERAL] Two instances of Postgres with single data directory

2014-11-14 Thread dineshkaarthick
Michael, Appreciate your quick response. Thank you. I would like to know how is the "Shared Disk Failover" replication achieved if it is not possible to share the data directory ? I am referring to the 1st solution in the mentioned link, http://www.postgresql.org/docs/9.3/static/different-replica

[GENERAL] NEW in after insert trugger contained incorrect data

2014-11-14 Thread Brilliantov Kirill Vladimirovich
Hello! I use Postgre-9.3.5 on windows7 x64. I use simple trigger for store some statistic data, it code: SELECT field IN variable FROM table WHERE ...; IF FOUND THEN UPDATE table SET field = ...; ELSE INSERT INTO table (field) VALUES(value); END IF; RETURN NULL; This trigger added as FOR EACH