bigserial problem

From: rich(dot)morrison(at)atxinc(dot)com
To: pgadmin-support(at)postgresql(dot)org
Subject: bigserial problem
Date: 2005-09-28 14:41:57
Message-ID: OF4B2E698C.FAFBEAB8-ON8525708A.004F43D8-8525708A.0050BF1C@atxforms.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

pgAdmin reports a SQL error when attempting to add a bigserial column to
an existing table.

server: CentOS 4.1 and Postgre 7.4
client: XP Sp 2 and pgAdmin 1.2.2

Adding the column produces this SQL statement:

CREATE SEQUENCE public.tblenglish_in_trnas_id_seq;
ALTER TABLE tblenglish_in
ADD COLUMN trnas_id int8;
ALTER TABLE tblenglish_in
ALTER COLUMN trnas_id SET DEFAULT
nextval('public.tblenglish_in_trnas_id_seq'::text);
INSERT INTO pg_depend(classid, objid, objsubid, refclassid, refobjid,
refobjsubid, deptype)
SELECT cl.oid, seq.oid, 0, cl.oid, 17154::oid, attnum, 'i'
FROM pg_class cl, pg_attribute, pg_class seq
JOIN pg_namespace sn ON sn.OID=seq.relnamespace
WHERE cl.relname='pg_class'
AND seq.rel

and results in this error:

ERROR: column seq.rel does not exist

If there is a comment, a differene error results:

CREATE SEQUENCE public.tblenglish_in_trans_id_seq;
ALTER TABLE tblenglish_in
ADD COLUMN trans_id int8;
ALTER TABLE tblenglish_in
ALTER COLUMN trans_id SET DEFAULT
nextval('public.tblenglish_in_trans_id_seq'::text);
INSERT INTO pg_depend(classid, objid, objsubid, refclassid, refobjid,
refobjsubid, deptype)
SELECT cl.oid, seq.oid, 0, cl.oid, 17154::oid, attnum, 'i'
FROM pg_class cl, pg_attribute, pg_class seq
JOIN pg_namespace sn ON sn.OID=seq.relnamespace
WHERE cl.relname='pg_class'
AND seq.relCOMMENT ON COLUMN tblenglish_in.trans_id IS 'id of
transmission';

ERROR: syntax error at or near "ON" at character 530

It appears that the SQL that pgAdmin is building is cut off. Maybe the
buffer being written to is too small?

Here's the SQL for creating a table with a bigserial:
CREATE TABLE test
(
test bigserial
) WITHOUT OIDS;

This is much shorter than the otherer SQL statement.

Thank you,

Richard Morrison
Sr. Software Engineer
ATX II, LLC
"In Rich We Trust!"

Responses

Browse pgadmin-support by date

  From Date Subject
Next Message David Tarico 2005-09-29 23:17:20 pgAdmin II
Previous Message Miha Radej 2005-09-27 08:13:17 cannot disable displaying of system objects