7 ms·
"Don't use CURRENT_TIME. Never" Honest question. If we should never use it, why have it in the first place as an option ? Is it some type of backward compatibi
by codegeek 7y ago
"Don't use CURRENT_TIME. Never"
Honest question. If we should never use it, why have it in the first place as an option ? Is it some type of backward compatibility issue ? This list is great btw. Why we shouldn't do something is a great way to learn stuff.
- monsieurbanana 7y agoThey give the reason on the previous entry (about timetz): > Why not? > Even the manual tells you it's only implemented for SQL compliance.
- deleted 7y ago[deleted]
- ape4 7y agoPostgres could give a warning message for this (and other no-no's)
- dgellow 7y agoI have the same question for things such as > Don't use psql -W or psql --password If I do a psql --help I see Connection options: -W, --password force password prompt (should happen automatically) Nothing tells me I shouldn’t use it.
- LeonM 7y agoThe documentation even states: > This option is never essential, since psql will automatically prompt for a password if the server demands password authentication. However, psql will waste a connection attempt finding out that the server wants a password. In some cases it is worth typing -W to avoid the extra connection attempt. So this is definitely confusing. What they probably mean is that you shouldn't do something like --password=mypassword, which will work but is obviously dangerous to do.
- ambentzen 7y agoDon't do that either, but -W will always ask for a password even when one is not required. Got a keylogger or someone watching over your shoulder, and they now have your password even if the server is not actually asking for it. All that insecurity just to, potentially, save a roundtrip to the server.
- eitland 7y ago> Got a keylogger or someone watching over your shoulder, and they now have your password even if the server is not actually asking for it. If this happens you've lost already, -W or not.
- yellowapple 7y agoWhy would I ever not want the server to require a password, though? Like, if your server ain't asking for a password at all, then why even bother with the keylogger?
- samus 7y ago
- Sahhaese 7y agoIt explains why, because it returns timetz which is only kept for compatibility with the SQL specification but is a bad way to store time.