Re: Pagesize question



On Sat, 22 Apr 2006 22:03:38 -0400, jared.r.richardson@xxxxxxxxx <jared.r.richardson@xxxxxxxxx> wrote:
1) create the database like this:
createdb test_ingres_ruby_driver

Your default page size can be found in $II_SYSTEM/ingres/files/config.dat. It seems to be 2K. You can change it e.g. with the cbf menu based utility.

Here you create test_ingres_ruby_driver and it defaults to 2K pages.

2) try to change the page_size
sysmod test_ingres_ruby_driver -page_size=8192

Here you've changed the page size of your system catalog, but not of the test_ingres_ruby_driver database or of the default value for the installation.

3) Create my table
CREATE TABLE posts (id TABLE_KEY NOT NULL with system_maintained,
author_id integer, title char(255), type char(255), body
text,constraint pk_posts primary key (id))"

Looks good.

4) Alter the table:
ALTER TABLE posts ADD taggings_count integer
but I still get the same error:
'Alter Table ADD/DROP column support for pages greater than 2k only.
What obvious thing am I missing? :)

The page size it an attribute of a table, not of a database. You can change the default or specify the size you want at table creation time. But the 2K page default is what you have right now for the user database.

btw, as long as I have the gurus on the line (grin), the original test
wants to run this bit of SQL:

ALTER TABLE posts ADD taggings_count integer DEFAULT 0

but the ingres alter table command doesn't seem to like the DEFAULT = 0
bit. Is there another way to set default values?

You probably get error E_US0F11, which is confusing. The ALTER TABLE command only logically changes the table definition; it doesn't change the underlying table (rows are revised when they are modified). This places some restrictions on things like nullability and default settings. This is covered in the manual, but could be a lot clearer.

Regards, Mike T.

--
Michael Touloumtzis
Ingres Corporation
.



Relevant Pages

  • Setting column Width of new column
    ... I have an application that needs to add a column to one of its database ... I am doing this with the "ALTER TABLE" command and setting the new ... entry is not space-filled to the maximum column size? ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Pagesize question
    ... As to CBF, is there any kind of cheat sheet on what key strokes it uses? ... CREATE TABLE posts (id TABLE_KEY NOT NULL with system_maintained, ... 'Alter Table ADD/DROP column support for pages greater than 2k only. ... The page size it an attribute of a table, not of a database. ...
    (comp.databases.ingres)
  • RE: HELP Modify Structure via automation
    ... Connect to your database via the OleDB driver and issue an ALTER TABLE command. ...
    (microsoft.public.fox.programmer.exchange)
  • Re: Altering Table - Adding Primary Key With References
    ... I think you're expecting too much functionality from the command ... This clause in the alter table command gives you the possibility to add a ... PRIMARY KEY in the CREATE TABLE command also sets the field as a primairy ... Relations between tables can be defined in the database but they are not ...
    (microsoft.public.fox.vfp.dbc)
  • Increase tablespace size
    ... I need to increase the tablespace size for SYSTEM/TEMP and user defined ... Adding one more datafile to tablespace with ALTER TABLESPACE command ... Increasing size of existing database file size with ALTER DATABASE ...
    (comp.databases.oracle.server)