Search Postgresql Archives

C function fails afeter create extension but ok after reconnect

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

I have a C function that works fine in all cases except if I try to run it after create extension without reconnecting to the database.

So this fails:

createdb -U postgres -h localhost ttt
psql -U postgres -h localhost ttt
create extension postgis;
create extension pgrouting;
-- create some data
select cost, count(*) from (
select * from pgr_drivingdistance('select id, source, target, 1.0::float8 as cost from ddnoded2', 1274, 10, false, false)
) as foo group by cost order by cost asc;

-- fails with a bad-alloc in boost

\c ttt

select cost, count(*) from (
select * from pgr_drivingdistance('select id, source, target, 1.0::float8 as cost from ddnoded2', 1274, 10, false, false)
) as foo group by cost order by cost asc;

-- run to successful conclusion

Also if a reconnect after the create extension command everything is ok.

Anyone know why this is and how I can fix it ot what to look for in my code?

Thanks,
  -Steve


--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux