[Info-ingres] Re: Pagesize question
- From: Betty & Karl Schendel <schendel@xxxxxxxxxxxxxx>
- Date: Sun, 23 Apr 2006 10:37:53 -0400
At 7:03 PM -0700 4/22/06, jared.r.richardson@xxxxxxxxx wrote:
MikeT answered most of your questions. Just to elaborate slightly:
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))"
Add " WITH PAGE_SIZE=8192" (or any other non-2K page size) to create the
table with the desired page size.
Or, given a table that doesn't have the pagesize you want, you can
MODIFY tablename TO RECONSTRUCT WITH PAGE_SIZE=nnn
which rebuilds the table into the proper page size.
(beware, modify statements like MODIFY TO RECONSTRUCT drop any non-
persistent secondary indexes that you created yourself with create index.)
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?
This is sort-of kind-of a bug. For implementation reasons, you can set
an added column to be WITH DEFAULT, but not WITH DEFAULT value.
(It's too hard for DMF to find and materialize the specified default value
when it's retrieving a row that was created before the column was added.)
The sort-of bug is that when you say "WITH DEFAULT", you are in fact saying
"WITH DEFAULT 0" or "WITH DEFAULT ' '" depending on datatype, so ideally
the parser ought to let this case through.
Karl
.
- References:
- Pagesize question
- From: jared.r.richardson@xxxxxxxxx
- Re: Pagesize question
- From: jared.r.richardson@xxxxxxxxx
- Pagesize question
- Prev by Date: Re: [Info-ingres] Re: Pagesize question
- Next by Date: Re: [Info-ingres] Re: Pagesize question
- Previous by thread: Re: Pagesize question
- Next by thread: RE: [Info-ingres] Re: Pagesize question
- Index(es):
Relevant Pages
|