From: Fred Parkinson <FredP@abag.ca.gov>
To: pgsql-admin@postgresql.org
To: Kevin Grittner <Kevin.Grittner@wicourts.gov>
Subject: Re: Can't query the sequence table of a serial primary key.
Date: Thu, 23 Feb 2012 12:22:52 -0800
Message-ID: <4F462F9C020000A70001B6C7@gwia1.abag.ca.gov> (raw)
In-Reply-To: <4F4640810200002500045AD6@gw.wicourts.gov>
References: <4F461C53020000A70001B6BB@gwia1.abag.ca.gov>
<4F4640810200002500045AD6@gw.wicourts.gov>
Thanks everyone for your replies.
In my original post I failed to EXACTLY reproduce the problem, in that capital letters were involved which I left out of the description.
For example, the id had been set up as "ID" serial primary key, and the sequencer was consequently named 'mytable_ID_seq' not 'mytable_id_seq' (he was stabbed to death by details!)
When I ran the select statement I DID reproduce the capital letters as they existed, but got the error I described.
In the effort to create a test sample I left out all caps and made everything lower case.
Viola! The problem disappeared! Sanity restored (for now).
That's it, no more caps for me!
Thanks again for everyone's efforts to help.
Fred
>>> "Kevin Grittner" <Kevin.Grittner@wicourts.gov> 02/23/2012 11:34 AM >>>
"Fred Parkinson" <FredP@abag.ca.gov> wrote:
> When I do \d I see the table and the sequencer under 'List of
> relations'. But when I run select * from mytable_id_seq;
> postgresql responds with: relation 'mytable_id_seq' does not
> exist.
It works for me. Can you provide a small self-contained test case
which demonstrates the problem?
Hopefully you are aware of these functions, which might be easier:
http://www.postgresql.org/docs/8.4/interactive/functions-sequence.html
-Kevin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: FredP@abag.ca.gov, Kevin.Grittner@wicourts.gov
Subject: Re: Can't query the sequence table of a serial primary key.
In-Reply-To: <4F462F9C020000A70001B6C7@gwia1.abag.ca.gov>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox