SCM

[#1011216] Nplsql should natively handle new Postgres 9.2 RANGE types

View Trackers | Feature Requests | Download .csv | Monitor

Date:
2012-08-03 20:23
Priority:
3
State:
Open
Submitted by:
Mike Christensen (hiawatha)
Assigned to:
Nobody (None)
Category:
Interface Improvements (example)
Group:
Next Release (example)
Resolution:
None
 
Summary:
Nplsql should natively handle new Postgres 9.2 RANGE types

Detailed description
Right now, Npgsql will handle a RANGE type as a string, which is not ideal.

However, I'm not sure the best way to implement this as there's not really a native concept of a range type in .NET. It would probably be hacky to implement this as a two-element array.

Perhaps Npgsql can implement its own Range<T> class which would contain an upper and lower value. This class would also need to support inclusive and exclusive bounds, as well as unbounded ranges.

A bonus feature would be to implement an implicit conversion between Range<T> and String so that code can work with ranges exactly as you could in Postgres, for example:

Range<Int32> foo = "[5,10]";

As well as operators to compare ranges with other instances.

Reference: http://www.postgresql.org/docs/devel/static/rangetypes.html

Followup

No Followups Have Been Posted

Attached Files:

Changes:

No Changes Have Been Made to This Item

Powered By FusionForge