[GENERAL] custom average window function failure

2016-10-08 Thread Seb
Hello, Until I upgraded to PostgreSQL 9.6, a custom average function was working well as a window function. It's meant to average a composite type: CREATE TYPE public.angle_vectors AS (x double precision, y double precision); COMMENT ON TYPE public.angle_vectors IS 'This type holds the

Re: [GENERAL] import_bytea function (resolved)

2016-10-08 Thread Stephen Davies
On 08/10/16 17:16, Thomas Kellerer wrote: Stephen Davies schrieb am 08.10.2016 um 02:57: A follow-up question. Once the bytea column is populated, how best to display the content in a web page? I have : byte [] imgB; ResultSet rs = st1.executeQuery("select pic from part where pno='" + p + "'"

Re: [GENERAL] Lock contention in TransactionIdIsInProgress()

2016-10-08 Thread Andres Freund
On 2016-10-07 08:36:12 -0500, Merlin Moncure wrote: > Won't happen. Only bugs get ported back Hopefully we don't port bugs back all that often. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-ge

Re: [GENERAL] import_bytea function

2016-10-08 Thread Thomas Kellerer
Stephen Davies schrieb am 08.10.2016 um 02:57: I will have to regenerate that code to get the exact error message text but it basically said that the parameter substitution was invalid. A follow-up question. Once the bytea column is populated, how best to display the content in a web page? I

Re: [GENERAL] import_bytea function

2016-10-08 Thread Thomas Kellerer
Jan de Visser schrieb am 08.10.2016 um 16:11: You need to stream the data. Working from memory here, and it's been a long time, but it's something like rs = conn.executeQuery("SELECT byeta_column FROM foo WHERE bar = ?"); Blob b = (Blob) rs.getObject(1); No. getBytes() works fine with the JDB

Re: [GENERAL] import_bytea function

2016-10-08 Thread Jan de Visser
On 2016-10-08 2:36 AM, Stephen Davies wrote: On 07/10/16 19:24, Thomas Kellerer wrote: Stephen Davies schrieb am 07.10.2016 um 10:46: You can store the contents of a file in a bytea using plain JDBC no lo_import() required String sql = "insert into images (id, image_data) values (?,?)";

Re: [GENERAL] Multi tenancy : schema vs databases

2016-10-08 Thread Karsten Hilbert
On Sat, Oct 01, 2016 at 07:21:47PM -0400, Melvin Davidson wrote: > *I would like to comment on the multiple schema vs databases situation. > First of all, 1000's of databases is insanity and just asking for trouble. > Next, 1000's of schemas is a nightmare to maintain. I understand the > requireme

Re: [GENERAL] Lock contention in TransactionIdIsInProgress()

2016-10-08 Thread Michael Paquier
On Fri, Oct 7, 2016 at 10:36 PM, Merlin Moncure wrote: > On Wed, Oct 5, 2016 at 5:38 AM, Tomáš Uko wrote: >> Hi Jeff, >> >> >> >> We have encountered same problem as you (in 9.5.4), it seems that so far it >> hasn’t been ported back from 9.6, but if you take this commit and apply it >> to 9.5 sou