Re: [SQL] Re: BSC

From: Kovacs Zoltan Sandor <tip(at)pc10(dot)radnoti-szeged(dot)sulinet(dot)hu>
To: Vladimir Terziev <vlady(at)school(dot)digsys(dot)bg>
Cc: pgsql-sql(at)postgreSQL(dot)org
Subject: Re: [SQL] Re: BSC
Date: 2000-02-16 15:58:45
Message-ID: Pine.LNX.4.05.10002161609320.19905-100000@pc10.radnoti-szeged.sulinet.hu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

> I want that function to return a list of values (as SQL returns rows of a
> table).
>
> How can I do this?
I am afraid you cannot. Only one row can be returned with the type OPAQUE.
Usually I write a "SELECT functionname(arguments);" query to solve this
problem. The other solution can be that you create a table (outside
your plpgsql function), then fill it out with INSERT statements inside
the plpgsql function. I did not manage to create a table inside the
function and I could not do a few important other things (e.g. CREATE
USER, sub-SELECT), but with a little help of additional sql language
functions was enough for my problem.

You can find a quite complicated implementation of partially ordered sets
on

ftp://pc10.radnoti-szeged.sulinet.hu/home/kovacsz/Linux/PostgreSQL/strukturak/

Here you can find po.sql, this is a basic English translation of the
Hungarian reszbenrendezes.sql file. The table "po" stores only the Hasse
diagram of the partially ordered set.

If you find it worthful, I am glad to contribute it. I hope it does not
work too slow. (Table "po" should be indexed.)

Zoltan

In response to

  • Re: BSC at 2000-02-16 14:06:12 from Vladimir Terziev

Browse pgsql-sql by date

  From Date Subject
Next Message Peter Eisentraut 2000-02-16 16:17:14 Re: [SQL] Re: BSC
Previous Message Tom Lane 2000-02-16 14:36:56 Re: [SQL] Auto increment field when updating?