Better HN
topnewbestaskshowjobs
Log inSign up

monkeydata

3 karma · joined Jan 17, 2019 (7y ago) · 11 submissions

Submissions

comment 4y ago · link · parent

nil

comment 5y ago · link · parent

amavis

All email is perl.

comment 5y ago · link · parent

in postgres you can do

SELECT a.this, b.that FROM a, b WHERE a.id = b.a_id;

it just implies SELECT ... FROM a LEFT JOIN b ON(true) WHERE ...

comment 5y ago · link · parent

it only matters when you quote the column name. SELECT a."This_Col" = b.this_col FROM table a JOIN "Table" b;

comment 5y ago · link · parent

rfc2822

comment 6y ago · link · parent

sql is the language of the gods

comment 6y ago · link · parent

two things 1) leading commas in SQL 2) RAISE an EXCEPTION or RETURN --no more `else` statements in code

SELECT this , that , something FROM table

takes a while to get used to

comment 7y ago · link · parent

yeh, it is quite a bit cheaper. However, heroku is more aggressive in throttling the cheap stuff. I still use it for ci though. AWS simply offers more granular control and a more robust infrastructure. If you dig down into it, you'll see heroku is actually running on AWS.

comment 7y ago · link · parent

cakePHP on EC2 + postgres on RDS is nice. toss in some Redis caching and feed it traffic from a load balancer. you can get a lot done with very little effort.

comment 7y ago · link · parent

to be productive, you have to minimize the need to rtfm, but you should also be cognizant of any new implementations -- a refresher may sometimes provide a better way.

I recently stumbled on the postgres method jsonb_insert(jsonb,path,value) which is much more elegant than jsonb_set(jsonb,path,jsonb||value) when you just want to add a thing to some json array inside an object.

I hadn't really looked at the docs much since 9.x, I deal with jsonb everyday, so I had what I needed memorized. But despite keeping my installs updated, I had been doing it the hard way for way too long.

comment 7y ago · link · parent

yeh... but, we sorta live and die by the evidence. We can't just blindly assume OP is correct. Thankfully, OP knew that and saved us the hassle or typing it ourselves.