Re: How to get RelationName ?? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: How to get RelationName ??
Date
Msg-id 19974.1079019017@sss.pgh.pa.us
Whole thread Raw
In response to Re: How to get RelationName ??  ("Ramanujam H S Iyengar" <hals_ramu@hotmail.com>)
List pgsql-hackers
"Ramanujam H S Iyengar" <hals_ramu@hotmail.com> writes:
>> The optimizer has no need, ever, to find a relation by name; all it ever
>> sees are predigested relation OIDs.  So you are not making a lot of
>> sense here.  You certainly cannot assume that a search-path lookup is
>> appropriate for a relation that the optimizer is dealing with.

> Iam trying to put in some other module of optimizer that we have developed, 
> which works on relation name and gives the optimal plan. Iam trying to 
> convert the plans given by this(our) optimizer to the
> Plan structure of PostgreSQL. So finally i have to convert the Relation 
> names back to their relOids.

If your optimizer emits unqualified relation names then it is broken,
as it will never be safe to use in the presence of schemas.  People
will not want to use a database that might apply updates meant for
"a.foo" to "b.foo".
        regards, tom lane


pgsql-hackers by date:

Previous
From: Fabien COELHO
Date:
Subject: client side syntax error localisation for psql (v1)
Next
From: Fabien COELHO
Date:
Subject: Re: client side syntax error localisation for psql (v1)