Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Postgresql Integrations #67

Closed
necipsunmaz opened this issue Aug 12, 2018 · 23 comments
Closed

Postgresql Integrations #67

necipsunmaz opened this issue Aug 12, 2018 · 23 comments

Comments

@necipsunmaz
Copy link

I use "Npgsql.EntityFrameworkCore.PostgreSQL" with EF Core in the project. Does your library support PostgreSQL? If not, do you have a plan to do this later?

@borisdj
Copy link
Owner

borisdj commented Aug 13, 2018

At the moment it supports MsSQL only.
I did have in mind to add this feature, just didn't catch time to do it so far.
Currently I can't put any specific time frame for PostgreSQL options, but will look into it soon.

@necipsunmaz
Copy link
Author

Thanks for information.

@collinbarrett
Copy link

Looks like a great library! I am also not using SQL Server, though. I'd recommend making the db provider support more prominent on the README, as it is not immediately obvious to potential users that it only supports SQL Server.

@borisdj
Copy link
Owner

borisdj commented Aug 28, 2018

It is stated in the first paragraph:

Current version is using EF Core 3.1 and at the moment supports Microsoft SQL Server(2008+) and SQLite.

@richard-s-popov
Copy link

Still no news about support PostgreSQL?

@borisdj
Copy link
Owner

borisdj commented Dec 28, 2019

Not yet.
Have managed to extend it for SQLite recently.
PostgreSql maybe sometimes during next year.

@MaceWindu
Copy link

@IvanAntipov
Copy link

EFCore.BuildExtension is a great library, unfortunately it doesn't support Postgres. You can use 'FlexLabs.Upsert' nuget as alternative for Postgres

@etiennecl
Copy link

Is this still in the roadmap? Anything I could do to help? I'm not an expert but I sure could give you a hand.

@borisdj
Copy link
Owner

borisdj commented May 24, 2021

I started some work on this, made so far shell of methods and prof of concept for basic Insert.
Once I commit it, then next phase would be implementing each method.

@ahmeetarif
Copy link

WE ALL ARE WAITING FOR POSTGRESQL SUPPORT :)

@aktxyz
Copy link

aktxyz commented Jul 17, 2021

+1

@douglasg14b
Copy link

This would be very nice to have, just switched to Postgres and was quite surprised when the queries stopped working :/

@trojanmartin
Copy link

I started some work on this, made so far shell of methods and prof of concept for basic Insert. Once I commit it, then next phase would be implementing each method.

Can u push that branch into repo? We will be happy to help with the implementation, if possible.

@borisdj
Copy link
Owner

borisdj commented Nov 22, 2021

PostgreSql adapter added with v6.0.4
Currently supported methods: Insert and Upsert.
Still initial faze so complex cases might give exceptions.

@borisdj
Copy link
Owner

borisdj commented Nov 24, 2021

PostgreSql now fully supported, Bulk and Batch ops, v6.0.5

@dimkadv2
Copy link

dimkadv2 commented Nov 30, 2021

Hi!

sorry if I'm writing to the wrong thread

i faced the following problems while working PostgreSql:
when using json columns (in my case it's)

[Column(TypeName = "jsonb")]
public List<CatalogPathData> Catalogs { get; set; }

i have got error:

The CLR type Ocs.API.Infrastructure.ResponseData.CatalogPathData isn't natively supported by Npgsql or your PostgreSQL.
To use it with a PostgreSQL composite you need to specify DataTypeName or to map it, please refer to the documentation

and i have problems with enums:

    public enum ConditionType : byte
    {
        Regular,
        Sale,
        Unconditional
    }


    public ConditionType Condition { get; set; }

error:

A PostgreSQL type with the name condition_type was not found in the database

P.S. i'm using EFCore.NamingConventions package and EFCore 6

thank you in advance!

Hoffs pushed a commit to Hoffs/EFCore.BulkExtensions that referenced this issue Dec 4, 2021
Instead of Write'ing just value also provide column type name when
available. In this case correct column type will be used for CLR
types that are not natively supported or mapped. While this pretty
much fixes the issue borisdj#67, relying on final column type can lead to
issues when assumed type handler doesn't match the actual type.
For example uint32 has pg type bigint, but default handler for this
type is Int64Handler which doesn't handle uint32.
@bugrakosen
Copy link

Hi,

I'm facing the same issue as @dimkadv2 with enum types.

It seems @Hoffs solution did not change anything for my situation.

Do you have any suggestions for me?

@borisdj
Copy link
Owner

borisdj commented Dec 9, 2021

Enums should be fixed with v6.1.8

@borisdj borisdj closed this as completed Dec 9, 2021
@Bouke
Copy link

Bouke commented Jul 13, 2022

How invasive is it to backport this to support EFCore 3.1? We are running on .NET Framework which is only supported by EFCore 3.1.

@borisdj
Copy link
Owner

borisdj commented Jul 13, 2022

Prior versions are not actively maintained.
In principle could be done, but has significant work.
Would be easier to 5 then to 3 since there were more code structure differences and also syntax and breaking changes from internal .Net methods.
There is separate branch for x3, if someone makes it and does a PR I could publish newer v3 nuget.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests