Re: plpgsql-function with timestamp - Mailing list pgsql-novice

From Andreas Kretschmer
Subject Re: plpgsql-function with timestamp
Date
Msg-id 20060222170954.GA10231@KanotixBox
Whole thread Raw
In response to plpgsql-function with timestamp  ("Christian Stalp" <christian.stalp@gmx.de>)
List pgsql-novice
Christian Stalp <christian.stalp@gmx.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°

pgsql-novice by date:

Previous
From: "A. Kretschmer"
Date:
Subject: Re: drop index
Next
From: "Christian Stalp"
Date:
Subject: Re: plpgsql-function with timestamp