postgres_scanner icon indicating copy to clipboard operation
postgres_scanner copied to clipboard

syntax error at or near "FORMAT"

Open yulk opened this issue 7 months ago • 0 comments

What happens?

src/postgres_scanner.cpp

lstate.sql = StringUtil::Format(
	    R"(
COPY (SELECT %s FROM %s.%s %s) TO STDOUT (FORMAT binary);
)",

in postgresql 9.2 need to write as:

COPY "tablename" TO STDOUT WITH (FORMAT "binary")

you should quote it.

https://www.postgresql.org/message-id/1309878337-sup-685%40alvh.no-ip.org

To Reproduce

COPY "tablename" TO STDOUT WITH (FORMAT "binary")

OS:

windows

PostgreSQL Version:

9.2

DuckDB Version:

1.0

DuckDB Client:

client

Full Name:

dreamrise

Affiliation:

None

Have you tried this on the latest main branch?

  • [X] 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?

  • [X] I agree

yulk avatar Jul 10 '24 09:07 yulk