Auf Thema antworten

Wenn ich aber


CREATE OR REPLACE FUNCTION notify_id_trigger() RETURNS trigger AS $$

BEGIN

  PERFORM pg_notify('new_Id', NEW."Id");

  RETURN new;

END;

$$ LANGUAGE plpgsql;


also "Id" bekomme ich folgenden Stacktrace:


Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while updating the entries. See the inner exception for details.

---> Npgsql.PostgresException (0x80004005): 42883: Funktion pg_notify(unknown, uuid) existiert nicht

   at Npgsql.NpgsqlConnector.<ReadMessage>g__ReadMessageLong|194_0(NpgsqlConnector connector, Boolean async, DataRowLoadingMode dataRowLoadingMode, Boolean readingNotifications, Boolean isReadingPrependedMessage)

   at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken)

   at Npgsql.NpgsqlCommand.ExecuteReader(CommandBehavior behavior, Boolean async, CancellationToken cancellationToken)

   at Npgsql.NpgsqlCommand.ExecuteReader(CommandBehavior behavior, Boolean async, CancellationToken cancellationToken)

   at Npgsql.NpgsqlCommand.ExecuteDbDataReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken)

   at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)

   at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)

   at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken)

  Exception data:

    Severity: FEHLER

    SqlState: 42883

    MessageText: Funktion pg_notify(unknown, uuid) existiert nicht

    Hint: Keine Funktion stimmt mit dem angegebenen Namen und den Argumenttypen überein. Sie müssen möglicherweise ausdrückliche Typumwandlungen hinzufügen.

    InternalPosition: 8

    InternalQuery: SELECT pg_notify('new_Id', NEW."Id")

    Where: PL/pgSQL-Funktion notify_id_trigger() Zeile 3 bei PERFORM

    File: d:\pginstaller_12.auto\postgres.windows-x64\src\backend\parser\parse_func.c

    Line: 631

    Routine: ParseFuncOrColumn

   --- End of inner exception stack trace ---


Zurück
Oben