Re: [PATCHES] [HACKERS] Patching dblink.c to avoid warning about

2005-10-17 Thread Joe Conway
Bruce Momjian wrote: Joe Conway wrote: Thanks for the review Tom -- as usual, great suggestions. The attached (simpler) patch makes use of your advice. If there are no objections, I'll apply this tomorrow evening. Looks good. Thanks. Committed. Joe ---(end of bro

Re: [PATCHES] Can I use variable to store sql data - II

2005-10-17 Thread Peter Eisentraut
NosyMan wrote: > Can I set id_product from statement 1 to a variable and use that > variable into statements 2. You can't do that in plain SQL, but perhaps you want to look into PL/pgSQL. Please don't post to pgsql-patches unless you have a patch. -- Peter Eisentraut http://developer.postgresq

Re: [PATCHES] [HACKERS] Patching dblink.c to avoid warning about

2005-10-17 Thread Bruce Momjian
Joe Conway wrote: > Tom Lane wrote: > > I think it would be shorter and clearer to write > > > > remoteConn *remconn = NULL; > > ... > > remconn = rconn; > > ... > > remconn->newXactForCursor = TRUE; > > > > Also, you might be able to combine this variable with the existing >

[PATCHES] Can I use variable to store sql data?

2005-10-17 Thread NosyMan
Hi, The scenario: SELECT id_product FROM products WHERE product_code='PRD-030'; Now I want to insert id_product into another table : INSERT INTO product_sales( id_product, sale_date) INSERT INTO product_sales( id_product, sale_date) INSERT INTO product_sales( id_product, sale_date) ---

[PATCHES] Can I use variable to store sql data - II

2005-10-17 Thread NosyMan
Hi, The scenario: 1. SELECT id_product FROM products WHERE product_code='PRD-030'; Now I want to insert id_product into another table : 2. INSERT INTO product_sales( id_product, sale_date) INSERT INTO product_sales( id_product, sale_date) INSERT INTO product_sales( id_product, sale_date)