CCI-MOC / hil

Hardware Isolation Layer, formerly Hardware as a Service
Apache License 2.0
24 stars 54 forks source link

`user` is a reserved keyword in postgres #956

Closed naved001 closed 6 years ago

naved001 commented 6 years ago

If we use database authentication, then we create a table called user which happens to be a reserved keyword in postgres.

hil=> select * from user;
 current_user 
--------------
 hil
(1 row)

to get the correct response, I have to do select * from "user";

I guess we should avoid using reserved keywords. Don't know how big of an issue this is, might not be an issue at all, but I think it's worth discussing if something like this could lead to db problems in future.

zenhack commented 6 years ago

SQLAlchemy is smart enough to manage this, which is how it hasn't been raised thus far. I noticed this a while back, but I don't think it's a problem. I certainly don't think it's worth a migration script.

naved001 commented 6 years ago

cool, I am gonna close this then.