GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Postgresql: TRUNCATE does not require TABLE · Issue #1583 · JSQLParser/JSqlParser

Postgresql: TRUNCATE does not require TABLE #1583

New issue
Copy link
New issue
Copy link
Closed
#1585
Closed
Postgresql: TRUNCATE does not require TABLE#1583
#1585
Copy link

Description

@d2a-raudenaerde
d2a-raudenaerde
opened on Jul 1, 2022
Issue body actions

I see this in scripts:

TRUNCATE myfancytable;

This is allowed by Postgresql:

https://www.postgresql.org/docs/current/sql-truncate.html

TRUNCATE [ TABLE ] [ ONLY ] name [ * ] [, ... ]
    [ RESTART IDENTITY | CONTINUE IDENTITY ] [ CASCADE | RESTRICT ]

However, the parser complains with:

net.sf.jsqlparser.parser.ParseException: Encountered unexpected token: "myfancytable" <S_IDENTIFIER>
    at line 3, column 10.

Was expecting:

    "TABLE"

Activity

  1. d2a-raudenaerde
    added 3 commits that reference this issue on Jul 6, 2022

    Closes JSQLParser#1583

    This issue will close once commit d119768 is merged into the 'master' branch.
    d119768

    Closes JSQLParser#1583, removed unnecessary local variable.

    This issue will close once commit bb78fd8 is merged into the 'master' branch.
    bb78fd8

    Closes JSQLParser#1583, proper support for deparsing.

    This issue will close once commit 4258702 is merged into the 'master' branch.
    4258702
  2. wumpz
    closed this as completedin #1585on Jul 14, 2022
  3. wumpz
    added a commit that references this issue on Jul 14, 2022

    Closes #1583:: Implement Postgresql optional TABLE in TRUNCATE (#1585)

    This issue will close once commit 2624826 is merged into the 'master' branch.
    2624826
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.