
Find me on IRC: #postgresql or #freebsd on https://teapawt.net/t.co/CawJpOqZYw (he/him)
Joined February 2019
- Tweets305
- Following22
- Followers159
- Likes8
Gotta love "no functional change" commits that actually cause 100% failure in an important use case
1
4
SELECT 'Happy new year '||name FROM pg_timezone_names WHERE EXTRACT(year FROM now() AT TIME ZONE name) = 2021;
Pop quiz:
posix_spawnp(&pid, "foo", ... envp) invokes a program "foo" using a search of the PATH env var. Should it use the value of PATH from the calling process' env, or the value from envp which will become the child's env? (spec at pubs.opengroup.org/onlinepub… )
67%Caller's environ
33%Value from envp
12 votes • Final resultsA challenge: what SQL statement contains the longest possible sequence of consecutive keywords? (My best so far has 13 consecutive keywords)
Today's fun fact: "Tory" comes from the Irish word for a bandit. Any relevance to modern politics is left as an exercise for the reader
PSA: When asking for help, show YOUR OWN code / problem description, don't just point to a random forum post and say "I'm having the same problem as this". It makes it impossible to see what simple errors you may have made, or differences between your issue and the post
Wow, @jimmy_wales blocked me, for pointing out the transparency problems with his social media site.
8
Another SQL style tip: always a space before the paren in constructs like "OVER (", "FILTER (", etc. Avoid making things look like function calls when they're not.
SQL style tip: treat "SELECT DISTINCT" as one keyword that happens to have a space in it.
Never put a newline before DISTINCT, and never put an open paren directly after it. When using COUNT(DISTINCT ...), if you absolutely need a paren, then always have a space before it.
PSA: The error message is the part that starts with "ERROR:". Any DETAIL: or HINT: that follows may be informative, but it is NOT the error message. ALWAYS READ THE ERROR MESSAGE.
So now I'm curious: to the two people who voted to keep postfix operators in my poll: why? Do you have a use case or an example of existing usage?
Quick poll: should @PostgreSQL remove support for postfix operators in expressions, or keep them? Their existence makes parsing a lot harder.
94%Yes, remove them
6%No, keep them
31 votes • Final resultsToday's #PostgreSQL optimization tip: when dealing with queries over many tables, consider increasing from_collapse_limit and join_collapse_limit. postgresql.org/docs/current/…
Github language statistics never cease to baffle me. Hundreds of lines of SQL and a 3-line .dir-locals.el, and it says the repo is 100% Emacs-Lisp.
2
1