Q:

postgres database column name not recognized

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.

A:

Change your column name from date to another such as date because date is a reserved word. You can easily achieve this by using alter commmand. Using alter command dosen't take too much time because alter command only affects the table structure reather than the data of the table. alter command have no concern with the data of the table.

