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

Database table 'user' conflicts with PostgreSQL function #1146

Closed
johannkm opened this issue Oct 16, 2017 · 6 comments
Closed

Database table 'user' conflicts with PostgreSQL function #1146

johannkm opened this issue Oct 16, 2017 · 6 comments
Assignees

Comments

@johannkm
Copy link
Contributor

The sidewalk database has a table named user. As discussed in this StackOverflow post, user is a function keyword in PostgreSQL.

-- returns current database user
SELECT * FROM user;

-- returns the 'user' table
SELECT * FROM "user";

We may want to consider renaming this table since its current name leads to confusing behavior.

@jonfroehlich
Copy link
Member

Wow, oops. That sucks. And I can't believe this wasn't identified earlier. Yes, we should likely rename this table SidewalkUser or something. Who's the SQL expert in group currently? @misaugstad @Manaswis @maddalihanumateja?

@manaswisaha
Copy link
Member

Yes, this was known. However, we always wrote queries like sidewalk.user to resolve the conflict. Renaming it isn't tough. However, we'd also have to go into the code to change all the raw queries to the new name and also change the name in the data model code. Again not difficult.

However, I would say its low priority for immediate purposes. Since we are in the middle of data collection by turkers and (soon) volunteers, we should take this up after we are done with the collection of data we need for the paper. We should concentrate on things that are absolutely necessary for the paper. We could apply the NextCity tag to this issue. Thoughts?

@jonfroehlich
Copy link
Member

NextCity tag for sure. Agree that it's low priority as it isn't really negatively affecting anything.

@misaugstad
Copy link
Member

Possible future name for this table: sidewalk_user

@jonfroehlich
Copy link
Member

jonfroehlich commented Apr 28, 2018 via email

@misaugstad
Copy link
Member

closing via #1329

@ghost ghost removed the pull-request-submitted label Nov 27, 2018
@misaugstad misaugstad mentioned this issue Nov 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants