another error perhaps to be enhanced

Started by Joshua D. Drakeover 12 years ago6 messages
#1Joshua D. Drake
jd@commandprompt.com

ERROR: index "foo_idx"

We should probably add the schema.

JD
--
Command Prompt, Inc. - http://www.commandprompt.com/ 509-416-6579
PostgreSQL Support, Training, Professional Services and Development
High Availability, Oracle Conversion, Postgres-XC, @cmdpromptinc
For my dreams of your image that blossoms
a rose in the deeps of my heart. - W.B. Yeats

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#2Michael Glaesemann
grzm@seespotcode.net
In reply to: Joshua D. Drake (#1)
Re: another error perhaps to be enhanced

On Jun 14, 2013, at 13:38, "Joshua D. Drake" <jd@commandprompt.com> wrote:

ERROR: index "foo_idx"

We should probably add the schema.

I've noticed similar issues with functions. I'd like to see those schema-qualified as well.

JD
--
Command Prompt, Inc. - http://www.commandprompt.com/ 509-416-6579
PostgreSQL Support, Training, Professional Services and Development
High Availability, Oracle Conversion, Postgres-XC, @cmdpromptinc
For my dreams of your image that blossoms
a rose in the deeps of my heart. - W.B. Yeats

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#3Peter Geoghegan
pg@heroku.com
In reply to: Joshua D. Drake (#1)
Re: another error perhaps to be enhanced

I think you'll need to better describe what you mean here.

--
Peter Geoghegan

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#4Joshua D. Drake
jd@commandprompt.com
In reply to: Peter Geoghegan (#3)
Re: another error perhaps to be enhanced

On 06/14/2013 10:47 AM, Peter Geoghegan wrote:

I think you'll need to better describe what you mean here.

postgres=# create schema foo;
CREATE SCHEMA
postgres=# create schema bar;
CREATE SCHEMA
postgres=# create table foo.foo(id serial);
NOTICE: CREATE TABLE will create implicit sequence "foo_id_seq" for
serial column "foo.id"
CREATE TABLE
postgres=# create table bar.bar(id serial);
NOTICE: CREATE TABLE will create implicit sequence "bar_id_seq" for
serial column "bar.id"
CREATE TABLE
postgres=# create index one_idx on foo.foo(id);
CREATE INDEX
postgres=# create index one_idx on bar.bar(id);
CREATE INDEX
postgres=#

Now, with the error previously shown, which one_idx needs to be reindexed?

JD

--
Command Prompt, Inc. - http://www.commandprompt.com/ 509-416-6579
PostgreSQL Support, Training, Professional Services and Development
High Availability, Oracle Conversion, Postgres-XC, @cmdpromptinc
For my dreams of your image that blossoms
a rose in the deeps of my heart. - W.B. Yeats

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#5Peter Geoghegan
pg@heroku.com
In reply to: Joshua D. Drake (#4)
Re: another error perhaps to be enhanced

On Fri, Jun 14, 2013 at 10:54 AM, Joshua D. Drake <jd@commandprompt.com> wrote:

Now, with the error previously shown, which one_idx needs to be reindexed?

Well, you didn't show an actual error message. But if you "\set
VERBOSITY verbose" within psql while connected to a 9.3 server, you'll
get fully qualified details of the constraint blamed for the error, if
any. Example:

postgres=# insert into a(a, b) values (3, 'test');
ERROR: 23505: duplicate key value violates unique constraint "a_pkey"
DETAIL: Key (a)=(3) already exists.
SCHEMA NAME: public
TABLE NAME: a
CONSTRAINT NAME: a_pkey
LOCATION: _bt_check_unique, nbtinsert.c:398

--
Peter Geoghegan

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#6Joshua D. Drake
jd@commandprompt.com
In reply to: Peter Geoghegan (#5)
Re: another error perhaps to be enhanced

On 06/14/2013 11:01 AM, Peter Geoghegan wrote:

On Fri, Jun 14, 2013 at 10:54 AM, Joshua D. Drake <jd@commandprompt.com> wrote:

Now, with the error previously shown, which one_idx needs to be reindexed?

Well, you didn't show an actual error message.

ERROR: index "foo_idx"

Is not an error message? Granted I didn't show the whole error message
but my point is, it should ALWAYS be fully qualified.

But if you "\set
VERBOSITY verbose" within psql while connected to a 9.3 server, you'll
get fully qualified details of the constraint blamed for the error, if
any. Example:

postgres=# insert into a(a, b) values (3, 'test');
ERROR: 23505: duplicate key value violates unique constraint "a_pkey"
DETAIL: Key (a)=(3) already exists.
SCHEMA NAME: public
TABLE NAME: a
CONSTRAINT NAME: a_pkey
LOCATION: _bt_check_unique, nbtinsert.c:398

I was looking in the logs.

JD

--
Command Prompt, Inc. - http://www.commandprompt.com/ 509-416-6579
PostgreSQL Support, Training, Professional Services and Development
High Availability, Oracle Conversion, Postgres-XC, @cmdpromptinc
For my dreams of your image that blossoms
a rose in the deeps of my heart. - W.B. Yeats

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers