Live data from Hacker News

Postgres 11 – A First Look

craigkerstiens.com

71–80 of 193 posts

Re: Postgres 11 – A First Look

#71
post #3

> Now you can quit Postgres by simply typing quit or exit. Previously you had to use Ctrl + D or \q While this is good to help out beginners a bit, people should really learn Ctrl + D. It works practically everywhere and saves tons of time guessing/remembering and even typing the correct incantation for the program you want to exit.

What does Python do these days? I seem to remember it would catch common cases, but rather than quit, scold you and tell you how you should be doing it the other way, which seemed like the most Western European approach imaginable.

Python actually taught me to use Ctrl-D everywhere. Even though I was initially annoyed, I now understand the wisdom behind it :P

Re: Postgres 11 – A First Look

#72
post #70

Earlier quoted context omitted.

What does Python do these days? I seem to remember it would catch common cases, but rather than quit, scold you and tell you how you should be doing it the other way, which seemed like the most Western European approach imaginable.

Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> quit Use quit() or Ctrl-Z plus Return to exit >>> exit Use exit() or Ctrl-Z plus Return to exit

Oh, and in true Python fashion, the reason it works is not because the REPL is special-casing "quit". It's because when you evaluate an expression, the REPL prints out its repr. And `quit` is not a function, but rather a callable object with a custom repr:

   >>> type(quit)
   

   >>> repr(quit)
   'Use quit() or Ctrl-Z plus Return to exit'
and it's implemented like so:

   class Quitter(object):
       def __init__(self, name, eof):
           self.name = name
           self.eof = eof
       def __repr__(self):
           return 'Use %s() or %s to exit' % (self.name, self.eof)
       def __call__(self, code=None):
           # Shells like IDLE catch the SystemExit, but listen when their
           # stdin wrapper is closed.
           try:
               sys.stdin.close()
           except:
               pass
           raise SystemExit(code)
The same is done for "help", "copyright", "license" and "credits". REPL only does what its name says it does: read, evaluate, print, and loop.

So there's no magic. There's only Python.

Re: Postgres 11 – A First Look

#73

Great looking release. I’m really excited to see if the cstore extension can make good use of the parallelism improvements.

It looks like someone would need to do the things described in here: https://www.postgresql.org/message-id/flat/CA%2Bz6ocRFEnThhX...

There is an easy level "parallel safe" that would allow scans of different cstore partitions in a parallel query, and a harder-to-code "parallel aware" level that would allow parallel scans on one individual cstore_fdw relation. AFAIK no FDW has attempted parallel scans yet, but cstore looks like it may be an ideal case to be first?

Re: Postgres 11 – A First Look

#74

Earlier quoted context omitted.

What does Python do these days? I seem to remember it would catch common cases, but rather than quit, scold you and tell you how you should be doing it the other way, which seemed like the most Western European approach imaginable.

Python actually taught me to use Ctrl-D everywhere. Even though I was initially annoyed, I now understand the wisdom behind it :P

Except it's Ctrl+Z in Python for Windows, because that's the convention for EOF there.

Re: Postgres 11 – A First Look

#75

Earlier quoted context omitted.

I used both of them, but migrated to Postgres permanently a decade ago. Early on in my career, the biggest selling point for Mysql was the excellent web admin tool "phpMyAdmin" - it really helped get applications off the ground, since the core of most modern systems is the data model. Users could modify data, without your needing to create a UI for that use case. It conveniently used the same stack as the rest of the…

phpPgAdmin, started ~2002: http://phppgadmin.sourceforge.net/doku.php Basically a port of phpMyAdmin to postgres. I used it for several years around ~2003-5.. it's nearly identical.

I’m a regular Postgres user and fan, but cut my teeth on LAMP. I can’t speak to the current state of the projects, but phpMyAdmin was vastly superior to phpPgAdmin in the 2000s. phpMyAdmin remains the best DB GUI I’ve ever used. (Although I haven’t used any GUI in quite a few years.)

Re: Postgres 11 – A First Look

#76
post #37

A million things like this are why PostgreSQL is the only relational database I consider for, well, pretty much anything. Their approach of “build it safe and then make it fast” has been paying off in spades for a couple of decades now. Thanks for everything you do, psql maintainers!

100% naive question: why is mysql and their similars so popular then? Spanner and AWS Aurora base off of more mysql than postregsql from what I can tell. Why?

For the Spanner and Aurora: MySQL has a lot less features. For example on the query side it has been really limited compared to Postgres. Maybe this was a plus in this case. Less features make it essier to optimize.

Re: Postgres 11 – A First Look

#78
post #75

Earlier quoted context omitted.

phpPgAdmin, started ~2002: http://phppgadmin.sourceforge.net/doku.php Basically a port of phpMyAdmin to postgres. I used it for several years around ~2003-5.. it's nearly identical.

I’m a regular Postgres user and fan, but cut my teeth on LAMP. I can’t speak to the current state of the projects, but phpMyAdmin was vastly superior to phpPgAdmin in the 2000s. phpMyAdmin remains the best DB GUI I’ve ever used. (Although I haven’t used any GUI in quite a few years.)

[deleted]

Re: Postgres 11 – A First Look

#79
post #57

Earlier quoted context omitted.

If data is central to your business, in all likelihood it will be, and you care.

This is not a useful or constructive comment with its unstated argument of "only idiots use mysql". It's sarcastic flamewar bait.

No, its just the TL;DR version of a longer argument demonstrating MySQL's ability to lose, truncate and misinterpret data and ignore commands and thereby create false expectations (like, your data is validated and safe). PostgreSQL takes far greater care over data.

Re: Postgres 11 – A First Look

#80

I have a serious problem with Postgres. Every year at FOSDEM, some of the most technically interesting talks are about Postgres, and the room is always far too small so I can't get in.

The AW block is tiny but has so many great talks. All the queues end up merging with each other and jutting out into the foyer. Chaos!
Post reply on HN