Re: [SQL] help with Postgres function

2004-06-20 Thread Stephan Szabo
On Wed, 16 Jun 2004, ctrl wrote: > CREATE OR REPLACE FUNCTION getNextWebsiteForCrawl(integer) RETURNS > website AS ' > DECLARE > my_record RECORD; > w website%rowtype; > count smallint; You can't safely use a variable named count and the count(*) expression below I think, so you'll want to rename

[SQL] help with Postgres function

2004-06-20 Thread ctrl
Hello. I'd appreciate any help with a function I'm writing. I have a simple table like this: CREATE TABLE websites ( id BIGSERIAL not null primary key, domain character varying(256) NOT NULL, last_fetch timestamp without time zone DEFAULT 'now()', crawl_status smallint not null DEFAULT 1 ); and m