Skip site navigation (1) Skip section navigation (2)

Re: BUG #2274: Error in 'CREATE DOMAIN' SQL command in dump file

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alexander Galler <galler(at)kuzbass(dot)net>
Cc: pgsql-bugs(at)postgreSQL(dot)org
Subject: Re: BUG #2274: Error in 'CREATE DOMAIN' SQL command in dump file
Date: 2006-02-21 18:11:24
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
Alexander Galler <galler(at)kuzbass(dot)net> writes:
>>> psql:test.dump:415: ERROR:  type "tsinterval" does not exist
>> I can't duplicate this --- for me, pg_dump produces
>> CREATE DOMAIN address_period_tsi AS public.tsinterval NOT NULL DEFAULT '(-infinity..infinity)'::public.tsinterval;
>> which reloads just fine.  Could you provide a more complete example?

> I create database domain_test and use script domain_test.sql. (My 
> database template include seg, ltree, tsearch2, pgstattuple).

Thanks for the test case.  The reason I missed it is that the bug turns
out to depend on the schema path at the time you create the domain, not
only on what pg_dump does.  (It's effectively dumping the default
according to the creation-time search path, rather than the one that
pg_dump wants to use.)  I've committed a fix for 8.1.4.  In the meantime
you can work around it by setting the search path the way pg_dump wants
at the time you create the domain, ie,

	set search_path = my_schema, pg_catalog;

	create domain ... default 'foo'::public.ltree;

			regards, tom lane

In response to

pgsql-bugs by date

Next:From: Qingqing ZhouDate: 2006-02-22 03:17:51
Subject: FATAL: semctl(1672698088, 12, SETVAL, 0) failed
Previous:From: KarunaiMohamed KA.Date: 2006-02-21 18:06:59
Subject: Need Help

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group