Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Robert Klemme Newsgroups: comp.databases.postgresql Subject: Re: Returning a table in SQL Date: Wed, 27 Aug 2014 08:36:33 +0200 Lines: 32 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net QTtZmA4FXvf11m78QfIX/wT5ld6W+8Wjeq5WG3szkJWybnusQ= Cancel-Lock: sha1:3wLVFa90lOLsqpLhB6BZTqWNH7w= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.0 In-Reply-To: Xref: csiph.com comp.databases.postgresql:591 On 26.08.2014 23:34, Harry Tuttle wrote: > Robert Klemme wrote on 26.08.2014 22:28: >> It seems a simpler variant would be >> >> select * >> from some_report('Customer','2014-08-01','2014-08-08') >> >> Or does that not work? (I do have no PG available for testing right >> now.) > > Yes that would work just as well. > I assumed the example was a stripped down example of a large query that > would benefit from the CTE. Yeah, that could be. > Btw: if you don't have Postgres available you can use http://sqlfiddle.com Cool! Thanks for the hint! Afterwards I remembered that I frequently used something like this for test data generation: select 'foo ' || generate_series as x from generate_series(1, 10) so it should work. :-) Kind regards robert