From: | "Ken Winter" <ken(at)sunward(dot)org> |
---|---|
To: | "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | "'PostgreSQL pg-general List'" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: In processing DDL, when does pg_catalog get updated? |
Date: | 2005-12-31 18:23:47 |
Message-ID: | 005c01c60e37$57e196f0$6603a8c0@kenxp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Tom ~
Right you are! I added some code to trim off the schema name, and it works
fine.
You also alerted me to the NOTICE facility. (I'm new to PostgreSQL, and
have been learning it in "wade right in" mode rather than properly studying
the whole environment.) I have a "PostgreSQL for Dummies" question about
RAISE NOTICE: Where do I find its output? According to the documentation
(http://www.postgresql.org/docs/7.4/static/plpgsql-errors-and-messages.htmlh
ttp://www.postgresql.org/docs/7.4/static/plpgsql-errors-and-messages.html)
the messages are either "reported to the client, written to the server log,
or both". My database is on a web host (zettai.net) and I'm working on it
via phpPgAdmin. I don't know where to find messages "reported to the
client", and I don't know how to access the system log. Can anyone help?
~ Thanks!
~ Ken
> -----Original Message-----
> From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
> Sent: Friday, December 30, 2005 12:10 PM
> To: Ken Winter
> Cc: 'PostgreSQL pg-general List'
> Subject: Re: [GENERAL] In processing DDL, when does pg_catalog get
> updated?
>
> "Ken Winter" <ken(at)sunward(dot)org> writes:
> > My question is: Why didn't the chunk of "gen_sequences" code that
> consults
> > pg_catalog find a record of "e_mail_address_invisible_id_seq", and
> thereby
> > refrain from trying to create it again?
>
> I added a few "raise notice" commands to your function, and got this:
>
> NOTICE: sub_idcol = invisible_id
> NOTICE: default_exp =
> nextval('public.e_mail_address_invisible_id_seq'::text)
> NOTICE: sequence_name = public.e_mail_address_invisible_id_seq
> NOTICE: not found
> NOTICE: sub_idcol = pop_id
> NOTICE: default_exp = nextval('pop_seq'::text)
> NOTICE: sequence_name = pop_seq
> NOTICE: found
> ERROR: relation "e_mail_address_invisible_id_seq" already exists
> CONTEXT: SQL statement "CREATE SEQUENCE
> public.e_mail_address_invisible_id_seq;"
> PL/pgSQL function "gen_sequences" line 51 at execute statement
>
> The problem seems to be that you're not accounting for a schema name
> possibly appearing in nextval's argument.
>
> regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Pamela | 2005-12-31 18:25:55 | FW: new beginner to postgresql. Looking at it for a church |
Previous Message | Tony Caduto | 2005-12-31 17:19:53 | Re: R: Case sensitivity? - I understood... |