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

Distinction between SelectStmt-Rule in SELECT (INTO) and VALUES clauses in others #1

Open
Tornadotuan opened this issue Mar 30, 2016 · 0 comments

Comments

@Tornadotuan
Copy link

@valgog
I noticed that your grammar fires the SelectStmt Rule during normal SELECT-Statements alright,
but unfortunately it fires on VALUES-clauses after INSERT statements as well. Therefore I believe, there could be more cases of this occurrence. Anyway, here is is an example statement where it occured.
This is the PostgreSQL-Code:

CREATE TABLE public.result (
    id      int,
    personname  character varying(10),
    age         integer,
    division    integer,
    projectid   character varying(10) NOT NULL,

    CONSTRAINT pk_personid  PRIMARY KEY (id)
)

WITH (
    OIDS=FALSE
);
ALTER TABLE public.result
  OWNER TO postgres;

 INSERT INTO result(
            id,personname, age, division, projectid)
    VALUES
    (1,'Max',   12,  5,   'AB11001'),
    (2,'Felix', 37,  8,   'XX78474'),
    (3,'Hanna', 22, 10,  'TET747'),
    (4,'Erik',  42,  1,  'HL4745');

And if I try to output SelectStmtContext´s childnode text it gives me:

VALUES(1,'Max',12,5,'AB11001'),(2,'Felix',37,8,'XX78474'),(3,'Hanna',22,10,'TET747'),(4,'Erik',42,1,'HL4745')

as return value. Is there a workaround or is it intended to work that way?

Kind regards
Tornado

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant