Re: [SQL] [ADMIN] plpgsql question

2005-08-30 Thread Michael Fuhr
On Tue, Aug 30, 2005 at 12:15:54PM -0400, Postgres Admin wrote: Can I do something like this: It's good that you gave an example, but it would also be good to give a summary of what you're trying to do and what trouble you're having so people don't have to guess. CREATE TABLE sample (id

Re: [SQL] [ADMIN] plpgsql question

2005-08-30 Thread Postgres Admin
I have data in one table called articles and I would like to make a function in which takes certain data from it and display the results. Example: CREATE TABLE articles ( article_id serial, title varchar(200), posted timestamp, article_subject varchar(200), article_body text, allow_comments

Re: [SQL] [ADMIN] plpgsql question

2005-08-30 Thread Michael Fuhr
On Tue, Aug 30, 2005 at 01:59:04PM -0400, Postgres Admin wrote: ERROR: set-valued function called in context that cannot accept a set CONTEXT: PL/pgSQL function article_sample line 10 at return next You don't show what you did to get this error, but I'd guess you called the function like