PostgreSQL 8.3 dialect with Guid type support

Description

Next version of PostgreSQL, 8.3, will support DbType.Guid.
This new dialect add this functionality.

It was not tested because Npgsql currently doesn't recognise DbType.Guid. But, except a big surprise, this should work like a charm.

Environment

None

Attachments

2
100% Done
Loading...

Activity

Show:

Fabio Maulo October 3, 2007 at 6:46 AM

Changed PostgreSQL82Dialect directly.

Fabio Maulo September 28, 2007 at 7:24 AM

Ok and thank for the test; it will be useful for some other Dialect too.
I'm going to post your patch ASAP.

David Bachmann September 28, 2007 at 5:07 AM

PostgreSQL 8.3 supports GUID type by providing a new native type named UUID.
http://developer.postgresql.org/pgdocs/postgres/datatype-uuid.html

SQL queries like this one are now possible:
select * from foo where foo.uuid_field = '01234567-abcd-abcd-abcd-0123456789ab';

I've submitted a patch to Npgsql to add this new feature. It has been approved and applied on the CVS repository of Npgsl2:
http://pgfoundry.org/tracker/index.php?func=detail&aid=1008782&group_id=1000140&atid=592
http://lists.pgfoundry.org/pipermail/npgsql-devel/2007-September/000381.html

Every unit tests who failed with error 'Dialect does not support DbType.Guid' are now successfully passing.
Furthermore I've added a test to verify that GUID type are correctly supported in a where clause. (see attached patch)

Tests were done on Windows XP against PostgreSQL-8.3-dev1 (Windows binary version from PgInstaller: http://pgfoundry.org/projects/pginstaller/ ) using current CVS version of Npgsql2.

Fabio Maulo September 25, 2007 at 11:07 PM

Are you secure that your patch work ? Are you test it using Guid in a "where" clause ?
Guid is not the same type of uuid.
I think that work for causality.

The right generator for PostgreSQL is uuid.hex.

Please check it and send the link of PostgreSQL and Npgsql where they talk about Guid.
Thanks.

Fixed

Details

Assignee

Reporter

Components

Fix versions

Affects versions

Priority

Who's Looking?

Open Who's Looking?
Created August 29, 2007 at 12:08 PM
Updated October 3, 2007 at 6:46 AM
Resolved October 3, 2007 at 6:46 AM
Who's Looking?