Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Would be really nice if...

Re: Would be really nice if...

From: Haximus <e_at_t.me>
Date: Thu, 24 Feb 2005 20:44:05 GMT
Message-ID: <421E3C1E.1080708@t.me>


Ed Prochak wrote:
> but when you present the reciept for 13 donuts and the boss only saw
> 12, you'll be waiting a long time for that reimbursement check.

You'd lose sleep over compensation for a donut? ;)

> Just admit it. select * is not safe.
>
> Does no one practice defensive programming anymore?
>
> One guideline I've tried to follow in my development practice:
> It's not how well it work when it works that's important,
> but how well it works when it doesn't work that's important.
>
> the "select * exclude" syntax doesn't buy you any protection over the
> "select *" but an explicit list Always gets the data it expects.
> Proponents of "select * exclude" are arguing for saving a little
> programmer time now while leaving a big window for future errors.

Like anything there are advantages and disadvantages, if the perception is that it's a disadvantage -- don't use it.

I'm just reflecting on other types of systems for filtering and how they handle inclusion/exclusion and specifying sets, for example Apache access control allows you to specify access with "allow from all, deny from xxx" or conversely "deny from all, allow from xxx" type functionality for describing sets. It basically the same concept.

Take for example queries where you want everything except a tiny subset,   so logically you create your query based on what you DON'T want and select the remainder. By Fitzy's logic we should write queries that specify everything we do want, even if that means a huge cumbersome query to account for everything, instead of a simple elegant query to select everything except what you don't want. Of course, nobody in their right creates queries that way.

Now just extend that logic to selecting column sets. Received on Thu Feb 24 2005 - 14:44:05 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US