Is there a reason to keep SQL functions now that we have PL/PgSQL,
except for backward compatibility?  What do SQL functions do that can
not be done in PLpgSQL?  Are they faster?

-- 
  Bruce Momjian                        |  http://www.op.net/~candle
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

Tue, 23 May 2000 21:53:02 -0400 (EDT)
Bruce Momjian <pgman@candle.pha.pa.us>
Plpsql vs. SQL functions
On Tue, 23 May 2000, Bruce Momjian wrote:

> Is there a reason to keep SQL functions now that we have PL/PgSQL,
> except for backward compatibility?  What do SQL functions do that can
> not be done in PLpgSQL?  Are they faster?

SQL function can return a new tuple. To my knowledge, PLpgSQL cannot.
I hope someone can prove me wrong ;)

-alex


Tue, 23 May 2000 22:25:02 -0400 (EDT)
Alex Pilosov <alex@pilosoft.com>
Re: Plpsql vs. SQL functions
> On Tue, 23 May 2000, Bruce Momjian wrote:
> 
> > Is there a reason to keep SQL functions now that we have PL/PgSQL,
> > except for backward compatibility?  What do SQL functions do that can
> > not be done in PLpgSQL?  Are they faster?
> 
> SQL function can return a new tuple. To my knowledge, PLpgSQL cannot.
> I hope someone can prove me wrong ;)

Maybe.  I know SQL can return multiple tuples.

-- 
  Bruce Momjian                        |  http://www.op.net/~candle
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

Tue, 23 May 2000 22:30:53 -0400 (EDT)
Bruce Momjian <pgman@candle.pha.pa.us>
Re: Plpsql vs. SQL functions