Aug 13 (Reuters) - Canada's main stock index edged higher on Friday, lifted by mining shares, and was set to deliver its fourth straight weekly gain on the back of a strong batch of corporate earnings.

* The materials sector, which includes precious and base metals miners and fertilizer companies, added 1.1% as gold futures rose 0.8% to $1,762.1 an ounce.

* At 9:39 a.m. ET (13:39 GMT), the Toronto Stock Exchange's S&P/TSX composite index was up 10.3 points, or 0.05%, at 20,530.9.

* Producer prices in Canada most likely rose by 0.1% in July from June, led mainly by higher prices for energy and petroleum products, and chemicals and chemical products, Statistics Canada said.

* The largest percentage gainer on the TSX was Pretium Resources Inc, which jumped 17.6% after the miner reported upbeat second-quarter results.

* Its gains were followed by Lithium Americas Corp, which rose 5.3% after two brokerages lifted price targets on the lithium miner's stock.

* The energy sector dropped 0.6% as U.S. crude prices were down 0.1% a barrel, while Brent crude lost 0.2%.

* The financials sector gained 0.1%. The industrials sector fell 0.1%.

* On the TSX, 130 issues were higher, while 91 issues declined for a 1.43-to-1 ratio favouring gainers, with 16.85 million shares traded.

* Mattress retailer Sleep Country Canada Holdings Inc fell 2.1%, the most on the TSX, and the second biggest decliner was ATS Automation Tooling Systems Inc, down 1.6%.

* The most heavily traded shares by volume were Enbridge Inc , Fortis Inc and Manulife Financial Corp .

* The TSX posted 18 new 52-week highs and no new lows.

* Across all Canadian issues there were 106 new 52-week highs and nine new lows, with total volume of 28.24 million shares. (Reporting by Amal S in BengaluruEditing by Sriraj Kalluvila)