Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/postgresql/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
用于在postgresql中存储格式为yyyy mm dd hh:mm:ss的日期的数据类型_Postgresql - Fatal编程技术网

用于在postgresql中存储格式为yyyy mm dd hh:mm:ss的日期的数据类型

用于在postgresql中存储格式为yyyy mm dd hh:mm:ss的日期的数据类型,postgresql,Postgresql,我不知道分配给yyyy mm dd hh:mm:ss格式数据的数据类型是什么? 我使用postgresql数据库 您正在寻找带时区或不带时区的时间戳,时区优先用于存储实际数据 请参见时区时间戳也将起作用,并尊重客户端的时区。我确实建议在存储数据中使用时区,但是对于时区,它不再是现在添加时区时所要求的yyyy mm dd hh:mm:ss格式。strobel=创建表测试dat timestamptz,info text;创建表格strobel=插入测试值“2014-02-27 19:07:57”,

我不知道分配给yyyy mm dd hh:mm:ss格式数据的数据类型是什么? 我使用postgresql数据库

您正在寻找带时区或不带时区的时间戳,时区优先用于存储实际数据


请参见

时区时间戳也将起作用,并尊重客户端的时区。我确实建议在存储数据中使用时区,但是对于时区,它不再是现在添加时区时所要求的yyyy mm dd hh:mm:ss格式。strobel=创建表测试dat timestamptz,info text;创建表格strobel=插入测试值“2014-02-27 19:07:57”,即“有效”;插入0 1 strobel=从测试中选择*;dat | info--------+----2014-02-27 19:07:57+01 |有效