Hi,

I'm struggling to write what seed at the time a simple function
like:
"CREATE FUNCTION foo() RETURNS IDONO as
$$
  select * from tbl;
  return (whatever that will give the *);
$$

up till now I got this far:

CREATE OR REPLACE FUNCTION select_business_types ()

RETURNS SETOF RECORD

AS

$body$

DECLARE

  rec RECORD;

-- fields business_type_id business_type_name

BEGIN

      FOR

            rec IN SELECT * FROM sv_bo_business_types

LOOP

            RETURN NEXT rec;

      END LOOP;

      RETURN;

END;

$body$

LANGUAGE 'plpgsql';

When I tried it from the shell I got a nasty error message about that I am not in an environment to receive a set ??? (can't see it now. Office restrictions).

Any idea?

--
Regards.

David Harel,

==================================

Home office +972 77 7657645
Cellular:   +972 54 4534502
Snail Mail: Amuka
            D.N Merom Hagalil
            13802
            Israel
Email:      harel...@ergolight-sw.com


Reply via email to