Re: how do the pro's do this? (still a newbie)

From: "Simeo Reig" <simreig(at)terra(dot)es>
To: <gunnar(at)gunix(dot)mine(dot)nu>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: how do the pro's do this? (still a newbie)
Date: 2001-10-30 14:36:42
Message-ID: 004201c16150$4b3b25d0$0a00a8c0@win2000
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

try this
http://www.brasileiro.net/postgres/plpgsql/
--

Simeó Reig

----- Original Message -----
From: "Gunnar Lindholm" <gunnar(at)gunix(dot)mine(dot)nu>
To: <pgsql-general(at)postgresql(dot)org>
Sent: Tuesday, October 30, 2001 1:11 PM
Subject: [GENERAL] how do the pro's do this? (still a newbie)

> Hello.
> As a newbie in the stored procedure programming area I would like to know
how
> you could do the following with a function in plpgsql.
> (It's a theoretical question, so do not suggest changing the tables :-)
> I have
>
> table A :
> id integer primary key default nextval('something'),
> dohA integer
>
> table B:
> rid integer references A,
> dohB integer
>
> and I wish to create a function "foo( dohA, dohB)" that inserts the values
> dohA and dohB into the proper tables A and B and the reference in table B
> should of course be connected to the PK in table A. You understand what I
> mean, right?
>
> Now, how do I write
>
> function foo(integer, integer)
> begin work
> ... please fill this space with some code.... !!!!
> commit
>
> Is there some realy good tutorial on this, please tell me so?
> TIA, Gunnar.
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Stuart Grimshaw 2001-10-30 15:16:53 INNER JOINS in 7.0.3 & 7.1.3
Previous Message Tod McQuillin 2001-10-30 14:01:46 Re: how do the pro's do this? (still a newbie)