(createDatabase,con)){cmd.ExecuteNonQuery();}}using(varcon=newNpgsql.NpgsqlConnection(connectionDb)){con.Open();stringaddExtension=$@"CREATE EXTENSION IF NOT EXISTS ""uuid-ossp"";";using(varcmd=newNpgsql.NpgsqlCommand(addExtension,con)){cmd.ExecuteNonQuery();}}using(varcon=newNpgsql.Npgsql...
例外情况是用户代码未处理Npgsql.NpgsqlException。看起来生成的SQL的表名和列名使用了方括号,而Npgsql不...
Good morning everyone. I'm sorry to be here again, but it seems like a npgsql bug. In this simple program I save the decimal variable 0.5126666666666666666666666667 (which has 28 decimal digits) into the database (so this value fits into a c# decimal value). It works perfectly. When I t...
The main advantage of Dapper is the auto-mapping in read operations. Instead of usingNpgsqlDataReader, you can create a constructor with parameters matching column names and the code becomes much nicer. Here’s an example of implementingGetBySubjectwith Dapper: publicasyncTask<IEnumerable<Teacher>>...
问Npgsql.PostgresException 42703:关系"posts“的"Created”列不存在EN有的童鞋用WordPress做杂志新闻、信息...
Steps to reproduce create database something; create extension postgis; create tablespace alter database set tablespace new alter database set tablespace pg_default; Launch project that connects to this database. The issue Exception mess...
CREATE TABLE IF NOT EXISTS efcore_minpro_modeltemplate ( id UUID NOT NULL DEFAULT gen_random_uuid(), itemsjson JSON NOT NULL DEFAULT '[]'::JSON, CONSTRAINT pk_efcore_minpro_modeltemplate PRIMARY KEY (id) );30 changes: 30 additions & 0 deletions 30 src/Npgsql.Minpro.sln Original fil...
Originally mentioned in #736, but is still reproducible in 3.0.2. System.NullReferenceException: Object reference not set to an instance of an object. at Npgsql.NpgsqlConnector.Cleanup() at Npgsql.NpgsqlConnector.Close() at Npgsql.Npgsql...
I create an NpgsqlConnection and do some stuff in a database, then try to drop that database. This fails with Npgsql.PostgresException : 55006: database "test_settings_637363918866651378" is being accessed by other users Data: Severity: ERROR InvariantSeverity: ERROR SqlState: 55006 MessageText...
usingSystem.Data;usingSystem.Diagnostics;usingSystem.Threading;usingNpgsql;namespaceNpgsqlNotifyTest{classProgram{staticvoidMain(string[]args){varbuilder=newNpgsqlConnectionStringBuilder{Host="127.0.0.1",Database="postgres",UserName="postgres"};varthread1=newThread(()=>{varconnection1=newNpgsqlConnection(bu...