Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 31 2019 21:30
    roji commented #2307
  • Jan 31 2019 20:35
    YohDeadfall commented #2307
  • Jan 31 2019 10:20
    capan starred npgsql/npgsql
  • Jan 31 2019 06:10
    SeanFarrow synchronize #2308
  • Jan 30 2019 20:37
    austindrenski commented #2308
  • Jan 30 2019 20:37
    pentagra commented #1445
  • Jan 30 2019 20:33
    SeanFarrow commented #2308
  • Jan 30 2019 20:31
    austindrenski commented #2308
  • Jan 30 2019 20:27
    SeanFarrow commented #2308
  • Jan 30 2019 20:09
    austindrenski labeled #2308
  • Jan 30 2019 20:05
    roji commented #1520
  • Jan 30 2019 19:50
    gyzod commented #1445
  • Jan 30 2019 19:06
    SeanFarrow commented #1520
  • Jan 30 2019 18:54
    roji commented #1520
  • Jan 30 2019 18:53
    roji commented #1520
  • Jan 30 2019 18:52
    roji commented #2050
  • Jan 30 2019 18:45
    Trolldemorted commented #2050
  • Jan 30 2019 18:21
    SeanFarrow commented #1520
  • Jan 30 2019 18:16
    SeanFarrow review_requested #2308
  • Jan 30 2019 18:16
    SeanFarrow review_requested #2308
Prutenskiy
@Prutenskiy_gitlab

Hi guys.
I have app witch configured as <TargetFrameworks>net472;netcoreapp3.1</TargetFrameworks>
I use Npgsql 4.*(try any vertions) for work with DB
INSERT\UPDATE worked fine, but when I try use bulk operation then on start app under net472 have this exception
"Void Npgsql.Bulk.NpgsqlBulkUploader..ctor(Microsoft.EntityFrameworkCore.DbContext)".

Have any some advise?

akshayjoyinfo
@akshayjoyinfo
Hello guys I am facing this issue
This steps
The solution is to call NpgsqlConnection.ReloadTypes() on your NpgsqlConnection after the citext extension is added - this will trigger a reloading of the types and should resolve your issue.
This needs to do before adddbcontext in efcore??
akshayjoyinfo
@akshayjoyinfo

var dbContext = scope.ServiceProvider.GetRequiredService<ISDbContext>();
if (dbContext.Database.GetPendingMigrations().Any())
{
dbContext.Database.Migrate();

dbContext.Database.OpenConnection();
((NpgsqlConnect)dbContext.GetDbConnection()).ReloadTypes();

}

I hope this is the fix
Evgeniy Glebov
@glebov21
Hello. Help me please. Can i use TransactionScope without prepared transactions?
If i using transactionScope, I have error: 55000: prepared transactions are disabled but i don't want enable prepared transactions
Evgeniy Glebov
@glebov21
Enlist=false solve my problem :)
Shay Rojansky
@roji
@akshayjoyinfo that's a possible fix, but note that it's discouraged to apply migrations programmatically when your program starts. See the EF Core docs on this for more info (https://docs.microsoft.com/en-us/ef/core/managing-schemas/migrations/applying?tabs=dotnet-core-cli).
@glebov21 Enlist=false means... you're not using TransactionScope at all (with your Npgsql connection). I'm not sure this is what you want...
Prepared transactions are needed the moment more than one connection is enlisted to the same TransactionScope (aka distributed transaction)
Make sure you understand exactly what you want your transaction to span, etc...
Sander Mol
@Nkmol

Hello guys, I am aware NpSQL is shipped with Power BI. sadly this is only the 4.0.1 version of NpgSQL, where I need the newer 4.1.x version in order to support FOREIGN TABLEs. The MS documentation shows it takes the CAG installed NpSQL. I tried to install this through the given MSI and checking CAG installation, however I still do not seem to get the correct tables.

Does anybody know if Power BI can be supported with NpgSQL 4.1.x?

Sander Mol
@Nkmol
@roji I am trying to create a backport. I branched from v4.0.11, created the cherry-pick commit, should target this PR the the main branch? Or is there a specific release branch for this?
Shay Rojansky
@roji
@Nkmol no, the main branch corresponds to the latest version (currently 6.0)
You need to target hotfix/4.0.11
So cherry-pick the commit from the main branch into hotfix/4.0.11
Sander Mol
@Nkmol
@roji Thanks for the response. I see no hotfix/4.0.11 branch on the upstream so I do not think I can target this. I do not think I can create this branch. Excuse me if I am missing some obvious...
Shay Rojansky
@roji
Sorry, my bad. 4.0.11 was published almost a year ago (https://www.nuget.org/packages/Npgsql/4.0.11). I've just pushed hotfix/4.0.12 which you can backport against.
Am not promising a quick release though.. This is a very old version that isn't really maintained any more..
Sander Mol
@Nkmol
Totally understandable... The PR is here npgsql/npgsql#3722. At least this would be an opportunity to support this behaviour in Power BI.
Sajan
@woodsongem
Hello All,
we are trying to implement Tri-Gram in .net core with entity framework(Npgsql.EntityFrameworkCore.PostgreSQL.Trigrams)+ postgresql.
looking for step to implement. please share if you have any. TIA
Shay Rojansky
@roji
@woodsongem check out the docs for the support translations you can use in LINQ: https://www.npgsql.org/efcore/mapping/translations.html#trigram-functions.
akshayjoyinfo
@akshayjoyinfo
@roji u are a magician. That ReloadTypes works like a charm. We are using this code only Integration testing part.
In that part we are running migration on Containerized dB in pipeline then migrate using nogsql et core migration. One of the migration we changed the db column to citext. So after mig we ran this problem solved
Sajan
@woodsongem
Good Morning All,
how to implement search on number? like we have bigint column type called EmpId. we need to implement search on EmpId. please share thoughts . TIA
Shay Rojansky
@roji
@woodsongem what is exactly your question, in SQL (WHERE "EmpId" = xxx)? With EF Core? In both cases there's lots of basic resources on the Internet...
Sajan
@woodsongem
no.. like this " where EmpId::text like '%151%'"
sample input : EmpId ==>
1000151
2000151
3000151
Sajan
@woodsongem

Hello All,
Any one implement unit test case for EF.Functions.TrigramsAreSimilar. ? we are getting below error while running test case . any idea to solve issue?

"The 'TrigramsAreSimilar' method is not supported because the query has switched to client-evaluation. This usually happens when the arguments to the method cannot be translated to server. Rewrite the query to avoid client evaluation of arguments so that method can be translated to server."

Shay Rojansky
@roji
@woodsongem post your query... It's not possible to help without that
asyed4u
@asyed4u:matrix.org
[m]
hi
The connection pool has been exhausted either raise max pool size (currently 100) or timeout (currently 15 sec.)”
Enviroment : asp.net core api 3.1
Environment : postgresql 12+
code as below
services.AddDbContextPool<AppDbContext>(options => options.UseNpgsql(DbDetails.DefaultDb));
currently in postgreqsql : 100 max connection
currrently in .net core : default 128 max
Akshay Bheda
@akshaybheda
Facing this issue after upgrading to latest package.
Npgsql.PostgresException (0x80004005): 42P01: relation "XX" does not exist
The Relation exists and same query works through pgadmin
Same error is generated for non relationship, Single Tables
Any clue?
Shay Rojansky
@roji
@asyed4u @akshaybheda very difficult to help you guys without any code
Submit issues with minimal, runnable code samples - that's the fastest way to get help
Akshay Bheda
@akshaybheda
@roji npgsql/efcore.pg#1859 Created this issue
I am blocked since last 4 days due to this and this is very crucial issue for me
can you please help?