Received: from localhost (unknown [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id A0A812E01BF for ; Sun, 27 Jan 2008 15:16:30 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 92402-01-4 for ; Sun, 27 Jan 2008 15:16:16 -0400 (AST) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.159]) by postgresql.org (Postfix) with ESMTP id 2F8612E008D for ; Sun, 27 Jan 2008 15:16:24 -0400 (AST) Received: by fg-out-1718.google.com with SMTP id 22so1438647fge.23 for ; Sun, 27 Jan 2008 11:16:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:cc:in-reply-to:references:content-type:date:message-id:mime-version:x-mailer:content-transfer-encoding; bh=0SOAD1Zxbta08HXze3m1c/6RkUeIsM8wuTSwQZDbUec=; b=FddsRzEmwUvYR1OjeIQomHlR+44AJX8GvcwgJnzYxWLvuRTFPr6s4u3XiiE9SGWm9b4ryFjuqDcAlLWeqYluQ6ygQcRJb0Iw1EcdZFjviuD6RrfT5oUaSZWtXn/uW4LA4ZzQJAvr7KmlaAxV07uR7vJRNVIUA5LoLam+iUFtvmA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:cc:in-reply-to:references:content-type:date:message-id:mime-version:x-mailer:content-transfer-encoding; b=jP9AtQ0mFcgL+9xBowo+BAKVXtvVwVQ/wakgSz7z2/W9ojhGXYG1COsar3kfFzmH5JcgYnCpF9gHArFDbmmC9Nl5g2dmxXP7XWpcqoyODnzs9NczVhU6bWwWW8wja9DGNo2bUfqXEJUZyyIDY64S5Vro+akvNWoTn3UTmWls758= Received: by 10.78.204.1 with SMTP id b1mr6162746hug.73.1201461383020; Sun, 27 Jan 2008 11:16:23 -0800 (PST) Received: from ?192.168.1.102? ( [87.206.206.120]) by mx.google.com with ESMTPS id f7sm932429nfh.38.2008.01.27.11.16.21 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 27 Jan 2008 11:16:22 -0800 (PST) Subject: Re: Slow set-returning functions From: Marcin =?UTF-8?Q?St=C4=99pnicki?= To: Dean Rasheed Cc: pgsql-performance@postgresql.org In-Reply-To: References: <47935C0C.4090908@enterprisedb.com> <10405.1200853835@sss.pgh.pa.us> Content-Type: text/plain Date: Sun, 27 Jan 2008 20:16:20 +0100 Message-Id: <1201461380.19607.6.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.12.0 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200801/247 X-Sequence-Number: 28486 Dnia 27-01-2008, N o godzinie 17:29 +0000, Dean Rasheed pisze: > The CONTEXT is very useful, particularly when functions call other > functions, since it gives the call stack (presumably only for SQL and > PL/pgSQL functions). For top-level queries I would ideally like the > CONTEXT to log the SQL being executed, but I couldn't figure out how > to access that information. > > Anyway, I'd be interested to know if anyone has thought about doing > anything like this before and if anyone else might find this useful. > > Dean I'd love to see that. The mentioned PREPARE workaround doesn't seem to work when executed function calls for example three another (or I don't know how to use it in such situation) - and is generally painful to use. I'm afraid I can't help you much (besides testing) but I'd be more than interested in such improvement. Regards, Marcin