Skip to content

Done assignment, advanced level #31

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Core966
Copy link

@Core966 Core966 commented Feb 27, 2014

Finished up to advanced level.
One thing that I do not understand about postgres database is why password not needed? As I created my db with the postgres (default) user which is password protected and still the database got created. Why is that?
Thanks in advance!

network.shows.each do |show|
puts show
end
network.shows.each do |show|
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you're going to do something inside of a loop, I prefer to limit the results, and then act on them.

In this case, you just want the Shows, right? So, why not query for the shows, instead of the network? How might that look?

@jwo
Copy link
Member

jwo commented Mar 3, 2014

As I created my db with the postgres (default) user which is password protected and still the database got created. Why is that?

With postgres installed, it will give access to your user account, without a password. That's how you need to use your username, but not a password.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants