In a large saucepan, combine sugar, cornstarch, salt, and water. Mix well, then add 1 cup blueberries. Cook over low heat, stirring constantly, until mixture comes to a boil. Boil and stir until very thick, about 15 minutes. Remove from heat.
Stir butter or margarine, lemon juice, and liqueur into mixture. Allow to cool. Stir in remaining 2 cups blueberries. Chill mixture 1 hour. Spoon into pastry shell and refrigerate at least 2 more hours before serving. Garnish with whipped cream if desired.