1

I want to name my tables in postgresql as 'fields' and 'types', to be used in a rails 4 (ActiveRecord) app - are these kinds of common words acceptable as names, or will they clash with rails or postgresql reserved names?

1 Answer 1

2

This is a possible duplicate of: Reserved names with ActiveRecord models

Here is additional info regarding reserved words in postgres: http://www.postgresql.org/docs/8.1/static/sql-keywords-appendix.html

Ultimately, the answer is no, 'fields' is not a reserved name for rails or postgres; however, 'types' may cause some problems. Type is an ActionView method per the following: http://api.rubyonrails.org/classes/ActionView/Template.html#method-i-type

Sign up to request clarification or add additional context in comments.

2 Comments

I noticed in the rails reserved link in the other SO thread you linked, that the word type is listed as reserved. If I have a types table and use type in the singular across rails, could that cause any trouble?
My fault. Yes, you are right. I'll revise my answer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.