News for hackers. Stuff that matters.
Re:PostgreSQL Exercises by tekkk on Wednesday December 06, 2017 @07:17AM (#15860521)
Very impressive! Works well, nice UI, informative.

After doing a couple exercises what I don't like is the naming convention. Something like "montlymaintenance" or "recommendedby" are just hard to read and type and I'd much rather use snake-case and/or shorter names. Eg. "monthly_maintenance" or "maintenance_per_month" or just "maintenance" if it's explicit enough that it's always per month.

Also to me using shorthands for ids is a bit hmm hmm I mean sure you write them a lot so it's useful to spare your fingers when typing queries but "facid" just seems wrong. Again maybe underscore? "fac_id" or even "facility_id".

Well that's at least my opinion. Also would it be a better practise to use "timestamptz" instead of "timestamp"? And FYI I had to zoom to 125% because the font was so small on my laptop.

Re:PostgreSQL Exercises by AlisdairO on Wednesday December 06, 2017 @10:32AM (#15861796)
Author here - thanks a lot for the feedback, it's appreciated.

You're right on the naming convention, it's very haphazard. I'll raise an issue on Github to revisit that - although it may take me quite a while to get to it as I have a two week old to look after right now :-).

Re:PostgreSQL Exercises by gigatexal on Wednesday December 06, 2017 @01:03PM (#15863286)
Kudos on the new budding programmer you got there. ;-)
Re:PostgreSQL Exercises by AlisdairO on Saturday December 09, 2017 @11:49PM (#15889984)
Thank you!
Re:PostgreSQL Exercises by JCSato on Wednesday December 06, 2017 @01:10PM (#15863363)
Congratulations!
Re:PostgreSQL Exercises by AlisdairO on Saturday December 09, 2017 @11:49PM (#15889983)
thanks :)
Re:PostgreSQL Exercises by pinouchon on Wednesday December 06, 2017 @07:48AM (#15860664)
Same thing, took me a while to understand that facid was indeed facility_id.

In my previous work, we used this to test candidates when their job involved writing SQL. Worked great.

Re:PostgreSQL Exercises by adwf on Wednesday December 06, 2017 @08:34AM (#15860917)
Timestamptz is better practice. Same size (8 bytes) on disk and saves you from headaches further down the line.