Re: contrib/cube - binary input/output handlers

2021-03-06 Thread Tom Lane
Kohei KaiGai writes: > Ok, the attached v4 sends the raw header as-is, then cube_recv > validates the header. > If num-of-dimension is larger than CUBE_MAX_DIM, it is obviously > unused bits (8-30) > are used or out of the range. Works for me. I noted one additional bug: you have to condition wh

Re: contrib/cube - binary input/output handlers

2021-03-05 Thread Kohei KaiGai
2021年3月6日(土) 11:21 Tom Lane : > > Kohei KaiGai writes: > > 2021年3月6日(土) 1:41 Tom Lane : > >> Scanning the code, I have a couple of gripes. I'm not sure it's > >> a good plan to just send the "header" field raw like that --- > >> would breaking it into a dimension field and a point bool be > >> be

Re: contrib/cube - binary input/output handlers

2021-03-05 Thread Tom Lane
Kohei KaiGai writes: > 2021年3月6日(土) 1:41 Tom Lane : >> Scanning the code, I have a couple of gripes. I'm not sure it's >> a good plan to just send the "header" field raw like that --- >> would breaking it into a dimension field and a point bool be >> better? In any case, the receive function has

Re: contrib/cube - binary input/output handlers

2021-03-05 Thread Kohei KaiGai
2021年3月6日(土) 1:41 Tom Lane : > > Kohei KaiGai writes: > > Thanks, the attached patch add cube--1.5 for binary send/recv functions and > > modification of cube type using the new ALTER TYPE. > > Hm, that was already superseded by events (112d411fb). > As long as we get this done for v14, we can jus

Re: contrib/cube - binary input/output handlers

2021-03-05 Thread Tom Lane
Kohei KaiGai writes: > Thanks, the attached patch add cube--1.5 for binary send/recv functions and > modification of cube type using the new ALTER TYPE. Hm, that was already superseded by events (112d411fb). As long as we get this done for v14, we can just treat it as an add-on to cube 1.5, so he

Re: contrib/cube - binary input/output handlers

2021-03-05 Thread Kohei KaiGai
Thanks, the attached patch add cube--1.5 for binary send/recv functions and modification of cube type using the new ALTER TYPE. Best regards, 2021年3月4日(木) 0:45 Tom Lane : > > I wrote: > > You can add the I/O functions with ALTER TYPE nowadays. > > To be concrete, see 949a9f043eb70a4986041b4751357

Re: contrib/cube - binary input/output handlers

2021-03-03 Thread Tom Lane
I wrote: > You can add the I/O functions with ALTER TYPE nowadays. To be concrete, see 949a9f043eb70a4986041b47513579f9a13d6a33 regards, tom lane

Re: contrib/cube - binary input/output handlers

2021-03-03 Thread Tom Lane
Kohei KaiGai writes: > One thing not straightforward is that a new definition of cube type > needs to drop > the old definition once, then it leads cascaded deletion to the > objects that depends > on the "cube" type declared at the cube--1.2.sql. > Do you have any good ideas? You can add the I/O

Re: contrib/cube - binary input/output handlers

2021-03-03 Thread Kohei KaiGai
2021年3月3日(水) 23:33 Peter Eisentraut : > > On 24.02.21 04:18, Kohei KaiGai wrote: > > This patch adds cube_send / cube_recv handlers on the contrib/cube data > > type. > > Once this patch was applied to, the libpq client can obtain the table > > data using binary mode. > > Seems reasonable. But yo

Re: contrib/cube - binary input/output handlers

2021-03-03 Thread Peter Eisentraut
On 24.02.21 04:18, Kohei KaiGai wrote: This patch adds cube_send / cube_recv handlers on the contrib/cube data type. Once this patch was applied to, the libpq client can obtain the table data using binary mode. Seems reasonable. But you need to write an extension upgrade script and bump the e

contrib/cube - binary input/output handlers

2021-02-23 Thread Kohei KaiGai
Hello, I noticed that contrib/cube data type does not support binary input/output handler when I tried to dump a table with cube columns, using a tool [*1] that uses binary data over libpq. $ pg2arrow -d postgres -t my_table ../utils/pgsql_client.c:351 SQL execution failed: ERROR: no binary out