dbTalk Databases Forums  

[BUGS] I find a bug (IMHO)

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


Discuss [BUGS] I find a bug (IMHO) in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Danger Dancer
 
Posts: n/a

Default [BUGS] I find a bug (IMHO) - 01-13-2004 , 06:06 AM






This is a multi-part message in MIME format.
--------------020007010304040301080303
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Sorry for my bad English.
The report in the attach

--------------020007010304040301080303
Content-Type: text/plain;
name="bug.template"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="bug.template"

If PostgreSQL failed to compile on your computer or you found a bug that
is likely to be specific to one platform then please fill out this form
and e-mail it to pgsql-ports (AT) postgresql (DOT) org.

To report any other bug, fill out the form below and e-mail it to
pgsql-bugs (AT) postgresql (DOT) org.

If you not only found the problem but solved it and generated a patch
then e-mail it to pgsql-patches (AT) postgresql (DOT) org instead. Please use the
command "diff -c" to generate the patch.

You may also enter a bug report at http://www.postgresql.org/ instead of
e-mail-ing this form.

================================================== ==========================
POSTGRESQL BUG REPORT TEMPLATE
================================================== ==========================


Your name : Roman
Your email address : rigalkin (AT) luch (DOT) podolsk.ru


System Configuration
---------------------
Architecture (example: Intel Pentium) : Intel Celeron 667

Operating System (example: Linux 2.0.26 ELF) : Linux 2.4.18 (Red Hat 7.3)

PostgreSQL version (example: PostgreSQL-7.4): PostgreSQL-7.4

Compiler used (example: gcc 2.95.2) : gcc 2.97


Please enter a FULL description of your problem:
------------------------------------------------
Sorry, my English very bad, but i try write it
The pg_dump not save changes as ALTER TABLE DROP CONSTRAINT in case with inheritans table


Please describe a way to repeat the problem. Please try to provide a
concise reproducible example, if at all possible:
----------------------------------------------------------------------
#little example
create table a (d int check (d<5));
create table b () inherits (a);
alter table b drop constraint "a_d";
#after it, table b not have any constraint. Try save and restore the structure of database
#in shell:
pg_dump -s -f ~/dbtest -U postgres test
#in psql:
drop database test;
create database test;
#in shell:
psql test postgres < ~/dbtest
#Now, table b have constraint "a_d"



If you know how this problem might be fixed, list the solution below:
---------------------------------------------------------------------
I don't know


--------------020007010304040301080303
Content-Type: text/plain
Content-Disposition: inline
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable


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

--------------020007010304040301080303--


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

Default Re: [BUGS] I find a bug (IMHO) - 01-13-2004 , 09:51 AM






Danger Dancer <rigalkin (AT) luch (DOT) podolsk.ru> writes:
Quote:
#little example
create table a (d int check (d<5));
create table b () inherits (a);
alter table b drop constraint "a_d";
I think the bug is that it allowed you to do this. You should not be
able to drop an inherited constraint, any more than you can drop an
inherited column.

regards, tom lane

---------------------------(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


Reply With Quote
  #3  
Old   
ezra epstein
 
Posts: n/a

Default Re: [BUGS] I find a bug (IMHO) - 01-18-2004 , 03:04 PM



This *might* be a case where you want to define table B using the LIKE
clause, rather than inheritance. Then you could modify table B as you
please: dropping constraints or columns, etc.

== Ezra Epstein



---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo (AT) postgresql (DOT) org so that your
message can get through to the mailing list cleanly

Reply With Quote
  #4  
Old   
Bruce Momjian
 
Posts: n/a

Default Re: [BUGS] I find a bug (IMHO) - 05-27-2004 , 12:40 AM



Tom Lane wrote:
Quote:
Danger Dancer <rigalkin (AT) luch (DOT) podolsk.ru> writes:
#little example
create table a (d int check (d<5));
create table b () inherits (a);
alter table b drop constraint "a_d";

I think the bug is that it allowed you to do this. You should not be
able to drop an inherited constraint, any more than you can drop an
inherited column.
Added to TODO:

o Disallow dropping of an inherited constraint

--
Bruce Momjian | http://candle.pha.pa.us
pgman (AT) candle (DOT) pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

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


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.