Re: [GENERAL] Sub-query having NULL row returning FALSE result

2016-06-28 Thread Tom Lane
Sridhar N Bamandlapally writes: > postgres=# CREATE TABLE emp (id INTEGER unique, ename VARCHAR); > postgres=# INSERT INTO emp VALUES (null, 'aaa'); > ... > postgres=# INSERT INTO emp SELECT * FROM (SELECT 5::integer id, > 'eee'::varchar ename) nr WHERE id NOT IN (SELECT id FROM emp); > INSERT 0 0

[GENERAL] Sub-query having NULL row returning FALSE result

2016-06-28 Thread Sridhar N Bamandlapally
Hi Please go through below case postgres=# CREATE TABLE emp (id INTEGER unique, ename VARCHAR); CREATE TABLE postgres=# INSERT INTO emp VALUES (null, 'aaa'); INSERT 0 1 postgres=# INSERT INTO emp VALUES (null, 'bbb'); INSERT 0 1 postgres=# INSERT INTO emp VALUES (3, 'ccc'); INSERT 0 1 postgres=#

Re: [GENERAL] cache lookup failed for index

2016-06-28 Thread Tom Lane
Willy-Bas Loos writes: > [ pg_dump sometimes fails with ] > pg_dump: [archiver (db)] query failed: ERROR: cache lookup failed for > index 231808363 This wouldn't be too surprising if you're constantly creating and dropping indexes. There's a small window between where pg_dump starts its transac

Re: [GENERAL] cache lookup failed for index

2016-06-28 Thread Willy-Bas Loos
On Tue, Jun 28, 2016 at 7:14 PM, Willy-Bas Loos wrote: > > (...) > Does anyone know what's up? > -- > > oh btw this is postgres 9.3 on debian 7 and londiste 2 -- Willy-Bas Loos

Re: [GENERAL] jsonb search

2016-06-28 Thread Arthur Silva
On Tue, Jun 28, 2016 at 5:09 PM, Oleg Bartunov wrote: > On Tue, Jun 28, 2016 at 5:15 PM, Armand Pirvu (home) > wrote: > > Hi > > > > In my quest of JSONB querying and searching without having to actually > cast > > into a text, I found JSQuery > > > > I do admit my JSONB knowledge shortcoming an

[GENERAL] cache lookup failed for index

2016-06-28 Thread Willy-Bas Loos
Hi, I have a londiste consumer database that has some additional user data in it. The user data is in schema's with the prefix oz_ Every night we dump those schema's with pg_dump. About 2-3 times per week cron emails me that something went wrong. That means that 4-5 day per week, everything works

Re: [GENERAL] questions about how to implement a gist index

2016-06-28 Thread Riccardo Vianello
Hi Oleg, On Tue, Jun 28, 2016 at 1:05 AM, Oleg Bartunov wrote: > On Tue, Jun 28, 2016 at 12:44 AM, Riccardo Vianello > wrote: > > Could you please also help me understand the difference (if any) between > > using the GIST_LEAF macro or the leafkey attribute of the GISTENTRY data > > structure?

Re: [GENERAL] jsonb search

2016-06-28 Thread Oleg Bartunov
On Tue, Jun 28, 2016 at 5:15 PM, Armand Pirvu (home) wrote: > Hi > > In my quest of JSONB querying and searching without having to actually cast > into a text, I found JSQuery > > I do admit my JSONB knowledge shortcoming and I am not a developer but a > DBA. As such some examples would be greatly

[GENERAL] jsonb search

2016-06-28 Thread Armand Pirvu (home)
Hi In my quest of JSONB querying and searching without having to actually cast into a text, I found JSQuery I do admit my JSONB knowledge shortcoming and I am not a developer but a DBA. As such some examples would be greatly appreciated since I tend to understand better I compiled and install