We propose to extend the Gor'kov type calculation of the Ginzburg-Landau
functional to the case of a superconductor with a planar defect. We have
derived the spatial dependence of the coherence length and the penetration
depth. We have applied our results to the pinning of a single vortex by a
planar defect. The interaction between the vortex and the defect is
attractive. For YBaCuO, the vortex core is pinned on the planar
defect at temperature T = 50 K. However, at T = 10 K it is pinned at a distance of
29 Å from the defect if we do not include the thermal fluctuations, but this trend
does not change if we include them.