Re: [BUGS] ALTER TABLE ... OWNER TO does not change ownership recursively

2012-04-26 Thread Tom Lane
Ryan Kelly writes: > It seems that ALTER TABLE ... OWNER TO does not change the ownership of > any inheriting tables. The documentation states: >> If ONLY is specified, only that table is altered. If ONLY is not >> specified, the table and any descendant tables are altered. If you read further (

[BUGS] ALTER TABLE ... OWNER TO does not change ownership recursively

2012-04-26 Thread Ryan Kelly
It seems that ALTER TABLE ... OWNER TO does not change the ownership of any inheriting tables. The documentation states: > If ONLY is specified, only that table is altered. If ONLY is not > specified, the table and any descendant tables are altered. Which to me indicates that ownership should be

Re: [BUGS] ALTER TABLE DISABLE RULE does not work inside of a transaction

2008-12-29 Thread Tom Lane
"Alex Hunsaker" writes: > Namely it does not disable the rule... Enabling inside of the > transaction seems to work though Fixed, thanks ... Index: relcache.c === RCS file: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v retriev

Re: [BUGS] ALTER TABLE DISABLE RULE does not work inside of a transaction

2008-12-29 Thread Alex Hunsaker
On Mon, Dec 29, 2008 at 15:07, Alex Hunsaker wrote: > Namely it does not disable the rule... > Enabling inside of the transaction seems to work though Hrm the above turned out to be false... must have gotten confused when testing with triggers If i turn on RELCACHE_FORCE_RELEASE or CLOBBER_CACH

[BUGS] ALTER TABLE DISABLE RULE does not work inside of a transaction

2008-12-29 Thread Alex Hunsaker
Namely it does not disable the rule... Enabling inside of the transaction seems to work though Tried both CVS and 8.3.5... create table trule (a int); insert into trule (a) values (1); create rule trule_rule as on update to trule do instead nothing; update trule set a = 2; UPDATE 0 begin; ALTER

Re: [BUGS] ALTER TABLE name RENAME TO new_name; does not work immediately

2008-08-11 Thread megous
On 9 Srp, 19:38, [EMAIL PROTECTED] (Gregory Stark) wrote: > <[EMAIL PROTECTED]> writes: > > ALTER TABLE name RENAME TO new_name; > > ALTER TABLE new_name > >   RENAME COLUMN x TO y; > > ... > > I think the issue might be reproducible by creating table with a lot > > of rows, setting high work_mem a

Re: [BUGS] ALTER TABLE name RENAME TO new_name; does notworkimmediately

2008-08-10 Thread Gregory Stark
"Tom Lane" <[EMAIL PROTECTED]> writes: > Apparently, rd_indexattr needs to get cleared someplace where it > isn't being cleared right now. I'm sure this is related to the > fancy dance we do for pg_class reindexing, but not sure yet where > to fix it. Yeah, doing the equivalent of this in gdb se

Re: [BUGS] ALTER TABLE name RENAME TO new_name; does notworkimmediately

2008-08-10 Thread Tom Lane
Gregory Stark <[EMAIL PROTECTED]> writes: > Uhm. Is it possible we're mistakenly doing a HOT update because we're lying > about what indexes exist? Yup, exactly. Here's my proposed fix... regards, tom lane Index: src/backend/catalog/index.c ==

Re: [BUGS] ALTER TABLE name RENAME TO new_name; does notworkimmediately

2008-08-10 Thread Gregory Stark
"Tom Lane" <[EMAIL PROTECTED]> writes: > Also, I can still reproduce it with just REINDEX TABLE pg_class instead > of REINDEX DATABASE. Ah, I had tried just a reindex xxx but not a reindex pg_class. * reindex_index will attempt to update the pg_class rows for the relation * an

Re: [BUGS] ALTER TABLE name RENAME TO new_name; does notworkimmediately

2008-08-10 Thread Tom Lane
I wrote: > What I suspect is we've broken the logic that manages REINDEX applied to > pg_class itself. Hm, this is a HOT bug. (Unless the OP found it on something older than 8.3, in which case we might have more than one issue involved.) What I'm seeing is that when heap_update checks to see if t

Re: [BUGS] ALTER TABLE name RENAME TO new_name; does notworkimmediately

2008-08-10 Thread Tom Lane
Gregory Stark <[EMAIL PROTECTED]> writes: > On the other hand the problem does not occur if the CREATE TABLE is in the > same session. Nor if the REINDEX DATABASE is skipped. It appears that you have to do the RENAME TABLE in the same session as the REINDEX DATABASE. Furthermore, the failure then

Re: [BUGS] ALTER TABLE name RENAME TO new_name; does notworkimmediately

2008-08-10 Thread Gregory Stark
"Alvaro Herrera" <[EMAIL PROTECTED]> writes: >> > I could not reproduce it here, but didn't try very hard. >> >> Did you try running the script he provided? It happened for me first try. > > Yep. No luck. I didn't try changing the args in generate_series though. > > How many CPUs are you runnin

Re: [BUGS] ALTER TABLE name RENAME TO new_name; does not workimmediately

2008-08-09 Thread Alvaro Herrera
Gregory Stark escribió: > Either a) we're not actually issuing a CommandCounterIncrement() or b) the > command is not being properly marked as non-read-only when the update happens > or, uh, c) something else is broken with generating or executing those > invalidation messages. Well, the CommandC

Re: [BUGS] ALTER TABLE name RENAME TO new_name; does not workimmediately

2008-08-09 Thread Gregory Stark
"Alvaro Herrera" <[EMAIL PROTECTED]> writes: > Gregory Stark escribió: >> >> <[EMAIL PROTECTED]> writes: >> >> > Here is a script that is able to reproduce the problem (on my machine >> > anyway), you may need to play with the number of rows or workmem >> > settings to be able to reproduce it: >

Re: [BUGS] ALTER TABLE name RENAME TO new_name; does not work immediately

2008-08-09 Thread Alvaro Herrera
Gregory Stark escribió: > > <[EMAIL PROTECTED]> writes: > > > Here is a script that is able to reproduce the problem (on my machine > > anyway), you may need to play with the number of rows or workmem > > settings to be able to reproduce it: > > Egads, i can confirm that this script reproduces t

Re: [BUGS] ALTER TABLE name RENAME TO new_name; does not work immediately

2008-08-09 Thread Gregory Stark
<[EMAIL PROTECTED]> writes: > Here is a script that is able to reproduce the problem (on my machine > anyway), you may need to play with the number of rows or workmem > settings to be able to reproduce it: Egads, i can confirm that this script reproduces the problem on my machine as well: ALTER

Re: [BUGS] ALTER TABLE name RENAME TO new_name; does not work immediately

2008-08-09 Thread megous
Here is a script that is able to reproduce the problem (on my machine anyway), you may need to play with the number of rows or workmem settings to be able to reproduce it: regards, Ondrej Jirman #!/bin/sh dropdb bug createdb bug psql bug << EOF CREATE TABLE xxx (id SERIAL, col1 TEXT, col2

Re: [BUGS] ALTER TABLE name RENAME TO new_name; does not work immediately

2008-08-09 Thread Gregory Stark
<[EMAIL PROTECTED]> writes: > ALTER TABLE name RENAME TO new_name; > ALTER TABLE new_name > RENAME COLUMN x TO y; > ... > I think the issue might be reproducible by creating table with a lot > of rows, setting high work_mem and issuing the commands, but I did not > try to reproduce it this way.

Re: [BUGS] ALTER TABLE name RENAME TO new_name; does not work immediately

2008-08-09 Thread megous
Oh, I've forgot to mention that the commands are issued from the script. When issued by hand there is no problem at all (probably because I'm a slow typist :-D). Thank you and regards, Ondrej Jirman -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subs

[BUGS] ALTER TABLE name RENAME TO new_name; does not work immediately

2008-08-09 Thread megous
Hello, I don't know if this is expected behaviour or not, but I've found that this sequence of commands does not work all the time: ALTER TABLE name RENAME TO new_name; ALTER TABLE new_name RENAME COLUMN x TO y; It usually works with small work_mem and maintenance_work_mem values. If I increas

Re: [BUGS] ALTER TABLE table RENAME COLUMN x TO y

2003-08-14 Thread Tom Lane
"Donald Fraser" <[EMAIL PROTECTED]> writes: > When issuing the following type of command: > ALTER TABLE table RENAME COLUMN x TO y > The column name change is not cascading through to RULEs on a VIEW. More specifically, INSERTs and UPDATEs contained in rules don't have their target column names ad

[BUGS] ALTER TABLE table RENAME TO sould change also sequence name

2003-08-14 Thread Mirek Hankus
Postgresql 7.3.4 on Linux. Problem is that when you create a table with serial type, it creates sequence with coresponding name. Then you can grant some rights to it (table and sequence), and after that change table name. From now on you will not be able to restore such database, because name of s

[BUGS] ALTER TABLE table RENAME COLUMN x TO y

2003-08-14 Thread Donald Fraser
PostgreSQL version 7.3.3, GCC 2.96, Redhat 7.2 When issuing the following type of command: ALTER TABLE table RENAME COLUMN x TO y The column name change is not cascading through to RULEs on a VIEW. For example I had a column named "id_security" in TABLE "tbl_valrule" and I had a RULE on a view th

Re: [BUGS] ALTER TABLE table RENAME TO sould change also sequence name

2003-08-12 Thread Bruce Momjian
TODO has: o Have ALTER TABLE rename SERIAL sequences However, I didn't realize the seriousness of the problem. --- Mirek Hankus wrote: > > Postgresql 7.3.4 on Linux. > > Problem is that when you create a table wi

Re: [HACKERS] [BUGS] ALTER TABLE table RENAME COLUMN x TO y

2003-08-11 Thread Bruce Momjian
Tom Lane wrote: > "Donald Fraser" <[EMAIL PROTECTED]> writes: > > When issuing the following type of command: > > ALTER TABLE table RENAME COLUMN x TO y > > The column name change is not cascading through to RULEs on a VIEW. > > More specifically, INSERTs and UPDATEs contained in rules don't have

Re: [BUGS] alter table

2003-03-21 Thread Tom Lane
"Diego Cattelan" <[EMAIL PROTECTED]> writes: > gesart=3D>alter table a add column c integer references xxx(id); > =20 > NOTICE: ALTER TABLE will create implicit trigger(s) for FOREIGN KEY check(s) > ALTER TABLE > =20 > The table xxx doesn't exist. > =20 > Is that correct or postgreSQL shoul

[BUGS] alter table

2003-03-21 Thread Diego Cattelan
Title: Messaggio template1=#create database gesart; template1=#create user xuser; template1=# \c gesart xuser   gesart=>create table a(n integer);   CREATE TABLE gesart=>alter table a add column c integer references xxx(id);   NOTICE: ALTER TABLE will create implicit trigger(s) for FOR

[BUGS] ALTER TABLE Problem

2002-03-19 Thread dirk . jacobs
Hi, - I tried to execute following SQL alter table PRICEGROUP add FOREIGN KEY  ("PARENT") REFERENCES "PRICEGROUP" ON DELETE CASCADE this gives an error ALTER TABLE: column "PARENT" referenced in foreign key constraint does not exist (7) while I'm sure that the column exists and is Non null. I'm

Re: [BUGS] Alter table add column ignores default

2001-05-11 Thread Tom Lane
Vince Vielhaber <[EMAIL PROTECTED]> writes: > If this: > alter table foobar add column address varchar(50) default 'none'; > is the incorrect syntax, why does it not fail or at least give a > warning? Because it's incompletely implemented: the parser takes the full syntax but the ALTER TABLE rout

Re: [BUGS] Alter table add column ignores default

2001-05-11 Thread Vince Vielhaber
On 8 May 2001, Nabil Sayegh wrote: > On 05 May 2001 12:23:37 -0400, [EMAIL PROTECTED] wrote: > > Vince Vielhaber ([EMAIL PROTECTED]) reports a bug with a severity of 3 > > The lower the number the more severe it is. > > > > Short Description > > Alter table add column ignores default > > > > Long

Re: [BUGS] Alter table add column ignores default

2001-05-11 Thread Vince Vielhaber
On 8 May 2001, Nabil Sayegh wrote: > On 08 May 2001 10:31:17 -0400, Vince Vielhaber wrote: > > > http://hermes.swu.bg/postgres/postgres/sql-altertable.htm > > > The correct syntax is: > > > ALTER TABLE foobar add column address varchar(50); > > > ALTER TABLE foobar alter column address set defaul

Re: [BUGS] Alter table add column ignores default

2001-05-08 Thread Nabil Sayegh
On 08 May 2001 10:31:17 -0400, Vince Vielhaber wrote: > > http://hermes.swu.bg/postgres/postgres/sql-altertable.htm > > The correct syntax is: > > ALTER TABLE foobar add column address varchar(50); > > ALTER TABLE foobar alter column address set default 'none'; > > If this: > > alter table fooba

Re: [BUGS] Alter table add column ignores default

2001-05-08 Thread Nabil Sayegh
On 05 May 2001 12:23:37 -0400, [EMAIL PROTECTED] wrote: > Vince Vielhaber ([EMAIL PROTECTED]) reports a bug with a severity of 3 > The lower the number the more severe it is. > > Short Description > Alter table add column ignores default > > Long Description > Alter table add column ignores the

[BUGS] Alter table add column ignores default

2001-05-05 Thread pgsql-bugs
Vince Vielhaber ([EMAIL PROTECTED]) reports a bug with a severity of 3 The lower the number the more severe it is. Short Description Alter table add column ignores default Long Description Alter table add column ignores the default values in both v7.0x and 7.1. In the example code the table is

[BUGS] alter table rename bug

2001-04-27 Thread Boulat Khakimov
Hi, I've discovered a bug in Postgres. When you rename a table, the corresponding triggers for that table are not updated. For example: CREATE TABLE tblParent ( ID SERIAL NOT NULL, Name text, PRIMARY KEY (ID) ); CREATE TABLE tblChild ( ID int4 NOT NULL, email text, FOREIGN KEY

Re: [BUGS] alter table rename and ruminations on referential integrity

2001-02-13 Thread Stephan Szabo
> It appears that the triggers were never updated to now refer to 'old' > instead of to current_usage when it was renamed, but were still > associated with 'old' for purposes of dropping them. (i presume this > is because the triggers were attached to 'old' by oid, which didnt > change when it wa

[BUGS] alter table rename and ruminations on referential integrity

2001-02-13 Thread pgsql-bugs
Dave E Martin ([EMAIL PROTECTED]) reports a bug with a severity of 3 The lower the number the more severe it is. Short Description alter table rename and ruminations on referential integrity Long Description PostgreSQL 7.0.3 on i686-pc-linux-gnu, compiled by gcc 2.95.2 I suspect symptoms of thi

Re: [BUGS] alter table rename missing numeric type

2000-12-03 Thread Tom Lane
> template1=> insert into n2 values(154.23); > INSERT 360703 1 > template1=> alter table n1 rename to oldn1; > RENAME > template1=> alter table n2 rename to n1; > RENAME > template1=> insert into n1 values(154.23); > ERROR: overflow on numeric ABS(value) >= 10^2 for field with precision 4 scale 2

[BUGS] alter table rename missing numeric type

2000-12-03 Thread pgsql-bugs
Vince Vielhaber ([EMAIL PROTECTED]) reports a bug with a severity of 3 The lower the number the more severe it is. Short Description alter table rename missing numeric type Long Description I start with table n1 which contains only a numeric type 4,2. Inserting a value larger than 99.99 causes

Re: [BUGS] ALTER TABLE

2000-08-03 Thread Tom Lane
Stephan Szabo <[EMAIL PROTECTED]> writes: > I believe these are all the cases I saw of heap_openr with no lock > and no check in the actual trigger functions (patch to > hopefully elog(ERROR) instead of crashing attached). > [ patch snipped ] We had a discussion about that on 11-July and the cons

Re: [BUGS] ALTER TABLE

2000-08-03 Thread Tom Lane
Stephan Szabo <[EMAIL PROTECTED]> writes: >> Yes, this is a known bug. Two bugs actually, first being that the >> trigger definitions don't track the rename (they should probably be >> storing OID not relname, although that would complicate dump/restore). > I do plan on trying to move all the ta

Re: [BUGS] ALTER TABLE

2000-08-03 Thread Tom Lane
Gena Gurchonok <[EMAIL PROTECTED]> writes: > When I renaming table using ALTER TABLE, > it doesn't change table name in RI triggers. This results in backend > crash due to invalid arguments for RI_Check trigger procedure. Yes, this is a known bug. Two bugs actually, first being that the trigger

Re: [BUGS] ALTER TABLE

2000-08-03 Thread Bruce Momjian
I can confirm that this is a bug, and crashes in the current development tree. > > POSTGRESQL BUG REPORT TEMPLATE > >

[BUGS] ALTER TABLE

2000-08-03 Thread Gena Gurchonok
POSTGRESQL BUG REPORT TEMPLATE Your name : Gena Gurchonok Your email address : [EMAIL PROTECTED] S

[BUGS] alter table and inherits generate inconsistent data

2000-03-17 Thread Peter Hunter
POSTGRESQL BUG REPORT TEMPLATE Your name : Peter Hunter Your email address : [EMAIL PRO