duckdb/duckdb-postgres

Support for array of macaddr

Closed this issue · 2 comments

What happens?

Hello,

I have a postgresql table with an array column of mac addresses. I can't read the table from duckdb. I have the following error: Error: INTERNAL Error: Unsupported type for ColumnDataCollection::GetCopyFunction

It seems that macaddr is not supported here. It would fine to have a conversion to varchar.

To Reproduce

In postgresql:

CREATE TABLE test
(
    mac_addresses macaddr[]
);

TRUNCATE test;
INSERT INTO test (mac_addresses)
VALUES ( '{00:00:00:00:00:00, 00:00:00:00:00:01, 00:00:00:00:00:02}'::macaddr[] );

In duckdb:

INSTALL
postgres_scanner;
    LOAD
postgres_scanner;

CALL postgres_attach('***);

SELECT * FROM test;
-- gives Error: INTERNAL Error: Unsupported type for ColumnDataCollection::GetCopyFunction

OS:

macOS

PostgreSQL Version:

15

DuckDB Version:

0.7.1

DuckDB Client:

CLI

Full Name:

Kamil Caglar

Affiliation:

Serenicity

Have you tried this on the latest master branch?

  • I agree

Have you tried the steps to reproduce? Do they include all relevant data and configuration? Does the issue you report still appear there?

  • I agree

would this work ? it be VARCHAR ...

Screenshot from 2023-04-19 14-13-08

this is my POC code output ...

Screenshot from 2023-04-19 14-06-23

Thanks for the report! This should be fixed now in #111.