Re: Insert Data Into Tables Linked by Foreign Key

From: Grzegorz Jaśkiewicz <gryzman(at)gmail(dot)com>
To: "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Insert Data Into Tables Linked by Foreign Key
Date: 2010-01-04 13:38:11
Message-ID: 2f4958ff1001040538r2644adebtf54104a8c834970c@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

insert into foo(a) with recursive t(n) AS (SELECT 10 AS n UNION ALL
SELECT n-1 FROM t WHERE n > 0) select n from t;

works on 8.5

--
GJ

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Chris Withers 2010-01-04 13:38:45 Re: how do I disable automatic start on mac os x?
Previous Message A. Kretschmer 2010-01-04 13:23:35 Re: Insert Data Into Tables Linked by Foreign Key