Neil Conway wrote:
> On Mon, 2004-11-01 at 15:47, Bruce Momjian wrote:
> > Oh, I didn't realize they had the dot in there.  Let me add "-1". 
> > Thanks.  Attached.
> 
> I wonder if it wouldn't be cleaner to #define SIZE_OF_EXE or similar
> that includes the "-1". Alternatively, we could just use strlen(): I
> believe a decent compiler should be able to evaluate strlen("str") at
> compile-time.

I prefer strlen() myself but Tom prefers sizeof().  In the long run I
would like to create a 'sizeof' that doesn't include the null as a
global define that we can use for any hard-coded string.  I have not
thought of a name yet and it would be for 8.1.  I count perhaps 84
places it could be used:

        $ rgrepc 'sizeof.*- \?1'|wc -l
              84

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  [EMAIL PROTECTED]               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
      joining column's datatypes do not match

Reply via email to