Hi list,
I am encountering a very strange error and I am scratching my head and got 
no idea what is going on. 

class Line(Base):
    __tablename__ = 'lines'
    id = Column(Integer, Sequence('line_id_seq'), primary_key=True)

    start = Column(Geometry('POINT'), nullable=False, *index=False*)
    *end* = Column(Geometry('POINT'), nullable=False, *index=False*)


On creating this table, it threw a strange error:

*sqlalchemy.exc.ProgrammingError: (ProgrammingError) syntax error at or 
near "end"*
*LINE 1: ...INDEX "idx_lines_end" ON "public"."lines" USING GIST (end)*
*                                                                   ^*
* 'CREATE INDEX "idx_lines_end" ON "public"."lines" USING GIST (end)' {}*


The created table is :

CREATE TABLE lines
(
  id integer NOT NULL,
  start geometry(Point) NOT NULL,
  *"end"* geometry(Point) NOT NULL,
  CONSTRAINT lines_pkey PRIMARY KEY (id)
)
WITH (
  OIDS=FALSE
);
ALTER TABLE lines
  OWNER TO postgres;

CREATE INDEX idx_lines_start
  ON lines
  USING gist
  (start);

It is weird there are quotes surrounding the word *end* , and although I 
have specified *index=False*, for some reason indexs are still created 
automatically.
Anything other than *end*, such as *end_, end1 *worked perfectly.
Is end a keyword for *postgis* or *geoalchemy2*?

Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to