Re: [HACKERS] nested hstore patch - FailedAssertion("!(value->array.nelems == 1)

2014-01-15 Thread Erik Rijkers
On Wed, January 15, 2014 09:46, Oleg Bartunov wrote:
>> On Wed, January 15, 2014 08:01, Oleg Bartunov wrote:
>>> It doesn't crashed in the last version in our repository.
>>>
>>> =# select  'x'::hstore || ('a=>"1"':: hstore) ;
>>>?column?
>>> ---
>>>  "x", "a", "1"
>>> (1 row)
>>>
>>
>> OK, shall I use that repository instead of the latest posted patch?

I now installed from:
  https://github.com/feodor/postgres

and compiled both a 'fast' and a 'debug' server (=with --enable-cassert see [1])

It turns out that the statement does not crash on a server compiled without 
--enable-cassert.

But a compile with --enable-cassert shows that a bug is still lurking:

testdb=# select  'x'::hstore || ('a=>"1"':: hstore) ;
The connection to the server was lost. Attempting reset: Failed.
!>

TRAP: FailedAssertion("!(value->array.nelems == 1)", File: "hstore_support.c", 
Line: 896)


Not good.


( please note that the assert is in a different file ('hstore_support.c') from 
the earlier assert error that I posted )


Thanks,

Erik Rijkers




[1]
pg_config:
'--prefix=/home/aardvark/pg_stuff/pg_installations/pgsql.nested_hstore_url'
'--bindir=/home/aardvark/pg_stuff/pg_installations/pgsql.nested_hstore_url/bin'
'--libdir=/home/aardvark/pg_stuff/pg_installations/pgsql.nested_hstore_url/lib' 
'--with-pgport=46541' '--enable-depend'
'--enable-cassert' '--enable-debug' '--with-openssl' '--with-perl' 
'--with-libxml' '--with-libxslt' '--with-zlib'





-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] nested hstore patch - FailedAssertion("!(value->array.nelems == 1)

2014-01-15 Thread Oleg Bartunov
https://github.com/feodor/postgres


On Wed, Jan 15, 2014 at 11:10 AM, Erik Rijkers  wrote:
> On Wed, January 15, 2014 08:01, Oleg Bartunov wrote:
>> It doesn't crashed in the last version in our repository.
>>
>> =# select  'x'::hstore || ('a=>"1"':: hstore) ;
>>?column?
>> ---
>>  "x", "a", "1"
>> (1 row)
>>
>
> OK, shall I use that repository instead of the latest posted patch?
> No point in testing old code ( I used nested_hstore_and_jsonb-2.patch ).
>
> Could you send a link to where that repository is?
>
> ( btw, your query is not quite the same as the one I used:
>   select  'x' || ('a=>"1"':: hstore)
> but your query also crashes my server here so I suppose
> it triggers the same bug )
>
>
> thanks,
>
> Erik Rijkers
>


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] nested hstore patch - FailedAssertion("!(value->array.nelems == 1)

2014-01-14 Thread Erik Rijkers
On Wed, January 15, 2014 08:01, Oleg Bartunov wrote:
> It doesn't crashed in the last version in our repository.
>
> =# select  'x'::hstore || ('a=>"1"':: hstore) ;
>?column?
> ---
>  "x", "a", "1"
> (1 row)
>

OK, shall I use that repository instead of the latest posted patch?
No point in testing old code ( I used nested_hstore_and_jsonb-2.patch ).

Could you send a link to where that repository is?

( btw, your query is not quite the same as the one I used:
  select  'x' || ('a=>"1"':: hstore)
but your query also crashes my server here so I suppose
it triggers the same bug )


thanks,

Erik Rijkers



-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] nested hstore patch - FailedAssertion("!(value->array.nelems == 1)

2014-01-14 Thread Oleg Bartunov
It doesn't crashed in the last version in our repository.

=# select  'x'::hstore || ('a=>"1"':: hstore) ;
   ?column?
---
 "x", "a", "1"
(1 row)



On Wed, Jan 15, 2014 at 3:53 AM, Erik Rijkers  wrote:
> On Mon, January 13, 2014 16:36, Andrew Dunstan wrote:
>> A new version of the patch is attached. It includes all of Erik's docs
>
>> [ nested_hstore_and_jsonb-2.patch ]
>
>
> This crashes the server:
>
> testdb=#  select  'x' || ('a=>"1"':: hstore) ;
> The connection to the server was lost. Attempting reset: Failed.
>
> logging:
> TRAP: FailedAssertion("!(value->array.nelems == 1)", File: "jsonb_support.c", 
> Line: 904)
> 2014-01-15 00:32:01.854 CET 1206 LOG:  server process (PID 3918) was 
> terminated by signal 6: Aborted
> 2014-01-15 00:32:01.854 CET 1206 DETAIL:  Failed process was running: select  
> 'x' || ('a=>"1"':: hstore) ;
>
>
> Btw, I find it strange that:
>
> testdb=#  select  ('a=>""':: hstore) #%> '{a}' ;
>  ?column?
> --
>  ""
> (1 row)
>
> so that:
>
> Time: 0.641 ms
> testdb=#  select ( ('a=>""':: hstore) #%> '{a}' ) = '' ;
>  ?column?
> --
>  f
> (1 row)
>
> testdb=#  select ( ('a=>""':: hstore) #%> '{a}' ) = '""' ;
>  ?column?
> --
>  t
> (1 row)
>
> Maybe there is a rationale, but it seems to me that
>('a=>""':: hstore) #%> '{a}'
> should deliver the empty string '', and not two double quotes.
>
>
> Thanks,
>
> Erik Rijkers
>
>
>
>
>
>
>
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] nested hstore patch - FailedAssertion("!(value->array.nelems == 1)

2014-01-14 Thread Erik Rijkers
On Mon, January 13, 2014 16:36, Andrew Dunstan wrote:
> A new version of the patch is attached. It includes all of Erik's docs

> [ nested_hstore_and_jsonb-2.patch ]


This crashes the server:

testdb=#  select  'x' || ('a=>"1"':: hstore) ;
The connection to the server was lost. Attempting reset: Failed.

logging:
TRAP: FailedAssertion("!(value->array.nelems == 1)", File: "jsonb_support.c", 
Line: 904)
2014-01-15 00:32:01.854 CET 1206 LOG:  server process (PID 3918) was terminated 
by signal 6: Aborted
2014-01-15 00:32:01.854 CET 1206 DETAIL:  Failed process was running: select  
'x' || ('a=>"1"':: hstore) ;


Btw, I find it strange that:

testdb=#  select  ('a=>""':: hstore) #%> '{a}' ;
 ?column?
--
 ""
(1 row)

so that:

Time: 0.641 ms
testdb=#  select ( ('a=>""':: hstore) #%> '{a}' ) = '' ;
 ?column?
--
 f
(1 row)

testdb=#  select ( ('a=>""':: hstore) #%> '{a}' ) = '""' ;
 ?column?
--
 t
(1 row)

Maybe there is a rationale, but it seems to me that
   ('a=>""':: hstore) #%> '{a}'
should deliver the empty string '', and not two double quotes.


Thanks,

Erik Rijkers








-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers