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

Postgre CreateTable gives error #149

Open
Sharma-Arcadix opened this issue Oct 30, 2024 · 1 comment
Open

Postgre CreateTable gives error #149

Sharma-Arcadix opened this issue Oct 30, 2024 · 1 comment
Assignees

Comments

@Sharma-Arcadix
Copy link

Description

CreateTable gives error with Postgre connection string

Exception

Npgsql.PostgresException: '42601: syntax error at or near "If"

Exception message:
This exception was originally thrown at this call stack:
    Npgsql.Internal.NpgsqlConnector.ReadMessageLong(bool, Npgsql.Internal.DataRowLoadingMode, bool, bool)
    System.Runtime.CompilerServices.PoolingAsyncValueTaskMethodBuilder<TResult>.StateMachineBox<TStateMachine>.System.Threading.Tasks.Sources.IValueTaskSource<TResult>.GetResult(short) in PoolingAsyncValueTaskMethodBuilder.cs
    Npgsql.NpgsqlDataReader.NextResult(bool, bool, System.Threading.CancellationToken)
    Npgsql.NpgsqlDataReader.NextResult(bool, bool, System.Threading.CancellationToken)
    Npgsql.NpgsqlDataReader.NextResult()
    Npgsql.NpgsqlCommand.ExecuteReader(bool, System.Data.CommandBehavior, System.Threading.CancellationToken)
    Npgsql.NpgsqlCommand.ExecuteReader(bool, System.Data.CommandBehavior, System.Threading.CancellationToken)
    System.Threading.Tasks.ValueTask<TResult>.Result.get() in ValueTask.cs
    Npgsql.NpgsqlCommand.ExecuteNonQuery(bool, System.Threading.CancellationToken)
    Npgsql.NpgsqlCommand.ExecuteNonQuery()

Further technical details

  • Dapper version: [Dapper v2.1.4]
  • Dapper Plus version: [Dapper Plus v6.0.5]
  • Database Server version: [Postgre 8.1]
  • Database Provider version (NuGet): [Microsoft.Data.SqlClient v5.1.2]
@JonathanMagnan JonathanMagnan self-assigned this Oct 30, 2024
@JonathanMagnan
Copy link
Member

Hello @Sharma-Arcadix ,

Unfortunately, this feature currently only supports SQL Server.

We might eventually add PostgreSQL and other providers, but there is currently no short-term plan for doing it. It is usually more used, for example, on .NET Fiddle.

Best Regards,

Jon

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

No branches or pull requests

2 participants