[GENERAL] cost variable into function

2008-10-19 Thread Alain Roger
Hi, i created a stored procedure (function) under postgreSQL and when i checked deeper into my DB, this is what i get: END; $BODY$ LANGUAGE 'plpgsql' VOLATILE COST 100; ALTER FUNCTION myschema.get_count_languages(character varying) OWNER TO myuser; to what corresponds the parameter C

Re: [GENERAL] cost variable into function

2008-10-19 Thread Grzegorz Jaƛkiewicz
that's for planner to know. You can estimate cost in there, of that procedure. I usually use select * from something limit 1 times number of rows that procedure returns on average. But I am sure, some more smart people here would have different ways to set it.

Re: [GENERAL] cost variable into function

2008-10-19 Thread hubert depesz lubaczewski
On Sun, Oct 19, 2008 at 04:03:47PM +0200, Alain Roger wrote: > i created a stored procedure (function) under postgreSQL and when i checked > deeper into my DB, this is what i get: > > END; > $BODY$ > LANGUAGE 'plpgsql' VOLATILE > COST 100; > ALTER FUNCTION myschema.get_count_languages(

[GENERAL] Problem removing Sequence in Postgresql 8.0.3

2008-10-19 Thread That Fat Guy
Hi I'm trying to remove a sequence from my production database (postgresql 8.0.3 running on RHEL4 PowerPC), but am getting an error that doesn't make sense. When I run: DROP SEQUENCE tbl_id_seq1 RESTRICT; I get the following error: ERROR: cannot drop sequence tbl_id_seq1 because t

Re: [GENERAL] Problem removing Sequence in Postgresql 8.0.3

2008-10-19 Thread Alvaro Herrera
That Fat Guy wrote: > Hi > > I'm trying to remove a sequence from my production database (postgresql > 8.0.3 running on RHEL4 PowerPC), but am getting an error that doesn't > make sense. When I run: In 8.2 and later (or was it 8.1?) there is ALTER SEQUENCE ... OWNED BY to solve this problem. In