Open GoogleCodeExporter opened 9 years ago
I had the same issue. Here' what I changed to fix it (in
src\DbLinq.PostgreSql\PgsqlSqlProvider.cs)
Index: PgsqlSqlProvider.cs
===================================================================
--- PgsqlSqlProvider.cs (revision 1411)
+++ PgsqlSqlProvider.cs (working copy)
@@ -55,6 +55,21 @@
return SqlStatement.Format("SELECT {0}", SqlStatement.Join(", ", ids.ToArray()));
}
+ public SqlStatement GetLiteral(Guid literal)
+ {
+ return ("'" + literal.ToString("B") + "'");
+ }
+
+ public override SqlStatement GetLiteral(object literal)
+ {
+ if (literal is Guid)
+ {
+ return this.GetLiteral((Guid)literal);
+ }
+ return base.GetLiteral(literal);
+ }
+
+
public override SqlStatement GetLiteral(DateTime literal)
{
return "'" + literal.ToString("o") + "'::timestamp";
@@ -129,6 +144,7 @@
{typeof(DateTime),"timestamp"},
//{typeof(Guid),"uniqueidentifier"}
+ {typeof(Guid),"uuid"},
{typeof(byte[]),"bytea"},
};
Original comment by goossens...@gmail.com
on 10 Sep 2010 at 2:24
Hi!
I confirm this issue too. Though I have a slightly different patch to solve it.
Dom
Original comment by kandrait...@gmail.com
on 18 Sep 2012 at 4:39
Attachments:
Original issue reported on code.google.com by
guillaum...@gmail.com
on 2 Jun 2010 at 10:56