question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add mapping for regconfig data type

See original GitHub issue

I am trying to utilize the tsvector_update_trigger_column trigger. This trigger requires a column of type regconfig which holds the language.

Is this column type supported?

I tried the following:

[Column(TypeName = "regconfig")]

public string Language { get; set; }


public NpgsqlTsVector SearchVector { get; set; }

Trigger example:

CREATE TRIGGER tsvectorupdate BEFORE INSERT OR UPDATE ON \"Items\" FOR EACH ROW EXECUTE PROCEDURE tsvector_update_trigger_column(\'SearchVector\', \'Language\', \'Title\');

When i try to update the item the following error is show: ERROR: column “Language” is of type regconfig but expression is of type text at character 183 HINT: You will need to rewrite or cast the expression.

Versions: Postgres 10.4 EF.Core 2.1.1 Npgsql.EntityFrameworkCore.PostgreSQL 2.1.1

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:12 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
rojicommented, Jul 14, 2018

A mapping was missing for the regconfig type, since full-text search is usually done without a column containing the configuration. I’ve added this missing mapping for the upcoming 2.1.2 release.

0reactions
rojicommented, Aug 15, 2018

I think so, although I think this should be backported to 2.1.2, so it may be worth waiting until 4.0.3 is actually released and take a dependency on that. But if you want to go ahead that’s fine too, 2.1.2 can depend on 4.0.3-ci for now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Add mapping for regconfig data type #516 - npgsql/efcore.pg
I am trying to utilize the tsvector_update_trigger_column trigger. This trigger requires a column of type regconfig which holds the language ...
Read more >
MappingException: No Dialect mapping for JDBC type: 2002
I try to query PostgreSQL database via Hibernate native sql interface. ... as regconfig), :fullTextQuery) ) "); .append("GROUP BY w.id, ...
Read more >
Documentation: 15: 8.19. Object Identifier Types
Object identifiers (OIDs) are used internally by PostgreSQL as primary keys for various system tables. Type oid represents an object identifier.
Read more >
PostgreSQL — SQLAlchemy 2.0 Documentation
When creating tables, SQLAlchemy will issue the SERIAL datatype for integer-based primary key columns, which generates a sequence and server side default ...
Read more >
Full Text Search - tsvector column
Mapping. PostgreSQL full text search types are mapped onto .NET types built-in to Npgsql. The tsvector type is mapped to NpgsqlTsVector and tsquery...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found