Re: psql on Mac
Ozan Kahramanogullari <[email protected]>
| Newsgroups | gmane.comp.db.postgresql.novice |
|---|---|
| Message-ID | <CAPiqqLkrVthOe3xT4zLAyfx--w5CZ4H-U9jrdeqKm3Lir62GEA@mail.gmail.com> |
Thank you! > XXX:~ ozan$ nslookup localhost > > Server: 192.168.206.99 > > Address: 192.168.206.99#53 > > Name: localhost.unitn.it > > Address: 10.31.101.168 > > Well, *that's* screwed up. You should complain to your local network > manager about it. "localhost" ought to resolve to 127.0.0.1, > or ::1/128 in IPv6-land, not something else. It's possible that > 10.31.101.168 is your Mac's address, but that still doesn't make this > correct behavior. So for the moment, don't use "-h localhost". > Before I go and break b.., can you guess the reason for this? If you want the connection to go to the database named "lecture", > you need to say "psql lecture", or some more verbose form of that > such as "psql -h 127.0.0.1 -U ozan lecture". This seems to work for accessing the database on the command line. The Python code seems to work as well. Though, I must admit that I am still pretty much confused about what is going on. So, the problem seems to be the localhost that is somehow messed up. Is that right? Cheers, Ozan