From: A. Kretschmer <andreas.kretschmer@schollglas.com>
To: pgsql-sql@postgresql.org
Subject: Re: plpgsql function question
Date: Wed, 4 Apr 2007 07:01:16 +0200
Message-ID: <20070404050116.GA27391@a-kretschmer.de> (raw)
In-Reply-To: <BAY131-W2E4CDE0440527D94EA604B0670@phx.gbl>
References: <BAY131-W2E4CDE0440527D94EA604B0670@phx.gbl>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: andreas.kretschmer@schollglas.com
Subject: Re: plpgsql function question
In-Reply-To: <20070404050116.GA27391@a-kretschmer.de>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox