On Thursday, June 16, 2011 5:52:43 am Stefan Keller wrote:
> Hi Tom
>
>
> Then I used pgAdminIII to look for the pkey index and there was
> nothing. That was and still is actually the problem.
>
> When I subsequently created an index
> CREATE INDEX ON mytable2(id);
> ...or two (:->)
> CREATE
On Jun 16, 2011, at 6:52 AM, Stefan Keller wrote:
> IMO this decision is actually questionable.
Agreed. One should not have to look at constraints to figure out if there's an
index. One should be able to check that directly from the list of indexes. I
would think this is really obvious.
(But t
Hi Tom
2011/6/15 Tom Lane :
> Stefan Keller writes:
>> My explanation is that the message (saying that an index was
>> implicitly created) is simply wrong.
>
> The correct explanation is that you're misinterpreting whatever output
> you're looking at.
Pls. don't treat inquirers like this - but t
On Tuesday, June 14, 2011 3:31:12 pm Stefan Keller wrote:
> Hi Thom
>
> 2011/6/14 Thom Brown :
> > Shouldn't you be looking for mytable2_pkey?
>
> Yes; but that was my typo. I tried it several times on two tables.
> My explanation is that the message (saying that an index was
> implicitly created
Stefan Keller writes:
> My explanation is that the message (saying that an index was
> implicitly created) is simply wrong.
The correct explanation is that you're misinterpreting whatever output
you're looking at. Every unique or pkey constraint has an underlying
index --- the index is the imple
Hi Thom
2011/6/14 Thom Brown :
> Shouldn't you be looking for mytable2_pkey?
Yes; but that was my typo. I tried it several times on two tables.
My explanation is that the message (saying that an index was
implicitly created) is simply wrong.
Yours, S.
--
Sent via pgsql-general mailing list (pg
On 14 June 2011 06:39, Stefan Keller wrote:
> Hi
>
> I observed some strange behaviour when adding a primary key with ALTER TABLE:
>
> Given CREATE TABLE mytable1 (id serial, name text);
> I filled it with data then did a
> CREATE TABLE mytable2 AS SELECT * FROM mytable1;
> ALTER TABLE mytable2
Hi
I observed some strange behaviour when adding a primary key with ALTER TABLE:
Given CREATE TABLE mytable1 (id serial, name text);
I filled it with data then did a
CREATE TABLE mytable2 AS SELECT * FROM mytable1;
ALTER TABLE mytable2 ADD PRIMARY KEY(id);
The last command reports - as usual