Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VfGV4-0004GT-Nn for pgsql-sql@arkaria.postgresql.org; Sat, 09 Nov 2013 21:55:26 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VfGV4-0005lp-7l for pgsql-sql@arkaria.postgresql.org; Sat, 09 Nov 2013 21:55:26 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VfGV2-0005lg-40 for pgsql-sql@postgresql.org; Sat, 09 Nov 2013 21:55:24 +0000 Received: from sam.nabble.com ([216.139.236.26]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VfGUv-0005v9-0Z for pgsql-sql@postgresql.org; Sat, 09 Nov 2013 21:55:23 +0000 Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1VfGUu-0003Y3-2u for pgsql-sql@postgresql.org; Sat, 09 Nov 2013 13:55:16 -0800 Date: Sat, 9 Nov 2013 13:55:16 -0800 (PST) From: David Johnston To: pgsql-sql@postgresql.org Message-ID: <1384034116071-5777610.post@n5.nabble.com> In-Reply-To: <527E968E.8010807@gmail.com> References: <527D3F2A.6060504@gmail.com> <05069440-C45F-4763-81A8-E14B5CB1CCB5@excoventures.com> <527E968E.8010807@gmail.com> Subject: Re: How to script inserts where id is needed as fk MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: 3.7 (+++) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-sql Precedence: bulk Sender: pgsql-sql-owner@postgresql.org Michael Schmidt-2 wrote > To extend my scenario a little bit i have a third level called > 'Incredient' and they need the Article id. I dont think this will work > anymore with the with clause. Any new approaches? Why don't you just use a procedural language function? plpgsql should be sufficient for most requirements. David J. -- View this message in context: http://postgresql.1045698.n5.nabble.com/How-to-script-inserts-where-id-is-needed-as-fk-tp5777525p5777610.html Sent from the PostgreSQL - sql mailing list archive at Nabble.com. -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql