CREATE OR REPLACE FUNCTION test.plot_japanese() RETURNS void LANGUAGE plr IMMUTABLE AS $$ library(showtext) font.paths('R:/') # システムフォルダ以外ã®ãƒ•ã‚©ãƒ³ãƒˆã‚’使ㆠfont.add('hana', 'HanaMinA.ttf') lab = paste(collapse='\n', c( '好ããªæ—¥æœ¬èªžæ›¸ä½“ã§', 'PostgreSQLã¨PL/Rã‹ã‚‰', 'グラフã«æ›¸ãè¾¼ã¿', '', '(フォント:花園明æœï¼‰')) pdf('R:/japanese_from_plr.pdf') par(lheight=1.6) plot(type='n', x=1) showtext.begin() text(cex=3, family='hana', label=lab, x=1, y=1) showtext.end() graphics.off() $$; -- Execute SELECT test.plot_japanese();