dotnetcore / dotnetcore/FreeSql

PostgreSQL:type double does not exist

Open
#2,270 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
4.4k
Forks
910
PR merge metrics
No merged PRs in 30d

Description

#### 问题描述及重现代码:

```c#
模型:
public sealed class TestStoreModel
{
public long Id { get; set; }
[Column(DbType = "double precision")]
}
表:
CREATE TABLE IF NOT EXISTS "public"."TestData" (
"Id" BIGINT DEFAULT 0,
"Double" DOUBLE PRECISION DEFAULT 0 NOT NULL,
CONSTRAINT "public_TestData_pkey" PRIMARY KEY ("Id")
) WITH (OIDS=FALSE);
freesql 执行 await freesql.Insert(new TestStoreModel
{
Id = YitIdHelper.NextId(),
Double = 2.718281828459,
}).ExecuteAffrowsAsync(token); 时报错:42704: type "double" does not exist
```

#### 数据库版本
PostgreSQL 11.10 on x86_64-pc-linux-gnu, compiled by gcc (Debian 8.3.0-6) 8.3.0, 64-bit

#### 安装的Nuget包
FreeSql.Provider.PostgreSQL 3.5.311

#### .net framework/. net core? 及具体版本
dotnet10

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the shown TestStoreModel insert with FreeSql.Provider.PostgreSQL against PostgreSQL 11.10, then trace the provider's handling of the [Column(DbType = "double precision")] mapping. Done means the insert succeeds without the `type "double" does not exist` error and a regression test covers this mapping.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, postgresql
Domain
database
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.