Questions tagged [npgsql]

Npgsql provides .NET based programs, written e.g. in C#, Visual Basic or F#, access to PostgreSQL databases via ADO.NET.

Filter by
Sorted by
Tagged with
0 votes
0 answers
35 views

Postgres / Npgsql slow connection due to Hosts file organisation

I'm not really sure if this is the right place to post this but I happened across a peculiar behaviour yesterday. Historically, when debugging locally, our application's first connection to a given ...
Jmase's user avatar
  • 21
0 votes
0 answers
38 views

SSIS Npgsql Connection Authentication method not supported

After upgrading the source database, the previously working package does not execute and reports the following error. Does anyone know what and where to update in the SSIS server? I hope that it will ...
user2966259's user avatar
1 vote
1 answer
75 views

NpgsqlParameter Array of smallints is receiving 0 instead of null value from postgres

I got strange result with NpgsqlParameter in C++/CLI project. NpgsqlParameter^ status = wCMD->Parameters->Add(gcnew NpgsqlParameter("param1", NpgsqlDbType::Array | NpgsqlDbType::...
Thanh Dong's user avatar
1 vote
2 answers
911 views

NpgSql - How to pass parameter into DO block in PostgreSQL query

I am trying to use a parameter passed into a PostgreSQL query inside a DO block within that query. It fails though, and seems to be parsing the statement as if the parameter was a column. Is it ...
Anssssss's user avatar
  • 188
0 votes
1 answer
1k views

How to parameterize a Postgres JSON containment query with arrays of objects?

I have a JSON containment query as below. The query looks for matching objects inside arrays. This works. The values of Name and DataType will be passed in to a .Net function, and the query built in ...
Paul Guz's user avatar
0 votes
0 answers
317 views

How to efficiently do partial updates on huge dataset in Postgresql

Disclaimer: I am a total "newb" in regards to PgSql, but due to some unfortunate aligment of circumstances I am in charge of this project which I have to rewrite/migrate away from SqlServer (alone), ...
ConfusedUser's user avatar
0 votes
0 answers
116 views

SQL fast in PSQL, very slow using MS.NET driver

There's thread with exact same title and problem, but with no answer, NPGSQL driver takes very long time to execute queries, but other language drivers or terminal works fine. From what I've found, ...
iNeedHealing255's user avatar
0 votes
1 answer
140 views

postgres npgsql DDL statement success or failure

I am using npgsql with a postgres DB, writing a DB updater that will need to execute a series of (usually) DDL statements like "ALTER TABLE ADD COLUMN blah..." and the like. The simple way to do this ...
MickeyfAgain_BeforeExitOfSO's user avatar
2 votes
1 answer
2k views

Concurrency / Transaction Concerns with PostgreSQL Copy (bulk insert)

We're building a CQRS system backed by Postgres. As part of this, we generate 'readmodels' which are precalculated projections of event sourced data. We regularly need to create new tables, query ...
Damien Sawyer's user avatar
4 votes
2 answers
1k views

Postgres 11 - Fetching results after a transactiom

With the recent update of Postgres 11. It now supports procedures. Transactions are finally supported in stored procedures in Postgres. However, I have been trying to perform a transaction and ...
deviantxdes's user avatar
3 votes
0 answers
4k views

Npgsql Timeout for simple query when run in parallel

I'm struggling to determine the cause of an exception when the code is run in parallel, but works fine when run one at a time. As background information, I'm running a set of unit tests, where each ...
berkeleybross's user avatar
0 votes
1 answer
1k views

What is the relationship between ADO.NET and Npgsql?

There is a sentence in the Npgsql official page: Npgsql is an open source ADO.NET Data Provider for PostgreSQL. I know that I can access a Postgresql database using Npgsql with the .NET framework. ...
FortisFortuna's user avatar
4 votes
4 answers
20k views

Trying to connect to PostgreSQL with Entity Framework via Npgsql and C#

So, I'm new to databases and only have done a little with PostgreSQL before. I have C# (visual studio 2012) and have downloaded the Entity framework (6). I have also downloaded the latest Npgsql data ...
Joseph's user avatar
  • 63