I'm using postgresql database, in a table, I have a column named date. The problem occurs when I try making some operations with this column (date).
For example:
create index tg_index ON table_replay using btree(date);
here is my error:
ERROR: column "date" does not exist
****** Error ******
ERROR: column "date" does not exist SQL state: 42703
PS: I cannot change this column name because this is a big database so i need many years to perform any change. Thanks for understanding.
dateis a reserved word (type name) in SQL. Use double quotes if you insist on using at as a column name :USING BTREE("date" )(and tell the person who designed the DB thatdateis a bad name) BTW: if you can create an index, you can probably rename the column, too