[GENERAL] Recursive CTE in function problem

2016-02-04 Thread Doug Kyle
Postgres 9.4.1, with these tables: grpl_collection.collections id | integer | name | text| parent | bigint | (An adjacency list representing a collections hierarchy) grpl_collection.collections_copy_map id | integer | collection | bigint | copy | bigint | (map a

Re: [GENERAL] Recursive CTE in function problem

2016-02-04 Thread David G. Johnston
On Thu, Feb 4, 2016 at 12:37 PM, Doug Kyle wrote: > But when I use it as a function it always returns false: > > CREATE OR REPLACE FUNCTION grpl_collection.copy_in_collection_name(cpid > bigint, colname text) > RETURNS boolean > LANGUAGE plpgsql > AS $function$ > BEGIN >

Re: [GENERAL] Recursive CTE in function problem

2016-02-04 Thread Doug Kyle
ugh, simple syntax screw up. Thanks David. On 02/04/2016 02:45 PM, David G. Johnston wrote: On Thu, Feb 4, 2016 at 12:37 PM, Doug Kyle >wrote: But when I use it as a function it always returns false: CREATE OR REPLACE FUNCTION