{"action":"created","issue":{"url":"https://api.github.com/repos/npgsql/npgsql/issues/2171","repository_url":"https://api.github.com/repos/npgsql/npgsql","labels_url":"https://api.github.com/repos/npgsql/npgsql/issues/2171/labels{/name}","comments_url":"https://api.github.com/repos/npgsql/npgsql/issues/2171/comments","events_url":"https://api.github.com/repos/npgsql/npgsql/issues/2171/events","html_url":"https://github.com/npgsql/npgsql/issues/2171","id":363660516,"node_id":"MDU6SXNzdWUzNjM2NjA1MTY=","number":2171,"title":"Support for uint[] and oid[]","user":{"login":"Logerfo","id":19306384,"node_id":"MDQ6VXNlcjE5MzA2Mzg0","avatar_url":"https://avatars2.githubusercontent.com/u/19306384?v=4","gravatar_id":"","url":"https://api.github.com/users/Logerfo","html_url":"https://github.com/Logerfo","followers_url":"https://api.github.com/users/Logerfo/followers","following_url":"https://api.github.com/users/Logerfo/following{/other_user}","gists_url":"https://api.github.com/users/Logerfo/gists{/gist_id}","starred_url":"https://api.github.com/users/Logerfo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Logerfo/subscriptions","organizations_url":"https://api.github.com/users/Logerfo/orgs","repos_url":"https://api.github.com/users/Logerfo/repos","events_url":"https://api.github.com/users/Logerfo/events{/privacy}","received_events_url":"https://api.github.com/users/Logerfo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-09-25T16:17:10Z","updated_at":"2018-09-25T21:08:07Z","closed_at":null,"author_association":"NONE","body":"### Introduction\r\nAccording to the [documentation](http://www.npgsql.org/doc/types/basic.html), Npgsql supports read and write type mapping for `oid` and `UInt32`. It also supports read and write type mapping for arrays of primitive types, both in C# and PostgreSQL.\r\n\r\n### Problem\r\nI have a database column typed as `oid[]` referenced by a model class property typed as `UInt32[]`. I can read it without issues, but the following exception is thrown when I try to write it:\r\n> System.NotSupportedException: 'The CLR array type System.UInt32[] isn't supported by Npgsql or your PostgreSQL. If you wish to map it to an  PostgreSQL composite type array you need to register it before usage, please refer to the documentation.'\r\n\r\n### Questions\r\nHow am I supposed to map this? Should I extend an already known `NpgsqlTypeHandler`? Why is there an internal `OIDVectorHandler` but no `OIDHandler` in the npgsql source code, as far as I can find it? Is this really supported? \r\n\r\n### Further technical details\r\nNpgsql version: 4.0.3\r\nPostgreSQL version: 9.6\r\nOperating system: Windows 10\r\n\r\n---\r\nThank you very much."},"comment":{"url":"https://api.github.com/repos/npgsql/npgsql/issues/comments/424502026","html_url":"https://github.com/npgsql/npgsql/issues/2171#issuecomment-424502026","issue_url":"https://api.github.com/repos/npgsql/npgsql/issues/2171","id":424502026,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNDUwMjAyNg==","user":{"login":"austindrenski","id":21338699,"node_id":"MDQ6VXNlcjIxMzM4Njk5","avatar_url":"https://avatars3.githubusercontent.com/u/21338699?v=4","gravatar_id":"","url":"https://api.github.com/users/austindrenski","html_url":"https://github.com/austindrenski","followers_url":"https://api.github.com/users/austindrenski/followers","following_url":"https://api.github.com/users/austindrenski/following{/other_user}","gists_url":"https://api.github.com/users/austindrenski/gists{/gist_id}","starred_url":"https://api.github.com/users/austindrenski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/austindrenski/subscriptions","organizations_url":"https://api.github.com/users/austindrenski/orgs","repos_url":"https://api.github.com/users/austindrenski/repos","events_url":"https://api.github.com/users/austindrenski/events{/privacy}","received_events_url":"https://api.github.com/users/austindrenski/received_events","type":"User","site_admin":false},"created_at":"2018-09-25T21:08:07Z","updated_at":"2018-09-25T21:08:07Z","author_association":"MEMBER","body":"> System.NotSupportedException: 'The CLR array type System.UInt32[] isn't supported by Npgsql or your PostgreSQL. If you wish to map it to an PostgreSQL composite type array you need to register it before usage, please refer to the documentation.'\r\n\r\nAre you using the ADO.NET driver or the EF Core provider? \r\n\r\nThat exception looks like its coming from the EF Core provider. If you are using EF Core, please re-open your issue in the EF Core _provider_ repository: [npgsql/Npgsql.EntityFrameworkCore.PostgreSQL](https://github.com/npgsql/Npgsql.EntityFrameworkCore.PostgreSQL).\r\n\r\n> Why is there an internal `OIDVectorHandler` but no `OIDHandler` in the npgsql source code, as far as I can find it?\r\n\r\nThe `oid` type is handled by the [`UInt32Handler`](https://github.com/npgsql/npgsql/blob/dev/src/Npgsql/TypeHandlers/NumericHandlers/UInt32Handler.cs) class.\r\n\r\n> Is this really supported?\r\n\r\nWell, `oidvector` is certainly supported:\r\n\r\nhttps://github.com/npgsql/npgsql/blob/23645f73c2d0eae3f50cbb6cfbab59f9a06079b7/test/Npgsql.Tests/Types/MiscTypeTests.cs#L644-L661\r\n\r\nI'm not sure why `oid[]` wouldn't be working, but it would help if you could provide some sample code to demonstrate how your code attempts to use `oid[]` and how the issue occurs.\r\n\r\n## Related\r\nnpgsql/Npgsql.EntityFrameworkCore.PostgreSQL#455"}}
{"actor":{"display_login":"austindrenski"}}