本文介绍了评论时区和区间类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近有一些关于将时区附加到

的时间戳以及其他一些关于在区间类型中包含''day''部分

的讨论。这两个功能相互影响,因为如果你在时间戳上添加一个日期,结果可能取决于时间戳应该是什么时区

使用与时间戳相关的时间区域比使用时区GUC或

固定时区UTC更有意义。


---------------------------(广播结束)---------------- -----------

提示9:如果您的

加入列的数据类型,计划程序将忽略您选择索引扫描的愿望不匹配

Recently there has been some discussion about attaching a timezone to
a timestamp and some other discussion about including a ''day'' part
in the interval type. These two features impact each other, since
if you add a ''day'' to a timestamp the result can depend on what timezone
the timestamp is supposed to be in. It probably makes more sense to use
a timezone associated with the timestamp than say the timezone GUC or the
fixed timezone UTC.

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column''s datatypes do not match

推荐答案




----- BEGIN PGP SIGNATURE -----

版本:GnuPG v1.0.6(GNU / Linux)

评论:有关信息请参阅


iD8DBQFBe5k4Y5Twig3Ge + YRAuYBAKCmRpYp1RbnZdxnMGOups 17rBL6XgCguK63

/ pyjsZa3JI42dKZSQC7BstU =

= 0Yqk

----- END PGP SIGNATURE -----



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQFBe5k4Y5Twig3Ge+YRAuYBAKCmRpYp1RbnZdxnMGOups 17rBL6XgCguK63
/pyjsZa3JI42dKZSQC7BstU=
=0Yqk
-----END PGP SIGNATURE-----





使用OID'这是一个好主意,但我认为必须维护一个已知的OID映射时间区域的规范列表,并附带

PostgreSQL核心。


如果在initdb时生成OID,那么

OID'在使用不同版本的
的数据库之间会有很大差异。
PostgreSQL。这反过来会对数据产生一些负面影响

交换。


问候,

Thomas Hallgren

---------------------------(广播结束)---------------- -----------

提示5:您查看了我们广泛的常见问题解答吗?





Using OID''s is a good idea, but I think a canonical list of known
timezone to OID mappings must be maintained and shipped with the
PostgreSQL core.

If OID''s are generated at initdb time, there''s a great risk that the
OID''s will differ between databases using different versions of
PostgreSQL. That in turn will have some negative implications for data
exchange.

Regards,
Thomas Hallgren
---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html





如何有一个已知时区的规范列表如果每个

操作系统都有它自己的列表。也许你可以提供一个基本列表,

但是你必须允许人们自己制作。

如果在initdb时生成OID',那么''使用不同版本的PostgreSQL,数据库之间的差异很大。这反过来可能会对数据交换产生一些负面影响。


我对此表示怀疑,OID永远不会输出。类型,触发器,函数

等都有OID,这些OID在任何地方都不会出现在任何输出中,所以为什么

应该这些。由于PostgreSQL不支持你在不同安装之间复制原始数据文件的任何部分,更不用说
不同的版本,我认为数据交换的问题是不是

问题。


祝你有愉快的一天,

-

Martijn van Oosterhout < KL ***** @ svana.org> 专利。 ñ。天才是5%的灵感和95%的汗水。专利是一种工具,用于完成5%的工作,然后坐在那里等待某人其他95%,这样你就可以起诉他们。



How can there be a "canonical list of known timezones" if every
operating system has it''s own list. Maybe you can provide a base list,
but you have to allow for people to make their own.
If OID''s are generated at initdb time, there''s a great risk that the
OID''s will differ between databases using different versions of
PostgreSQL. That in turn might have some negative implications for data
exchange.
I doubt it, the OIDs would never be output. Types, triggers, functions
etc all have OIDs that never appear in any output anywhere, so why
should these. Since PostgreSQL doesn''t support you to copying any part
of the raw data files between different installations, let alone
different versions, I think the issues with data exchange are not a
problem.

Have a nice day,
--
Martijn van Oosterhout <kl*****@svana.org> http://svana.org/kleptog/ Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
tool for doing 5% of the work and then sitting around waiting for someone
else to do the other 95% so you can sue them.




----- BEGIN PGP SIGNATURE -----

版本:GnuPG v1.0.6(GNU / Linux)

评论:有关信息请参阅


iD8DBQFBf2OzY5Twig3Ge + YRAscdAJ4plhHOrahW / HaEJ2XRZD / W7r8 + tQCgtzYp

2OPYF70KXLQhmlzcX4yNYUA =

= e / XA

----- END PGP SIGNATURE- ----



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQFBf2OzY5Twig3Ge+YRAscdAJ4plhHOrahW/HaEJ2XRZD/W7r8+tQCgtzYp
2OPYF70KXLQhmlzcX4yNYUA=
=e/XA
-----END PGP SIGNATURE-----


这篇关于评论时区和区间类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

11-03 09:40