Index: tests/regressiontests/model_inheritance_regress/tests.py
===================================================================
--- tests/regressiontests/model_inheritance_regress/tests.py	(revision 17594)
+++ tests/regressiontests/model_inheritance_regress/tests.py	(working copy)
@@ -7,13 +7,14 @@
 import datetime
 from operator import attrgetter
 
+from django.db import IntegrityError
 from django.test import TestCase
 
 from .models import (Place, Restaurant, ItalianRestaurant, ParkingLot,
     ParkingLot2, ParkingLot3, Supplier, Wholesaler, Child, SelfRefParent,
     SelfRefChild, ArticleWithAuthor, M2MChild, QualityControl, DerivedM,
     Person, BirthdayParty, BachelorParty, MessyBachelorParty,
-    InternalCertificationAudit, BusStation, TrainStation)
+    InternalCertificationAudit, BusStation, TrainStation, Vehicle, SportsCar)
 
 
 class ModelInheritanceTest(TestCase):
@@ -408,3 +409,12 @@
         )
         self.assertIs(BusStation._meta.pk.model, BusStation)
         self.assertIs(TrainStation._meta.pk.model, TrainStation)
+
+    def test_explicit_parent_pk(self):
+        # Regression test for #17761: save_base() does not properly detect
+        # when parent primary key is uninitialized CharField
+        boxster = SportsCar(pk='WP0CA2983XU622335', convertible=True)
+        try:
+            boxster.save()
+        except IntegrityError:
+            self.fail("IntegrityError should not have occurred.")
Index: tests/regressiontests/model_inheritance_regress/models.py
===================================================================
--- tests/regressiontests/model_inheritance_regress/models.py	(revision 17594)
+++ tests/regressiontests/model_inheritance_regress/models.py	(working copy)
@@ -163,3 +163,10 @@
 
 class TrainStation(Station):
     zone = models.IntegerField()
+
+# Check that child can save with explicit parent pk, #17761
+class Vehicle(models.Model):
+    vin = models.CharField(max_length=17, primary_key=True)
+
+class SportsCar(Vehicle):
+    convertible = models.BooleanField()
