Re: request for advise - Mailing list pgsql-general

From Stephan Szabo
Subject Re: request for advise
Date
Msg-id 20011105092518.D40831-100000@megazone23.bigpanda.com
Whole thread Raw
In response to Re: request for advise  ("Brian Hirt" <bhirt@mobygames.com>)
List pgsql-general
On Mon, 5 Nov 2001, Brian Hirt wrote:

> Stephan,
>
> Thanks for the reply.  The ON DELETE CASCADE does the opposite of what i
> want.  ie, you delete a primary key, and the foriegn key is deleted.  In my
> sample, you are deleting the foriegn key, not the primary key.
>
> The function i included in the original message does select into a variable
> and it does delete the list row, but if the list has a next_id and the
> function is called recursively, that's when i get a stmt_execsql error.

I meant that I think this line:
  SELECT delete_list_item(del_next_id);
needs to be something like
  SELECT INTO foo delete_list_item(del_next_id);
or maybe
  EXECUTE ''select delete_list_item(del_next_id)'';



pgsql-general by date:

Previous
From: "david morgan"
Date:
Subject: Re: Stored procedures
Next
From: "Eric Day"
Date:
Subject: Re: Stored procedures