Re: [HACKERS] odd error creating index in -current...

Lists: pgsql-hackers
From: The Hermit Hacker <scrappy(at)hub(dot)org>
To: pgsql-hackers(at)postgresql(dot)org
Subject: odd error creating index in -current...
Date: 1998-02-20 04:58:08
Message-ID: Pine.BSF.3.96.980220005044.226q-100000@thelab.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers


Someone want to tell me why the below CREATE INDEX fails?

I've tried everything I can think of, and can't get that INDEX to be
created :(

-- $Id: groups.psql,v 1.2 1997/08/14 20:05:08 shevett Exp $
-- postgresql 6.1
--
-- Host: localhost Database: pts
----------------------------------------------------------

--
-- Table structure for table 'groups'
--
CREATE TABLE groups (
id CHAR(10) NOT NULL,
detail CHAR(30)
) \g

CREATE INDEX groups_indx ON groups ( id ) \g

--
-- Dumping data for table 'groups'
--

INSERT INTO groups (id, detail) VALUES ('PTS','PTS Development')\g


From: Brett McCormick <brett(at)work(dot)chicken(dot)org>
To: The Hermit Hacker <scrappy(at)hub(dot)org>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] odd error creating index in -current...
Date: 1998-02-20 05:28:00
Message-ID: 199802200528.VAA11926@abraxas.scene.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers


I may be missing something, but because char_ops has been left out?

On Fri, 20 February 1998, at 00:58:08, The Hermit Hacker wrote:

> Someone want to tell me why the below CREATE INDEX fails?
>
> I've tried everything I can think of, and can't get that INDEX to be
> created :(
>
> -- $Id: groups.psql,v 1.2 1997/08/14 20:05:08 shevett Exp $
> -- postgresql 6.1
> --
> -- Host: localhost Database: pts
> ----------------------------------------------------------
>
>
> --
> -- Table structure for table 'groups'
> --
> CREATE TABLE groups (
> id CHAR(10) NOT NULL,
> detail CHAR(30)
> ) \g
>
> CREATE INDEX groups_indx ON groups ( id ) \g
>
>
> --
> -- Dumping data for table 'groups'
> --
>
> INSERT INTO groups (id, detail) VALUES ('PTS','PTS Development')\g
>
>


From: The Hermit Hacker <scrappy(at)hub(dot)org>
To: Brett McCormick <brett(at)work(dot)chicken(dot)org>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] odd error creating index in -current...
Date: 1998-02-20 05:35:13
Message-ID: Pine.BSF.3.96.980220013446.226u-100000@thelab.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Thu, 19 Feb 1998, Brett McCormick wrote:

>
> I may be missing something, but because char_ops has been left out?

Last I knew, it wasn't required...it auto-detects it, and is, in
fact, the recommended method of creating an index...

>
> On Fri, 20 February 1998, at 00:58:08, The Hermit Hacker wrote:
>
> > Someone want to tell me why the below CREATE INDEX fails?
> >
> > I've tried everything I can think of, and can't get that INDEX to be
> > created :(
> >
> > -- $Id: groups.psql,v 1.2 1997/08/14 20:05:08 shevett Exp $
> > -- postgresql 6.1
> > --
> > -- Host: localhost Database: pts
> > ----------------------------------------------------------
> >
> >
> > --
> > -- Table structure for table 'groups'
> > --
> > CREATE TABLE groups (
> > id CHAR(10) NOT NULL,
> > detail CHAR(30)
> > ) \g
> >
> > CREATE INDEX groups_indx ON groups ( id ) \g
> >
> >
> > --
> > -- Dumping data for table 'groups'
> > --
> >
> > INSERT INTO groups (id, detail) VALUES ('PTS','PTS Development')\g
> >
> >
>

Marc G. Fournier
Systems Administrator @ hub.org
primary: scrappy(at)hub(dot)org secondary: scrappy(at){freebsd|postgresql}.org


From: "Vadim B(dot) Mikheev" <vadim(at)sable(dot)krasnoyarsk(dot)su>
To: The Hermit Hacker <scrappy(at)hub(dot)org>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] odd error creating index in -current...
Date: 1998-02-20 05:38:26
Message-ID: 34ED16D2.FD0D4100@sable.krasnoyarsk.su
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

The Hermit Hacker wrote:
>
> Someone want to tell me why the below CREATE INDEX fails?
>
> I've tried everything I can think of, and can't get that INDEX to be
> created :(
>
> -- $Id: groups.psql,v 1.2 1997/08/14 20:05:08 shevett Exp $
> -- postgresql 6.1
^^^
??? NOT NULL appeared in 6.2...

6.3:
vac=> CREATE TABLE groups (
vac-> id CHAR(10) NOT NULL,
vac-> detail CHAR(30)
vac-> ) \g
CREATE
vac=>
vac=> CREATE INDEX groups_indx ON groups ( id ) \g
CREATE
vac=>
vac=> INSERT INTO groups (id, detail) VALUES ('PTS','PTS Development')\g
INSERT 43725 1

Vadim


From: "Vadim B(dot) Mikheev" <vadim(at)sable(dot)krasnoyarsk(dot)su>
To: Brett McCormick <brett(at)work(dot)chicken(dot)org>
Cc: The Hermit Hacker <scrappy(at)hub(dot)org>, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] odd error creating index in -current...
Date: 1998-02-20 05:53:52
Message-ID: 34ED1A6F.CC00E955@sable.krasnoyarsk.su
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Brett McCormick wrote:
>
> I may be missing something, but because char_ops has been left out?

It's good in _most_ cases to let all XXX_ops be left out :)
Indices know what to use...

Vadim


From: Brett McCormick <brett(at)work(dot)chicken(dot)org>
To: "Vadim B(dot) Mikheev" <vadim(at)sable(dot)krasnoyarsk(dot)su>
Cc: The Hermit Hacker <scrappy(at)hub(dot)org>, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] odd error creating index in -current...
Date: 1998-02-20 06:24:23
Message-ID: 199802200624.WAA12177@abraxas.scene.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers


I'm still living in pre 6.0 days, then.. are indices on type oid
atttributes used as well?

On Fri, 20 February 1998, at 12:53:52, Vadim B. Mikheev wrote:

> It's good in _most_ cases to let all XXX_ops be left out :)
> Indices know what to use...
>
> Vadim


From: "Vadim B(dot) Mikheev" <vadim(at)sable(dot)krasnoyarsk(dot)su>
To: Brett McCormick <brett(at)work(dot)chicken(dot)org>
Cc: The Hermit Hacker <scrappy(at)hub(dot)org>, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] odd error creating index in -current...
Date: 1998-02-20 07:08:27
Message-ID: 34ED2BEB.A83B91B5@sable.krasnoyarsk.su
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Brett McCormick wrote:
>
> I'm still living in pre 6.0 days, then.. are indices on type oid
> atttributes used as well?
>
> On Fri, 20 February 1998, at 12:53:52, Vadim B. Mikheev wrote:
>
> > It's good in _most_ cases to let all XXX_ops be left out :)
> > Indices know what to use...

They should... Just try.

Vadim


From: The Hermit Hacker <scrappy(at)hub(dot)org>
To: "Vadim B(dot) Mikheev" <vadim(at)sable(dot)krasnoyarsk(dot)su>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] odd error creating index in -current...
Date: 1998-02-20 12:48:49
Message-ID: Pine.NEB.3.95.980220074731.11437B-100000@hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Fri, 20 Feb 1998, Vadim B. Mikheev wrote:

> The Hermit Hacker wrote:
> >
> > Someone want to tell me why the below CREATE INDEX fails?
> >
> > I've tried everything I can think of, and can't get that INDEX to be
> > created :(
> >
> > -- $Id: groups.psql,v 1.2 1997/08/14 20:05:08 shevett Exp $
> > -- postgresql 6.1
> ^^^
> ??? NOT NULL appeared in 6.2...
>
> 6.3:
> vac=> CREATE TABLE groups (
> vac-> id CHAR(10) NOT NULL,
> vac-> detail CHAR(30)
> vac-> ) \g
> CREATE
> vac=>
> vac=> CREATE INDEX groups_indx ON groups ( id ) \g
> CREATE
> vac=>
> vac=> INSERT INTO groups (id, detail) VALUES ('PTS','PTS Development')\g
> INSERT 43725 1

Strange...I'm going to re-check this all through tonight when I get home,
since I've obviously got something messed up on my computer...

As for the 'NOT NULL'...I'm trying to get the PostgreSQL stuff up to date
in PTS for v6.3 ... I added in the NOT NULL last night...