ALT*R T*BL* S*T / DR*P N*T N*LL patch - 4th try

Started by Christopher Kings-Lynneover 24 years ago3 messagespatches
Jump to latest
#1Christopher Kings-Lynne
chriskl@familyhealth.com.au

OK,

This is an identical patch to what I've submitted four times now and hasn't
come through...

This is a complete patch to implement changing the nullability of an
attribute. It passes all regressions tests. It includes its own quite
comprehensive regression test suite and documentation. It prevents you from
modifying system tables, non-table relations, system attributes, primary
keys and columns containing NULLs. It fully supports inheritance. I have
made some small changes to TODO to reflect this new functionality, plus
corrected some other TODO items.

The only thing I haven't checked are my ecpg changes. I would like someone
with more ecpg experience to check my preproc.y changes.

Please consider for 7.3!

Since I have now added two new large functions to command.c, I propose that
sometime before 7.3 beta, command.c is refactored and an alter.c created.
There is lots of common code in the Alter* functions that should be reused.

Chris

Attachments:

alternotnull.txt.gzapplication/x-gzip; name=alternotnull.txt.gzDownload
#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Christopher Kings-Lynne (#1)
Re: ALT*R T*BL* S*T / DR*P N*T N*LL patch - 4th try

"Christopher Kings-Lynne" <chriskl@familyhealth.com.au> writes:

This is a complete patch to implement changing the nullability of an
attribute.

This looks good but I'm afraid it's out of step with recent changes
for schema support. In particular, heap_openr is now The Wrong Thing
to use for anything except access to system relations. As of CVS tip,
all the AlterTable routines use OID parameters not name parameters
to identify the table to work on. Could I ask you to update the patch
to match the coding style in CVS tip?

The only thing I haven't checked are my ecpg changes. I would like someone
with more ecpg experience to check my preproc.y changes.

I'd suggest leaving ecpg to Michael; he seems to prefer to do those
updates himself.

Since I have now added two new large functions to command.c, I propose that
sometime before 7.3 beta, command.c is refactored and an alter.c created.
There is lots of common code in the Alter* functions that should be reused.

This is definitely a good thing to do. I think someone else (John
Gray?) had already volunteered, but I have not seen a patch go by.

regards, tom lane

#3Christopher Kings-Lynne
chriskl@familyhealth.com.au
In reply to: Tom Lane (#2)
Re: ALT*R T*BL* S*T / DR*P N*T N*LL patch - 4th try

This looks good but I'm afraid it's out of step with recent changes
for schema support. In particular, heap_openr is now The Wrong Thing
to use for anything except access to system relations. As of CVS tip,
all the AlterTable routines use OID parameters not name parameters
to identify the table to work on. Could I ask you to update the patch
to match the coding style in CVS tip?

Yep - already done - I was just about to resubmit it.

The only thing I haven't checked are my ecpg changes. I would like someone
with more ecpg experience to check my preproc.y changes.

I'd suggest leaving ecpg to Michael; he seems to prefer to do those
updates himself.

Hmmm...I'll just leave it out then i guess...

Regards,

Chris