dbTalk Databases Forums  

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

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss Re: [BUGS] BUG #2274: Error in 'CREATE DOMAIN' SQL command in dump file in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] BUG #2274: Error in 'CREATE DOMAIN' SQL command in dump file - 02-20-2006 , 05:16 PM






"Alexander Galler" <galler (AT) kuzbass (DOT) net> writes:
Quote:
psql:test.dump:415: ERROR: type "tsinterval" does not exist

In dump file:
CREATE DOMAIN address_period_tsi
AS public.tsinterval
NOT NULL
DEFAULT '(-infinity..infinity)'::tsinterval;
I can't duplicate this --- for me, pg_dump produces

CREATE DOMAIN address_period_tsi AS public.tsinterval NOT NULL DEFAULT '(-infinity..infinity)':ublic.tsinterval;

which reloads just fine. Could you provide a more complete example?

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings


Reply With Quote
  #2  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] BUG #2274: Error in 'CREATE DOMAIN' SQL command in dump file - 02-21-2006 , 12:12 PM






Alexander Galler <galler (AT) kuzbass (DOT) net> writes:
Quote:
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)':ublic.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':ublic.ltree;

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.