Cast and Schemas don't work as expected

Started by Eduardo Sternalmost 23 years ago5 messages
#1Eduardo Stern
eduardo@stern.com.br

The CREATE CAST command is't supporting schemas on the type parameters.

A query such as:

CREATE CAST (public.lo AS oid) WITH FUNCTION newoid (public.lo) AS IMPLICIT;

Gives an error. And the problem happens when you create a CAST without the
schema notation, and then try to do a dump/restore cycle.

[]s

#2Christopher Kings-Lynne
chriskl@familyhealth.com.au
In reply to: Eduardo Stern (#1)
Re: Cast and Schemas don't work as expected

That's probably because CASTS are database-wide and are not in schemas.

Chris

Show quoted text

-----Original Message-----
From: pgsql-hackers-owner@postgresql.org
[mailto:pgsql-hackers-owner@postgresql.org]On Behalf Of Eduardo Stern
Sent: Sunday, 19 January 2003 11:07 PM
To: pgsql-hackers@postgresql.org
Subject: [HACKERS] Cast and Schemas don't work as expected

The CREATE CAST command is't supporting schemas on the type parameters.

A query such as:

CREATE CAST (public.lo AS oid) WITH FUNCTION newoid (public.lo)
AS IMPLICIT;

Gives an error. And the problem happens when you create a CAST without the
schema notation, and then try to do a dump/restore cycle.

[]s

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Eduardo Stern (#1)
Re: Cast and Schemas don't work as expected

"Eduardo Stern" <eduardo@stern.com.br> writes:

The CREATE CAST command is't supporting schemas on the type parameters.

Yah. Are you enough of a yacc wizard to fix the reduce/reduce conflicts
that arise when GenericType is made to include qualified names? I spent
a couple days beating on that, without success.

regards, tom lane

#4Philip Warner
pjw@rhyme.com.au
In reply to: Tom Lane (#3)
Re: Cast and Schemas don't work as expected

At 11:52 PM 23/01/2003 -0500, Tom Lane wrote:

Yah. Are you enough of a yacc wizard to fix the reduce/reduce conflicts
that arise when GenericType is made to include qualified names? I spent
a couple days beating on that, without success.

Did this ever get resolved? I'm still seeing the error in 7.3.2 using
output from pg_dump.

We probably need to at least make the dump files valid -- even if only by
using search_path, and not putting the schema name on the type.

Any other options?

----------------------------------------------------------------
Philip Warner | __---_____
Albatross Consulting Pty. Ltd. |----/ - \
(A.B.N. 75 008 659 498) | /(@) ______---_
Tel: (+61) 0500 83 82 81 | _________ \
Fax: (+61) 03 5330 3172 | ___________ |
Http://www.rhyme.com.au | / \|
| --________--
PGP key available upon request, | /
and from pgp5.ai.mit.edu:11371 |/

#5Tom Lane
tgl@sss.pgh.pa.us
In reply to: Philip Warner (#4)
Re: Cast and Schemas don't work as expected

Philip Warner <pjw@rhyme.com.au> writes:

Did this ever get resolved?

Which, the CREATE CAST-doesn't-take-qualified-names business? Yes,
that's fixed in CVS.

regards, tom lane