On Nov 11, 6:29 am, Jamie Krug <[email protected]> wrote:
> Using the UUID data type in PostgreSQL 8.3 (http://www.postgresql.org/
> docs/8.3/interactive/datatype-uuid.html) is problematic with
> cfqueryparam. There is no explicit cfsqltype, and using cf_sql_varchar
> will cause the following error when attempting a query like this:
>
>
> I stumbled upon this post, which fixes a similar issue regarding the
> interval data
> type:http://www.ghidinelli.com/2007/06/14/postgresql-interval-data-type-wi...
> (Here's the important part:)
> UPDATE table
> SET someInterval = <cfqueryparam cfsqltype="cf_sql_varchar"
> value="#interalValue#">::interval
>
> So I tried sticking a "::uuid" on the end of my cfqueryparam and it
> works! (But don't stop reading now, I found another solution and then
> another problem...)
Jamie, how have you gotten on with this issue? I'm contemplating
switching to native UUID support in Postgres for the speed and size
improvements but I need to deal with Transfer as well.
I mentioned this on my site but I don't know if I've shared it with
anyone here: since I use hungarian notation in my database and all
interval columns are prefixed with "inv" like invSomething, I modified
transfer/com/sql/postgresql/TransferSelecter.cfc in writeNull to do
the following:
default:
if (left(arguments.column, 3) EQ "inv")
{
null = null & "interval";
}
else
{
null = null & "text";
}
You might be able to get away with something similar with castValue.
I name my primary key UUID columns uidSomething so if I go down this
route and Mark's enhancement is not yet done, I will be looking to
write more hooks like this.
Mark - what does it take to prioritize this enhancement? I'm sure $$$
would help - how much?
Let us know if you have gotten it working in the past month or so...
Brian
--~--~---------~--~----~------------~-------~--~----~
Before posting questions to the group please read:
http://groups.google.com/group/transfer-dev/web/how-to-ask-support-questions-on-transfer
You received this message because you are subscribed to the Google Groups
"transfer-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/transfer-dev?hl=en
-~----------~----~----~----~------~----~------~--~---