Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[psqldef] CRETE TABLE with LIKE fails with syntax error #494

Open
kota65535 opened this issue Mar 7, 2024 · 0 comments
Open

[psqldef] CRETE TABLE with LIKE fails with syntax error #494

kota65535 opened this issue Mar 7, 2024 · 0 comments
Labels
psqldef Bugs or feature requests related to PostgreSQL

Comments

@kota65535
Copy link

Platform

  • OS: macOS
  • RDBMS: PostgreSQL
  • Version: v0.16.15

--export output

CREATE TABLE "public"."task" (
    "id" serial NOT NULL,
    "title" character varying(256),
    PRIMARY KEY ("id")
);

CREATE TABLE "public"."task_log" (
    "operation" character(1) NOT NULL,
    "id" integer NOT NULL,
    "title" character varying(256)
);

Input SQL

CREATE TABLE task
(
  id    serial,
  title varchar(256),
  PRIMARY KEY (id)
);

CREATE TABLE task_log
(
  operation char(1) NOT NULL,
  LIKE task EXCLUDING CONSTRAINTS
);

Current output

found syntax error when parsing DDL "CREATE TABLE task_log
(
  operation char(1) NOT NULL,
  LIKE task EXCLUDING CONSTRAINTS
)": syntax error at position 61 near 'like'

Expected output

No syntax error.

@k0kubun k0kubun added the psqldef Bugs or feature requests related to PostgreSQL label Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
psqldef Bugs or feature requests related to PostgreSQL
Projects
None yet
Development

No branches or pull requests

2 participants