"David M. Richter" <d(dot)richter(at)dkfz-heidelberg(dot)de> writes:
> Select name from patient_view;
> is in reality:
> Select name from (select ...,...,... from basic where xxx=yyy);
> Is that right?
Yup. The rule rewriter just substitutes the view definition as a
subselect.
regards, tom lane