[HACKERS] `array_position...()` causes SIGSEGV - Mailing list pgsql-hackers

From Junseok Yang
Subject [HACKERS] `array_position...()` causes SIGSEGV
Date
Msg-id CAE+byMupUURYiZ6bKYgMZb9pgV1CYAijJGqWj-90W=nS7uEOeA@mail.gmail.com
Whole thread Raw
Responses Re: [HACKERS] `array_position...()` causes SIGSEGV  (Michael Paquier <michael.paquier@gmail.com>)
Re: [HACKERS] `array_position...()` causes SIGSEGV  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-hackers
Hello hackers,

I met SIGSEGV when using `array_position()` with record type
arguments, so I've written a patch which corrects this problem. It
seems that `array_position...()` sets wrong memory context for the
cached function (in this case `record_eq()`) which is used to find a
matching element.

The problem is reproducable with the following query.

SELECT array_position(ids, (1, 1))
FROM (VALUES (ARRAY[(0, 0)]), (ARRAY[(1, 1)])) AS _(ids);

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

Attachment

pgsql-hackers by date:

Previous
From: vinayak
Date:
Subject: Re: [HACKERS] Transactions involving multiple postgres foreignservers
Next
From: Venkata B Nagothi
Date:
Subject: Re: [HACKERS] Declarative partitioning - another take