Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / Ingres Topics / October 2005

Tip: Looking for answers? Try searching our database.

[Info-ingres] Bad Constraint?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
martin.bowes@ctsu.ox.ac.uk - 27 Oct 2005 15:16 GMT
Hi Dudes,

I have two installations of II 2.6/0305 (axp.osf/00) with patch 10993
applied.

I have created a database on one and used the same script to create
the database on the other. All of which worked perfectly well - with the
exception of adding the constraints.

The only difference between the two installations - and its a biggy - is
that one uses uppercase column names (sql92 compliant?).

On the one with lowercase names:
alter table current_name
       add constraint pk_current_name PRIMARY KEY (id_number)
       with INDEX = BASE TABLE STRUCTURE

works like a dream.

On the other (with uppercase table and column names), the same
command is greeted with:
E_US0F0A line 1, Syntax error on 'STRUCTURE'.  The correct syntax
is:
   ALTER TABLE tablename
        ADD [CONSTRAINT constraint_name] constraint_clause
      | DROP CONSTRAINT constraint_name RESTRICT | CASCADE
      | ADD [COLUMN] columnname format [default_clause]
[null_clause]
   [column_constraint]
  | DROP [COLUMN] column_name RESTRICT | CASCADE

I can only assume the uppercase column names is beating this. I've
tried experimenting with the case of the names but to no avail.

Anyone got any idea? or an IDEA? or what about an iDeA?

Martin Bowes
--
Random Titus Quote #22:
No problem is so big and difficult that it can't be blamed on somebody
else.
m.touloumtzis@gmail.com - 29 Oct 2005 00:19 GMT
Martin,

I've seen a problem with BASE TABLE STRUCTURE caused by the fact that
that is, for the parser, a triple keyword. The parse problem caused the
syntax to be accepted/rejected based on whether there was white space
or ; after the word STRUCTURE. This is a bug, of course, and has been
fixed. IIRC this was in Ingres r3, so maybe not applicable to your
issue, but since no one else is taking the bait ... ;)

MikeT
Signature

Michael Touloumtzis
Ingres Development
Computer Associates

martin.bowes@ctsu.ox.ac.uk - 31 Oct 2005 16:56 GMT
Hi Mike,

Not quite right, but pretty close. I raised the problem with the local Tech
Support and this is what they found...

The constraint is okay if you use index="BASE TABLE STRUCTURE"
Note the Double Quotes.

However, and this is a beaut! - Having put the constraint in place an
attempt to copy the table with copydb generates a SIGSEGV.
rat.ingres> copydb rep_dest CURRENT_NAME
INGRES COPYDB Copyright 2003 Computer Associates Intl, Inc.
Unload directory is '/usr1/install/ingres/Replicator/test_1'.
Reload directory is '/usr1/install/ingres/Replicator/test_1'.
There is one table owned by user 'INGRES'.
Exiting . . .

due to
Segmentation Violation (SIGSEGV)

@PC=3ff800d8bd4,PS=8,PV=3ff800d8b80,GP=14000dd90,SP=11fffb2
30,VFP=11fffb230,RA=12001684c,v0=11fffb738
a0-5[0,1,0,1400044b9,0,140004142]
t0-
11[80,0,11fffb75e,0,0,11fffb75c,7f,1,22203d20584544,0,42,45534142]
s0-5[11fffb640,11fffb738,4,140005a18,0,140004488]

Please contact your Technical Support representative.
Segmentation fault

Isnt that fun!

Marty
--
Random Duckman Quote #102:
Cornfed: Uh Oh.
Duckman: 'Uh Oh' as in 'Nice Work?'
Cornfed: No, as in 'You're screwed.'
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.