NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
Better is relative... (Score:1)
It took me a bit to realise how it was that you had a choice in the matter. Like Purdy I just wondered why you didn't use un-quoted (normal) SQL.
But of course you're using a view and you're talking about how to name columns in that view in a meaningful way. It's clear once I made that minor mental twist.
In my opinion don't use the latter. Anything that suggests you can use dots, as you do with normal selects from tables, will probably have people making the mistake of deleting or omitting the quotes and wondering why it doesn't work.
If that leaves only double underscore then I guess you'll use that. lachoy said something about fonts and editors which should be considered, but most editors I use for code make two underscores look like two underscores, or one very long one, which is much the same thing.
- jarichReply to This
Re:Better is relative... (Score:2)
But really, rather than weird characters or double underscores, if you have to have something why not a prefix like 'NP_' for 'nonprimary' or something? Or maybe you can distinguish by using uppercase?
Re:Better is relative... (Score:2)
I had thought about uppercase (studly caps) too, but then Theory reminded me that most databases are case-insensitive. Not only is the case not meaningful, it's not guaranteed to be displayed in any consistent way.
Re:Better is relative... (Score:1)