Re: Add Large Object support to database programmatically
От | Richard Huxton |
---|---|
Тема | Re: Add Large Object support to database programmatically |
Дата | |
Msg-id | 4AA03A70.6050809@archonet.com обсуждение исходный текст |
Ответ на | Add Large Object support to database programmatically (acordner <alan.cordner@hartscientific.com>) |
Список | pgsql-general |
acordner wrote: > .CommandText = "SET search_path = public; CREATE DOMAIN lo AS > pg_catalog.oid;" _ > & "CREATE FUNCTION lo_oid(lo) RETURNS pg_catalog.oid > AS" _ > & "'SELECT $1::pg_catalog.oid' LANGUAGE SQL STRICT > IMMUTABLE;" _ > & "CREATE FUNCTION lo_manage() RETURNS > pg_catalog.trigger" _ > & "AS '$libdir/lo' LANGUAGE C;" > Call .Execute > End With > Set cmdCommand = Nothing > End Function > > However, when I execute this code, I get a SQL "syntax error at or near > '$libdir/lo'" and the contrib module is not loaded. Turn statement logging on server-side and you'll see what's happening. My VB isn't the greatest, but doesn't the "_" join together multi-line strings? In which case you don't need the "&". However, it looks to me like the actual problem is that you're missing some spaces/newlines and getting SQL like: RETURNS pg_catalog.triggerAS '$libdir/lo' Turn up your server logging and you'll know for sure. -- Richard Huxton Archonet Ltd
В списке pgsql-general по дате отправления: