Pancreatic cancer (PDAC) has a poor prognosis despite surgical removal and adjuvant therapy. Additionally, the effects of postoperative analgesia with morphine and piritramide on survival among PDAC patients are unknown, as are their interactions with opioid/cannabinoid receptor gene expressions in PDAC tissue. Cancer-specific survival data for 71 PDAC patients who underwent radical surgery followed by postoperative analgesia with morphine (n = 48) or piritramide (n = 23) were therefore analyzed in conjunction with opioid/cannabinoid receptor gene expressions in the patients’ tumors. Receptor gene expressions were determined using the quantitative real-time polymerase chain reaction. Patients receiving morphine had significantly longer cancer-specific survival (CSS) than those receiving piritramide postoperative analgesia (median 22.4 vs. 15 months; p = 0.038). This finding was supported by multivariate modelling (p < 0.001). The morphine and piritramide groups had similar morphine equipotent doses, receptor expression, and baseline characteristics. The opioid/cannabinoid receptor gene expression was analyzed in a group of 130 pancreatic cancer patients. Of the studied receptors, high cannabinoid receptor 2 (CB2) and opioid growth factor receptor (OGFR) gene expressions have a positive influence on the length of overall survival (OS; p = 0.029, resp. p = 0.01). Conversely, high delta opioid receptor gene expression shortened OS (p = 0.043). Multivariate modelling indicated that high CB2 and OGFR expression improved OS (HR = 0.538, p = 0.011, resp. HR = 0.435, p = 0.001), while high OPRD receptor expression shortened OS (HR = 2.264, p = 0.002). Morphine analgesia, CB2, and OGFR cancer tissue gene expression thus improved CSS resp. OS after radical PDAC surgery, whereas delta opioid receptor expression shortened OS.