Re: plpgsql-function with timestamp

From: Andreas Kretschmer <akretschmer(at)spamfence(dot)net>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: plpgsql-function with timestamp
Date: 2006-02-22 17:09:54
Message-ID: 20060222170954.GA10231@KanotixBox
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Christian Stalp <christian(dot)stalp(at)gmx(dot)de> schrieb:
[ problem ]

Which version?

test=# create table foo (ts timestamp);
CREATE TABLE
test=# insert into foo values ('1999-01-08 04:05:06');
INSERT 0 1
test=# CREATE OR REPLACE FUNCTION neue_auktion (TIMESTAMP) returns text
AS $$ DECLARE my_startzeit ALIAS FOR $1; BEGIN INSERT INTO foo (ts)
VALUES ( my_startzeit); RETURN 'OK'; END; $$ LANGUAGE plpgsql;
CREATE FUNCTION
test=# SELECT neue_auktion ('1999-01-08 04:05:06');
neue_auktion
--------------
OK
(1 row)

test=# select version();
version
--------------------------------------------------------------------------------------------------------------
PostgreSQL 8.1.2 on i486-pc-linux-gnu, compiled by GCC cc (GCC) 4.0.3 20060104 (prerelease) (Debian 4.0.2-6)
(1 row)

Btw.: we have a german mailinglist ;-)

HTH, Andreas
--
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect. (Linus Torvalds)
"If I was god, I would recompile penguin with --enable-fly." (unknow)
Kaufbach, Saxony, Germany, Europe. N 51.05082°, E 13.56889°

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Christian Stalp 2006-02-22 18:22:49 Re: plpgsql-function with timestamp
Previous Message A. Kretschmer 2006-02-22 15:05:21 Re: drop index