Hacker Newsnew | past | comments | ask | show | jobs | submit | obsession's commentslogin

Now that we are on the topic of prepared statements, does anyone know how to do "SELECT * FROM WHERE x IN (list of values...)" properly? As far as I know, you cannot do it with prepared statements (as they can only be single values) and you are forced to roll your own escaping mechanism.


ANSI SQL and Postgres has had an array type since forever, MSSQL has table variables and types, other SQL databases have similar if not perfectly ANSI standard features (well probably not MySQL)


array of "?"s joined with ","


Considering how much time I already spend on Hacker News, I certainly wouldn't want any notifications popping up.


You should give the extension a whirl – you only get a few notifications per day. Perhaps you’ll even end up spending less time here. :-)


I believe it's your phone. The emojis are unicode after all. 😁


While doing single restore is fast enough, you will have problems doing multiple restores in a row as the background process needs to finish before another restore is possible (which may take several seconds when you are dealing with big databases).


Yes, Stellar will probably trip over this. Similarly, if the attacker can edit stellar.yaml, they probably can edit your .bashrc as well.

Im adding this to my TODO list.


MySQL support was definitely an afterthought and could probably be improved (maybe tracking the binary files directly?).


I have regularly used this with database that's nearing 1000 megabytes. I don't particularly mind slow snapshotting because my workflow is more about restoring database back to baseline than taking copies.

Please don't use this for production. It is not stable enough and you only end up with lost data.


Why not use a binary backup method? Faster to backup and restore.


Agreed. I've been successfully using mylvmbackup on 10gb+ databases for a few years now.

http://www.lenzg.net/mylvmbackup/


We use our own lvm solution at work, works great, we do something like pgsnap to swap to the snapshot or pgsnap master to work on the master. I'll check this out.


Interesting, I'll have to take a look.


Transaction is only reverted if the migration fails. Stellar helps you if your migration succeeds but does the wrong thing (deleting wrong column, missing WHERE in UPDATE statement).


I have heard lots of good about interval training. I remember Freakonomics podcast mentioning it being the most effective exercise versus time spent.


Economists recommending on exercise? Doesn't that raise a red flag to you?


The assets valued in economics allow me to make a judgement on how an economist is likely to view , say , dieting.

With that judgement in-mind, I may be more likely to follow the instruction or believe the idea the economist is saying rather than someone else like a drug-addled rockstar or an HIV infected addict.

The information the economist espouses, however, will surely be thought of at a lower priority than any information accrued from a medical doctor, dietician, or fitness instructor.

Considering the opinions of 'non-experts' does not raise flags for me, at least.


Human experience isn't divided up into silos. If economists notice something about biology from a different perspective, we should evaluate their findings, not immediately distrust or dismiss them.


Wow, this is really neat!


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: