Thread

  1. functions with same name, different args

    Brett McCormickS <brett@abraxas.scene.com> — 1998-01-27T20:42:01Z

    I notice that all the functions with the same name but different args
    are actually sql statements which SELECT the result of the function
    call using a different (and unique) name..
    
    Wouldn't this cause slowdowns?  Shouldn't you be able to have a
    different name for your function in pgsql than in the shared library,
    without having to resort to such hacks?
    
    --brett
    
    
  2. Re: [HACKERS] functions with same name, different args

    Thomas Lockhart <lockhart@alumni.caltech.edu> — 1998-01-28T07:36:41Z

    > I notice that all the functions with the same name but different args
    > are actually sql statements which SELECT the result of the function
    > call using a different (and unique) name..
    >
    > Wouldn't this cause slowdowns?  Shouldn't you be able to have a
    > different name for your function in pgsql than in the shared library,
    > without having to resort to such hacks?
    
    Actually, we were pretty happy when Edmund Mergl found this mechanism.
    I've thought about making changes to allow compiled code to do the same
    thing, but we've had other more important issues to work on. Send
    patches if you want something different.
    
    
    
  3. Re: [HACKERS] functions with same name, different args

    Bruce Momjian <maillist@candle.pha.pa.us> — 1998-01-28T16:34:23Z

    > 
    > > I notice that all the functions with the same name but different args
    > > are actually sql statements which SELECT the result of the function
    > > call using a different (and unique) name..
    > >
    > > Wouldn't this cause slowdowns?  Shouldn't you be able to have a
    > > different name for your function in pgsql than in the shared library,
    > > without having to resort to such hacks?
    > 
    > Actually, we were pretty happy when Edmund Mergl found this mechanism.
    > I've thought about making changes to allow compiled code to do the same
    > thing, but we've had other more important issues to work on. Send
    > patches if you want something different.
    
    Actually the problem was that SQL functions can compare args and call
    the proper function, while C functions just get called without any arg
    comparisons.
    
    
    -- 
    Bruce Momjian
    maillist@candle.pha.pa.us