开发者

No getdate() function in EnterpriseDB PostgreSQL

开发者 https://www.devze.com 2022-12-31 09:24 出处:网络
Do you have any ide开发者_开发百科a on how to have a getdate() function in EnterpriseDB PostgreSQL? I upgraded to EDB-PSQL, and when I try to restore old data from the free PSQL, it returns error on s

Do you have any ide开发者_开发百科a on how to have a getdate() function in EnterpriseDB PostgreSQL? I upgraded to EDB-PSQL, and when I try to restore old data from the free PSQL, it returns error on some tables since there is no getdate().

I believe this should automatically be created upon creating new database? But it didn't. :( Only a now() function.

Can I create the function instead? Help!


If getdate() is like now() (as with SQL Server) you can simply say

create function public.getdate() returns timestamptz
       stable language sql as 'select now()';
0

精彩评论

暂无评论...
验证码 换一张
取 消