Add mapping for regconfig data type
See original GitHub issueI 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:
- Created 5 years ago
- Comments:12 (8 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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.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.