From: | "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: plpgsql function question |
Date: | 2007-04-04 05:01:16 |
Message-ID: | 20070404050116.GA27391@a-kretschmer.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
am Tue, dem 03.04.2007, um 13:19:26 -0700 mailte Karthikeyan Sundaram folgendes:
> Thank you very much. It works. I am not doing any insert or update hence I
> cannot create a trigger. But my another question is
>
> How will I pass the values to Foo parameters.
>
> I mean
>
> I want to pass
> i = 1
> j = 'God'
> K = now()
>
> which all the three will be used to check in the function
> should I say
>
> select a_func(1,'good',now());
Because your function expects one parameter of your new type, you have
to CAST your data into this type:
test=# select * from my_a((1, 'foo', current_date)::a);
my_a
------
1
(1 row)
[ dumb fullquote deleted ]
Andreas
--
Andreas Kretschmer
Kontakt: Heynitz: 035242/47150, D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID: 0x3FFF606C, privat 0x7F4584DA http://wwwkeys.de.pgp.net
From | Date | Subject | |
---|---|---|---|
Next Message | Paul Lambert | 2007-04-04 06:19:31 | Moving a simple function to pl/pgsql (Novice question) |
Previous Message | Tom Lane | 2007-04-04 00:24:12 | Re: [SQL] exception handling in postgres plpgsql |