Re: Migration from DB2 to PostgreSQL-TIMESTAMP(arg1,arg1)
От | sachin kotwal |
---|---|
Тема | Re: Migration from DB2 to PostgreSQL-TIMESTAMP(arg1,arg1) |
Дата | |
Msg-id | 1372393853411-5761628.post@n5.nabble.com обсуждение исходный текст |
Ответ на | Re: Migration from DB2 to PostgreSQL-TIMESTAMP(arg1,arg1) (Daniel Cristian Cruz <danielcristian@gmail.com>) |
Список | pgsql-general |
>I've done something weird: >CREATE OR REPLACE FUNCTION "timestamp"(_date date, _time time) RETURNS timestamp AS $$ >SELECT _date + _time; >$$ LANGUAGE sql; >SELECT "timestamp"('2013-01-01'::date, '12:00:00'::time); Good one. function with above definition is already present in pg_catalog. so no need to define new function.(3 rd row) \df timestamp List of functions Schema | Name | Result data type | Argument data types | Type ------------+-----------+-----------------------------+--------------------------------------+-------- pg_catalog | timestamp | timestamp without time zone | abstime | normal pg_catalog | timestamp | timestamp without time zone | date | normal pg_catalog | timestamp | timestamp without time zone | date, time without time zone | normal pg_catalog | timestamp | timestamp without time zone | timestamp without time zone, integer | normal pg_catalog | timestamp | timestamp without time zone | timestamp with time zone | normal (5 rows) But why this function requires "" to get execute. -- View this message in context: http://postgresql.1045698.n5.nabble.com/Migration-from-DB2-to-PostgreSQL-TIMESTAMP-arg1-arg1-tp5761389p5761628.html Sent from the PostgreSQL - general mailing list archive at Nabble.com.
В списке pgsql-general по дате отправления: