PL/pgSQL
От | Heni Lolov |
---|---|
Тема | PL/pgSQL |
Дата | |
Msg-id | 20020726135204.20789.qmail@web21007.mail.yahoo.com обсуждение исходный текст |
Ответ на | Re: Maximum Number of Tables in a database (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-admin |
Hi there I have a problem that I can not solve. So is there any way to return a couple of rows from a PL/pgSQL function. I need this because I have to execute a query with undefined depth of subqueryes (not more than 10). The searched table represents a tree. And I have to find all sub branches og a given branch. here is the table: CREATE SEQUENCE grp_id_seq; CREATE TABLE grp ( id INT PRIMARY KEY NOT NULL DEFAULT nextval('grp_id_seq'), name VARCHAR NOT NULL, info VARCHAR, type_id INT DEFAULT NULL REFERENCES grp_types(id), mastergrp_id INT REFERENCES grp(id) ); I need it to use it in a query like this: SELECT foo FROM footable WHERE groups IN sub_grp(some_grp_id); Any idea how to make it? Thanks in advance! Hal __________________________________________________ Do You Yahoo!? Yahoo! Health - Feel better, live better http://health.yahoo.com
В списке pgsql-admin по дате отправления: