* TSX rises 29.60 points, or 0.23 percent, to 12,788.25 * Seven of 10 main index sectors advance * Gold producers climb 2.2 percent * BlackBerry jumps after report of strategic interest, analyst upgrade By John Tilak TORONTO, Oct 7 (Reuters) - Canada's main stock index rose on Monday after a partial U.S. government shutdown boosted bullion's safe-haven appeal and caused a jump in gold-mining stocks. The shutdown neared its second week and highlighted a political standoff over U.S. debt and budget levels. With no resolution on the horizon, U.S. lawmakers braced for an Oct. 17 deadline to increase the country's borrowing power or risk default. The Toronto market outperformed the S&P 500, gaining for a second straight session. "Overall this is a market that is trying to move ahead," said Elvis Picardo, strategist and vice president of research at Global Securities in Vancouver. "It points to the fact that investors are willing to take some risk." Investors certainly do not expect the worst-case scenario of a U.S. default to materialize, he added. "It's a bit of an ostrich-in-the-sand type of attitude." The Toronto Stock Exchange's S&P/TSX composite index closed up 29.60 points, or 0.23 percent, at 12,788.25. Seven of the 10 main sectors on the index were higher. A 2.2 percent jump in gold producers helped boost the materials sector, which includes mining stocks. "Gold stocks seem to be quite undervalued," Picardo said. "Some of the money is flowing into that sector purely based on the uptick in gold prices." The price of bullion rose more than 1 percent. Barrick Gold Corp added 1.4 percent to C$18.80, and Goldcorp Inc was up 1.2 percent at C$26.05. Industrials climbed 0.5 percent, with Canadian National Railway Co gaining 1.2 percent to C$107.24, and Canadian Pacific Railway Ltd advancing 2.2 percent to C$131.84. BlackBerry jumped 4.1 percent to C$8.20 on news of potential interest from strategic buyers and an analyst upgrade of the company's stock.