Re: BUG #15449: file_fdw using program cause exit code error whenusing LIMIT
От | Thomas Munro |
---|---|
Тема | Re: BUG #15449: file_fdw using program cause exit code error whenusing LIMIT |
Дата | |
Msg-id | CAEepm=21wvBaKY2cbN62xn8JoPygLLhTawK2TkBac8Suw68YBw@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: BUG #15449: file_fdw using program cause exit code error whenusing LIMIT (Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>) |
Ответы |
Re: BUG #15449: file_fdw using program cause exit code error whenusing LIMIT
Re: BUG #15449: file_fdw using program cause exit code error whenusing LIMIT |
Список | pgsql-bugs |
On Fri, Nov 9, 2018 at 6:39 PM Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp> wrote: > Mmm..I didn't get an error at hand on both CentOS7 and High Sierra. > > | $ perl -e 'for (my $i=0; $i< 1000000; $i++) { print "$i\n"; }' | head -5 > ... > | 4 > | $ echo $? > | 0 That's the exit code from head. You can see python or perl's exit code by adding strace in front (on Linux): $ strace python -c "for i in range(1000000): print i" | head -5 ... +++ exited with 1 +++ $ strace perl -e 'for (my $i=0; $i< 1000000; $i++) { print "$i\n"; }' | head -5 ... +++ killed by SIGPIPE +++ > create foreign table ft5 (a text) server svf1 options (program 'ruby -e "for i in 1..1000 do puts i; end"'); > select * from ft5 limit 5; > a > --- > 1 > ... > 5 > (5 rows) > (no error) 1000 is not enough... due to buffering, it works. Try 1000000: postgres=# create foreign table ft5 (a text) server svf1 options (program 'ruby -e "for i in 1..1000000 do puts i; end"'); CREATE FOREIGN TABLE postgres=# select * from ft5 limit 5; ERROR: program "ruby -e "for i in 1..1000000 do puts i; end"" failed DETAIL: child process exited with exit code 1 -- Thomas Munro http://www.enterprisedb.com
В списке pgsql-bugs по дате отправления: