Re: [GENERAL] Why doesn't `RAISE EXCEPTION` provide error context?

2015-04-03 Thread Alban Hertroys
On 2 April 2015 at 19:15, Taylor Brown wrote: > So, I would rather put a check like this at the top of my function: > > -- > important_variable = (p_request::json->>'important_variable')::integer; > IF (important_variable is NULL) THEN RAISE EXCEPTION 'important_variable > must not be NULL.'; END

Re: [GENERAL]

2015-04-03 Thread Pavel Stehule
Hi http://stackoverflow.com/questions/4477301/creating-jobs-and-schedules-programatically-with-pgagent regards Pavel Stehule 2015-04-03 11:27 GMT+02:00 Ramesh T : > Hi , > How to create job in pgAgent.Where I need to place script in > pgAgent..any help > > Advanced thanks... > >

Re: [GENERAL] The case of PostgreSQL on NFS Server (II)

2015-04-03 Thread John McKown
On Fri, Apr 3, 2015 at 1:40 AM, Octavi Fors wrote: > Hi David, John et al., > Oops, sorry yes I think I may "miss-spoke" when explaining my second reason > why not choosing eSATA. > My situation is the following: > > -Two computers (C1 & C2) and NAS (with no eSATA I/O) on the same LAN. > -C1 acqu

Re: [GENERAL] quick q re execute & scope of new

2015-04-03 Thread Adrian Klaver
On 04/02/2015 09:59 PM, Scott Ribe wrote: On Apr 2, 2015, at 10:14 PM, Adrian Klaver wrote: EXECUTE 'insert into ' || quote_ident(tblname) || ' values(' || new.* || ')' Not that easy, strings are not quoted correctly, and null values are blank. Might be a function to translate new.* into a

[GENERAL] Serializable transaction restart/re-execute

2015-04-03 Thread Filipe Pina
Hello, I come from a GTM background and once of the transactional features there are the “Transaction Restarts”. Transaction restart is when we have two concurrent processes reading/writing to the same region/table of the database, the last process to commit will “see” that the database is not

Re: [GENERAL] Serializable transaction restart/re-execute

2015-04-03 Thread Bill Moran
On Fri, 3 Apr 2015 15:35:14 +0100 Filipe Pina wrote: > Hello, > > I come from a GTM background and once of the transactional features there are > the ?Transaction Restarts?. > > Transaction restart is when we have two concurrent processes reading/writing > to the same region/table of the data

[GENERAL] Overlap function for hstore?

2015-04-03 Thread Stefan Keller
Hi, I'd like to get an overlap function similar to '&&' but for key-value pairs of hstore! This underfits: postgres=# select hstore_to_array('a=>1,b=>2,c=>3'::hstore) && hstore_to_array('a=>2,d=>4,b=>2'::hstore) ...because array overlaps op takes every element (even 'a' or 2 alone) and doesn't

[GENERAL] "could not split GIN page; no new items fit"

2015-04-03 Thread Chris Curvey
Hmm, I'm trying to create a gin index, thusly: create index foo_idx on foo using gin(entry gin_trgm_ops); and I'm getting the error "could not split GIN page; no new items fit" Any idea what this means, or how I can get around it? The table in question has about 23MM rows, if that makes any dif

Re: [GENERAL] Overlap function for hstore?

2015-04-03 Thread Paul Jungwirth
> This underfits: > > postgres=# select hstore_to_array('a=>1,b=>2,c=>3'::hstore) && > hstore_to_array('a=>2,d=>4,b=>2'::hstore) > > ...because array overlaps op takes every element (even 'a' or 2 alone) > and doesn't test for key and value together like in 'b=>2'! How about hstore_to_matrix? The

Re: [GENERAL] Overlap function for hstore?

2015-04-03 Thread David G. Johnston
On Fri, Apr 3, 2015 at 5:37 PM, Stefan Keller wrote: > Hi, > > I'd like to get an overlap function similar to '&&' but for key-value > pairs of hstore! > > This underfits: > > postgres=# select hstore_to_array('a=>1,b=>2,c=>3'::hstore) && > hstore_to_array('a=>2,d=>4,b=>2'::hstore) > > ...because

Re: [GENERAL] "could not split GIN page; no new items fit"

2015-04-03 Thread Tom Lane
Chris Curvey writes: > Hmm, I'm trying to create a gin index, thusly: > create index foo_idx on foo using gin(entry gin_trgm_ops); > and I'm getting the error "could not split GIN page; no new items fit" > Any idea what this means, or how I can get around it? Looks to me like a bug (ie, the cod