Subject: Postgres syntax question

From: [email-masked] (ananth srinivasan)
Date: Tue, 20 Jul 93 16:18:49 -0700

I have a question about Postquel syntax that I need help with.

I have 4 classes say A, B, C, D.

I want to define a C function F that takes several tuples from A, B,
and C, as arguments and returns a set of values.

[Aside: Can I define such a function in the first place?]

Now I want to use the set of values that are returned by the function
to update tuples in D. Specifically, attribute D.a needs updating
using the set of values that the function returns (one tuple update
for each value from the set).

Question:

Does a function call F(A,B,C) in this context make sense?

What should the replace command say?

replace D (a=F(A,B,C)
where ??????)

Any help is appreciated. Thanks.

--Ananth

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Ananth Srinivasan                     Phone: +64-9-373-7999 ext. 5328
Dept of MSIS                          Dept:  +64-9-373-7999 ext. 7154
University of Auckland                Fax:   +64-9-373-7430
Private Bag 92019
Auckland, New Zealand
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

---

From: "Caroline M. Paxson" <[email-masked]>
Date: Tue, 20 Jul 1993 17:42:53 -0700

>and C, as arguments and returns a set of values.

This is a reasonable thing to want to do, but you can't do it in Postgres
(yet).  C functions must return single things, not sets.  We are
considering implementing this in the near future, but sorry, no promises.

Carol Paxson
Postgres Group, UC Berkeley