Connecting Tech Pros Worldwide Help | Site Map
 
 
LinkBack Thread Tools Search this Thread
  #1  
Old November 22nd, 2005, 08:49 AM
Rajesh Kumar Mallah
Guest
 
Posts: n/a
Default Functions in CHECK constraint not getting dumped before tables.


Greetings!

It is found that pg_dump does not dump function referred in CHECK
constraint definations before dumping the table defination . As a result
the tables
do not get restored due to lack of defined functions.

Is it something that will be worked upon in future ?


regds
mallah.

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match




  #2  
Old November 22nd, 2005, 08:49 AM
Tom Lane
Guest
 
Posts: n/a
Default Re: Functions in CHECK constraint not getting dumped before tables.

> It is found that pg_dump does not dump function referred in CHECK[color=blue]
> constraint definations before dumping the table defination . As a result
> the tables
> do not get restored due to lack of defined functions.[/color]
[color=blue]
> Is it something that will be worked upon in future ?[/color]

This is fixed in CVS tip.

regards, tom lane

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

http://archives.postgresql.org

  #3  
Old November 22nd, 2005, 08:52 AM
Rajesh Kumar Mallah
Guest
 
Posts: n/a
Default Re: Functions in CHECK constraint not getting dumped before

Rajesh Kumar Mallah wrote:
[color=blue]
> Tom Lane wrote:
>[color=green][color=darkred]
>>>It is found that pg_dump does not dump function referred in CHECK
>>>constraint definations before dumping the table defination . As a result
>>>the tables
>>>do not get restored due to lack of defined functions.
>>>
>>>[/color]
>>
>>
>>[color=darkred]
>>>Is it something that will be worked upon in future ?
>>>
>>>[/color]
>>
>>This is fixed in CVS tip.
>>
>>[/color]
>
> Yes it did solve that problem.
> another problem that i am facing is during pg_dump i get warning
> like:[/color]


This problem was also solved . The problem was that the corruption
was in template1 and i was looking at a different database.

i finally reset the template1 by using methods described in


Adventures in PostgreSQL
Episode 1: Restoring a Corrupted Template1 using Template0 , May 2002
Josh Berkus.

Regds
mallah.
[color=blue]
>
> pg_dump: WARNING: owner of function "txtidx_in" appears to be invalid
> pg_dump: WARNING: owner of function "txtidx_out" appears to be invalid
> pg_dump: WARNING: owner of function "qtxt_in" appears to be invalid
> pg_dump: WARNING: owner of function "qtxt_out" appears to be invalid
> pg_dump: WARNING: owner of function "mqtxt_in" appears to be invalid
> pg_dump: WARNING: owner of function "gtxtidx_in" appears to be invalid
> pg_dump: WARNING: owner of function "gtxtidx_out" appears to be invalid
> pg_dump: WARNING: owner of function "gtxtidx_consistent" appears to be
> invalid
> pg_dump: WARNING: owner of function "gtxtidx_compress" appears to be
> invalid
> pg_dump: WARNING: owner of function "gtxtidx_decompress" appears to be
> invalid
> pg_dump: WARNING: owner of function "gtxtidx_penalty" appears to be
> invalid
> pg_dump: WARNING: owner of function "gtxtidx_picksplit" appears to be
> invalid
> pg_dump: WARNING: owner of function "gtxtidx_union" appears to be invalid
> pg_dump: WARNING: owner of function "gtxtidx_same" appears to be invalid
>
> And in the dump there are lines like:
>
>
> REVOKE ALL ON FUNCTION txtidx_in(opaque) FROM PUBLIC;
> REVOKE ALL ON FUNCTION txtidx_in(opaque) FROM "";
> *SET SESSION AUTHORIZATION "103"; <---------------------------------*
> GRANT ALL ON FUNCTION txtidx_in(opaque) TO PUBLIC;
> RESET SESSION AUTHORIZATION;
>
>
> can you pls tell me how to get rid of the warnings and the invalid
> id "103" in pg_proc i dont see any reference to SYSID 103
> in the columns proowner or the acl columns.
>
> Any other places where i should look?
>
>
> Regds
> Mallah.
>
>[color=green]
>> regards, tom lane
>>
>>---------------------------(end of broadcast)---------------------------
>>TIP 6: Have you searched our list archives?
>>
>> http://archives.postgresql.org
>>
>>
>>[/color]
>[/color]


---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

  #4  
Old November 22nd, 2005, 08:52 AM
Rajesh Kumar Mallah
Guest
 
Posts: n/a
Default Re: Functions in CHECK constraint not getting dumped before


Greetings!

The only issue that i noticed now with pg_dump version 7.5dev
is that create schemas are not dumped before user definations.
which have their search_path set by ALTER USER command.

eg

ALTER USER arvind SET search_path TO 'erp';
ERROR: schema "erp" does not exist

This is relatively harmless to me at least,
but the point is to have pg_dump work without requiring
any manual editing of the dumpfiles :)

Regds
Mallah.





Rajesh Kumar Mallah wrote:
[color=blue]
> Rajesh Kumar Mallah wrote:
>[color=green]
>> Tom Lane wrote:
>>[color=darkred]
>>>> It is found that pg_dump does not dump function referred in CHECK
>>>> constraint definations before dumping the table defination . As a
>>>> result the tables
>>>> do not get restored due to lack of defined functions.
>>>>
>>>
>>>
>>>
>>>
>>>> Is it something that will be worked upon in future ?
>>>>
>>>
>>>
>>> This is fixed in CVS tip.
>>>
>>>[/color]
>>
>> Yes it did solve that problem.
>> another problem that i am facing is during pg_dump i get warning
>> like:[/color]
>
>
>
> This problem was also solved . The problem was that the corruption
> was in template1 and i was looking at a different database.
>
> i finally reset the template1 by using methods described in
>
>
> Adventures in PostgreSQL
> Episode 1: Restoring a Corrupted Template1 using Template0 , May 2002
> Josh Berkus.
>
> Regds
> mallah.
>[color=green]
>>
>> pg_dump: WARNING: owner of function "txtidx_in" appears to be invalid
>> pg_dump: WARNING: owner of function "txtidx_out" appears to be invalid
>> pg_dump: WARNING: owner of function "qtxt_in" appears to be invalid
>> pg_dump: WARNING: owner of function "qtxt_out" appears to be invalid
>> pg_dump: WARNING: owner of function "mqtxt_in" appears to be invalid
>> pg_dump: WARNING: owner of function "gtxtidx_in" appears to be invalid
>> pg_dump: WARNING: owner of function "gtxtidx_out" appears to be invalid
>> pg_dump: WARNING: owner of function "gtxtidx_consistent" appears to
>> be invalid
>> pg_dump: WARNING: owner of function "gtxtidx_compress" appears to be
>> invalid
>> pg_dump: WARNING: owner of function "gtxtidx_decompress" appears to
>> be invalid
>> pg_dump: WARNING: owner of function "gtxtidx_penalty" appears to be
>> invalid
>> pg_dump: WARNING: owner of function "gtxtidx_picksplit" appears to be
>> invalid
>> pg_dump: WARNING: owner of function "gtxtidx_union" appears to be
>> invalid
>> pg_dump: WARNING: owner of function "gtxtidx_same" appears to be invalid
>>
>> And in the dump there are lines like:
>>
>>
>> REVOKE ALL ON FUNCTION txtidx_in(opaque) FROM PUBLIC;
>> REVOKE ALL ON FUNCTION txtidx_in(opaque) FROM "";
>> *SET SESSION AUTHORIZATION "103"; <---------------------------------*
>> GRANT ALL ON FUNCTION txtidx_in(opaque) TO PUBLIC;
>> RESET SESSION AUTHORIZATION;
>>
>>
>> can you pls tell me how to get rid of the warnings and the invalid
>> id "103" in pg_proc i dont see any reference to SYSID 103
>> in the columns proowner or the acl columns.
>>
>> Any other places where i should look?
>>
>>
>> Regds
>> Mallah.
>>
>>[color=darkred]
>>> regards, tom lane
>>>
>>> ---------------------------(end of
>>> broadcast)---------------------------
>>> TIP 6: Have you searched our list archives?
>>>
>>> http://archives.postgresql.org
>>>
>>>
>>>[/color]
>>[/color]
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
>[/color]


---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

  #5  
Old November 22nd, 2005, 08:52 AM
Tom Lane
Guest
 
Posts: n/a
Default Re: Functions in CHECK constraint not getting dumped before

Rajesh Kumar Mallah <mallah@trade-india.com> writes:[color=blue]
> The only issue that i noticed now with pg_dump version 7.5dev
> is that create schemas are not dumped before user definations.
> which have their search_path set by ALTER USER command.[/color]

"dev" how far back? I thought we fixed that a little while ago.
I get a notice not an error:

regression=# create user arvind;
CREATE USER
regression=# ALTER USER arvind SET search_path TO 'erp';
NOTICE: schema "erp" does not exist
ALTER USER
regression=#

regards, tom lane

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

http://archives.postgresql.org

  #6  
Old November 22nd, 2005, 08:52 AM
mallah@trade-india.com
Guest
 
Posts: n/a
Default Re: Functions in CHECK constraint not getting dumped before



yesterdays' lemme do a cvs update :)


regds
mallah.
[color=blue]
> Rajesh Kumar Mallah <mallah@trade-india.com> writes:[color=green]
>> The only issue that i noticed now with pg_dump version 7.5dev
>> is that create schemas are not dumped before user definations.
>> which have their search_path set by ALTER USER command.[/color]
>
> "dev" how far back? I thought we fixed that a little while ago.
> I get a notice not an error:
>
> regression=# create user arvind;
> CREATE USER
> regression=# ALTER USER arvind SET search_path TO 'erp';
> NOTICE: schema "erp" does not exist
> ALTER USER
> regression=#
>
> regards, tom lane[/color]



-----------------------------------------
Over 1,00,000 exporters are waiting for your order! Click below to get
in touch with leading Indian exporters listed in the premier
trade directory Exporters Yellow Pages.
http://www.trade-india.com/dyn/gdh/eyp/



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

http://www.postgresql.org/docs/faqs/FAQ.html

  #7  
Old November 22nd, 2005, 08:52 AM
mallah@trade-india.com
Guest
 
Posts: n/a
Default Re: Functions in CHECK constraint not getting dumped before

> Rajesh Kumar Mallah <mallah@trade-india.com> writes:[color=blue][color=green]
>> The only issue that i noticed now with pg_dump version 7.5dev
>> is that create schemas are not dumped before user definations.
>> which have their search_path set by ALTER USER command.[/color]
>
> "dev" how far back? I thought we fixed that a little while ago.
> I get a notice not an error:[/color]


Actually my frontend is 7.5dev but the server is 7.4.1
so its fine i guess.

Regds
Mallah.
[color=blue]
>
> regression=# create user arvind;
> CREATE USER
> regression=# ALTER USER arvind SET search_path TO 'erp';
> NOTICE: schema "erp" does not exist
> ALTER USER
> regression=#
>
> regards, tom lane[/color]



-----------------------------------------
Over 1,00,000 exporters are waiting for your order! Click below to get
in touch with leading Indian exporters listed in the premier
trade directory Exporters Yellow Pages.
http://www.trade-india.com/dyn/gdh/eyp/



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

http://www.postgresql.org/docs/faqs/FAQ.html

 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 205,414 network members.