On Sat, Dec 19, 2009 at 7:08 PM, Postgres User
wrote:
> Great call, someone did hose the data. Oddly enough the circular
> reference caused no problem when running the stand alone recursive SQL
> (with clause).
>
no problem. I would advise guarding against circular dependencies
either with a tr
Great call, someone did hose the data. Oddly enough the circular
reference caused no problem when running the stand alone recursive SQL
(with clause).
On Sat, Dec 19, 2009 at 10:41 AM, Merlin Moncure wrote:
> On Sat, Dec 19, 2009 at 1:30 PM, Postgres User
> wrote:
>>
>> Thanks, your syntax does
On Sat, Dec 19, 2009 at 1:30 PM, Postgres User
wrote:
>
> Thanks, your syntax does compile and run.
>
> This is where it gets interesting. With your syntax (and variations
> of it), I'm able to successfully compile and execute. However, as
> soon as I add a dozen rows to the table, the query fai
On Sat, Dec 19, 2009 at 6:56 AM, Merlin Moncure wrote:
> On Sat, Dec 19, 2009 at 1:05 AM, Postgres User
> wrote:
>>
>> BEGIN
>> SELECT array_agg(category_id) INTO cat_list FROM (
>> WITH RECURSIVE subcategory AS
>> (
>> SELECT * FROM category
>>
On Sat, Dec 19, 2009 at 1:05 AM, Postgres User
wrote:
>
> BEGIN
> SELECT array_agg(category_id) INTO cat_list FROM (
> WITH RECURSIVE subcategory AS
> (
> SELECT * FROM category
> WHERE category_id = p_category_id
>
> UNION ALL
>
On Fri, Dec 18, 2009 at 9:53 PM, Merlin Moncure wrote:
> On Fri, Dec 18, 2009 at 11:35 PM, Pavel Stehule
> wrote:
>> 2009/12/19 Postgres User :
>>> Hi,
>>>
>>> I'm trying to write a very simple function statement to select a
>>> single integer field from a table and save it into an int array. Fo
On Fri, Dec 18, 2009 at 11:35 PM, Pavel Stehule wrote:
> 2009/12/19 Postgres User :
>> Hi,
>>
>> I'm trying to write a very simple function statement to select a
>> single integer field from a table and save it into an int array. For
>> some reason I can't seem to find the correct syntax:
>>
>> CR
2009/12/19 Postgres User :
> Hi,
>
> I'm trying to write a very simple function statement to select a
> single integer field from a table and save it into an int array. For
> some reason I can't seem to find the correct syntax:
>
> CREATE TABLE sample (
> id integer
> );
>
> and then within a f
Hi,
I'm trying to write a very simple function statement to select a
single integer field from a table and save it into an int array. For
some reason I can't seem to find the correct syntax:
CREATE TABLE sample (
id integer
);
and then within a function:
my_array int[];
my_array = SELECT A