相关疑难解决方法(0)

PostgreSQL中有/无时区的时间戳之间的差异

存储时间戳值不同PostgreSQL中,当数据类型是WITH TIME ZONEWITHOUT TIME ZONE?可以用简单的测试用例说明差异吗?

postgresql timezone types

165
推荐指数
5
解决办法
18万
查看次数

PostgreSQL和C#数据类型

我在PostgreSQL和C#之间搜索了类型转换表,但我找不到任何东西.如果我有空的话,我会在上面的桌子上研究空单元格.但是如果你知道有这些信息的网页,我非常适合你的帮助.

Postgre Type --->C# Type

bigint --->Int64

bigserial --->

bit [ (n) ] --->Byte[]

bit varying [ (n) ] --->Byte

boolean --->Boolean

box --->

bytea --->Byte[]

character varying [ (n) ] ---> String

character --->String

cidr

circle 

date --->DateTime

double precision --->Double

inet

integer --->Int32

interval [ (p) ] --->TimeSpan

line 

lseg 

macaddr

money

numeric [ (p, s) ] --->Decimal

decimal [ (p, s) ] --->Decimal

path  

point 

polygon 

real --->Single

smallint --->Int16

serial 

text --->String

time [ (p) ] …
Run Code Online (Sandbox Code Playgroud)

c# postgresql types

46
推荐指数
1
解决办法
4万
查看次数

如何在JPA 2实体中映射postgresql"timestamp with time zone"

我有一个JPA 2应用程序(使用Hibernate 3.6作为JPA实现)使用Postgresql(使用9.0-801.jdbc3 JDBC驱动程序).

我无法将"timestamp with time zone"字段映射到我的JPA实体.

这是一个例子:

CREATE TABLE theme
(
  id serial NOT NULL,
  # Fields that are not material to the question have been edited out
  run_from timestamp with time zone NOT NULL,
  run_to timestamp with time zone NOT NULL,
  CONSTRAINT theme_pkey PRIMARY KEY (id ),
  CONSTRAINT theme_name_key UNIQUE (name )
)
Run Code Online (Sandbox Code Playgroud)

我试图映射如下:

@Entity
@Table(schema = "content", name = "theme")
public class Theme extends AbstractBaseEntity {
    private static final long serialVersionUID = 1L;

    @Column(name = "run_from") …
Run Code Online (Sandbox Code Playgroud)

postgresql hibernate jpa jpa-2.0

28
推荐指数
2
解决办法
3万
查看次数

标签 统计

postgresql ×3

types ×2

c# ×1

hibernate ×1

jpa ×1

jpa-2.0 ×1

timezone ×1