Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.Net MEVD: Reexamine PostgreSQL timestamp mapping #10641

Open
roji opened this issue Feb 22, 2025 · 0 comments
Open

.Net MEVD: Reexamine PostgreSQL timestamp mapping #10641

roji opened this issue Feb 22, 2025 · 0 comments
Labels
memory connector memory msft.ext.vectordata Related to Microsoft.Extensions.VectorData .NET Issue or Pull requests regarding .NET code

Comments

@roji
Copy link
Member

roji commented Feb 22, 2025

The PostgreSQL connector currently maps DateTime to the timestamp without time zone type, and DateTimeOffset to the timestamp with time zone (link).

First, Npgsql itself maps DateTime to timestamp without time zone only for DateTime with Kind=Unspecified or Local, and to timestamp with time zone for Kind=Utc (note that timestamp with time zone simply represents a UTC timestamp in PG, just like DateTime with Kind=Utc).

Second, Npgsql does not support DateTimeOffset with offsets that aren't zero, since there isn't any PostgreSQL type that actually stores an offset in the database (again, timestamp with time zone only stores a timestamp that's meant to represent a UTC timestamp by convention). We should make sure the MEVD connector throws properly for non-zero-offset DateTimeOffsets etc.

@roji roji added .NET Issue or Pull requests regarding .NET code memory connector memory msft.ext.vectordata Related to Microsoft.Extensions.VectorData labels Feb 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
memory connector memory msft.ext.vectordata Related to Microsoft.Extensions.VectorData .NET Issue or Pull requests regarding .NET code
Projects
None yet
Development

No branches or pull requests

1 participant