-
Notifications
You must be signed in to change notification settings - Fork 86
Closed
Milestone
Description
As @roji said here, Npgsql fully supports writing binary (typically UTF8) data to text/jsonb. I assume this means:
- we can create a parameter with a
byte[],ReadOnlyMemory<byte>orStreamvalue containing a UTF-8 encoded string when writing atext,jsonorjsonbfield; and - we can read a
text,jsonorjsonbfield from anNpgsqlDataReaderas abyte[],ReadOnlyMemory<byte>orStream.
If so, then this is inconsistent with the documentation, which states text, json and jsonb fields can only be read as string or char[] and written as string, char[] or char.
Furthermore, if I recall correctly, Npgsql supports reading/writing bytea fields as ReadOnlyMemory<byte>; however, this is also missing from the documentation.
The documentation also does not indicate that it is possible to read a bytea field with a Stream (although it does say it is possible to write a bytea field with a Stream). My understanding is that it is possible to read a bytea field with a Stream.
Apologies if any of the above is incorrect.
Metadata
Metadata
Assignees
Labels
No labels