15

您对如何getdate()在 EnterpriseDB PostgreSQL 中使用函数有任何想法吗?我升级到 EDB-PSQL,当我尝试从免费 PSQL 恢复旧数据时,由于没有getdate().

我相信这应该在创建新数据库时自动创建?但它没有。:( 只有一个now()功能。

我可以改为创建函数吗?帮助!

4

1 回答 1

36

If getdate()is like now()(as with SQL Server) 你可以简单地说

create function public.getdate() returns timestamptz
       stable language sql as 'select now()';
于 2010-05-21T13:51:39.493 回答