bigserial problem - Mailing list pgadmin-support

From rich.morrison@atxinc.com
Subject bigserial problem
Date
Msg-id OF4B2E698C.FAFBEAB8-ON8525708A.004F43D8-8525708A.0050BF1C@atxforms.com
Whole thread Raw
Responses Re: bigserial problem
List pgadmin-support
<br /><font face="sans-serif" size="2">pgAdmin reports a SQL error when attempting to add a bigserial column to an
existingtable.</font><br /><br /><br /><font face="sans-serif" size="2">server: CentOS 4.1 and Postgre 7.4</font><br
/><fontface="sans-serif" size="2">client: XP Sp 2 and pgAdmin 1.2.2</font><br /><br /><font face="sans-serif"
size="2">Addingthe column produces this SQL statement:</font><br /><br /><font face="sans-serif" size="2">CREATE
SEQUENCEpublic.tblenglish_in_trnas_id_seq;</font><br /><font face="sans-serif" size="2">ALTER TABLE
tblenglish_in</font><br/><font face="sans-serif" size="2">   ADD COLUMN trnas_id int8;</font><br /><font
face="sans-serif"size="2">ALTER TABLE tblenglish_in</font><br /><font face="sans-serif" size="2">   ALTER COLUMN
trnas_idSET DEFAULT nextval('public.tblenglish_in_trnas_id_seq'::text);</font><br /><font face="sans-serif"
size="2">INSERTINTO pg_depend(classid, objid, objsubid, refclassid, refobjid, refobjsubid, deptype)</font><br /><font
face="sans-serif"size="2">SELECT cl.oid, seq.oid, 0, cl.oid, 17154::oid, attnum, 'i'</font><br /><font
face="sans-serif"size="2">  FROM pg_class cl, pg_attribute, pg_class seq</font><br /><font face="sans-serif" size="2"> 
JOINpg_namespace sn ON sn.OID=seq.relnamespace</font><br /><font face="sans-serif" size="2"> WHERE
cl.relname='pg_class'</font><br/><font face="sans-serif" size="2">  AND seq.rel</font><br /><br /><font
face="sans-serif"size="2">and results in this error:</font><br /><br /><font face="sans-serif" size="2">ERROR:  column
seq.reldoes not exist</font><br /><br /><br /><font face="sans-serif" size="2">If there is a comment, a differene error
results:</font><br/><br /><font face="sans-serif" size="2">CREATE SEQUENCE public.tblenglish_in_trans_id_seq;</font><br
/><fontface="sans-serif" size="2">ALTER TABLE tblenglish_in</font><br /><font face="sans-serif" size="2">   ADD COLUMN
trans_idint8;</font><br /><font face="sans-serif" size="2">ALTER TABLE tblenglish_in</font><br /><font
face="sans-serif"size="2">   ALTER COLUMN trans_id SET DEFAULT
nextval('public.tblenglish_in_trans_id_seq'::text);</font><br/><font face="sans-serif" size="2">INSERT INTO
pg_depend(classid,objid, objsubid, refclassid, refobjid, refobjsubid, deptype)</font><br /><font face="sans-serif"
size="2">SELECTcl.oid, seq.oid, 0, cl.oid, 17154::oid, attnum, 'i'</font><br /><font face="sans-serif" size="2">  FROM
pg_classcl, pg_attribute, pg_class seq</font><br /><font face="sans-serif" size="2">  JOIN pg_namespace sn ON
sn.OID=seq.relnamespace</font><br/><font face="sans-serif" size="2"> WHERE cl.relname='pg_class'</font><br /><font
face="sans-serif"size="2">  AND seq.relCOMMENT ON COLUMN tblenglish_in.trans_id IS 'id of transmission';</font><br
/><br/><br /><font face="sans-serif" size="2">ERROR:  syntax error at or near "ON" at character 530</font><br /><br
/><br/><font face="sans-serif" size="2">It appears that the SQL that pgAdmin is building is cut off. Maybe the buffer
beingwritten to is too small?</font><br /><br /><font face="sans-serif" size="2">Here's the SQL for creating a table
witha bigserial:</font><br /><font face="sans-serif" size="2">CREATE TABLE test</font><br /><font face="sans-serif"
size="2">(</font><br/><font face="sans-serif" size="2">   test bigserial</font><br /><font face="sans-serif" size="2">)
WITHOUTOIDS;</font><br /><br /><font face="sans-serif" size="2">This is much shorter than the otherer SQL
statement.</font><br/><br /><font face="sans-serif" size="2"><br /> Thank you,<br /><br /> Richard Morrison<br /> Sr.
SoftwareEngineer<br /> ATX II, LLC<br /> "In Rich We Trust!"</font> 

pgadmin-support by date:

Previous
From: "Dave Page"
Date:
Subject: Re: Can't create a batch job in pgagent
Next
From: "David Tarico"
Date:
Subject: pgAdmin II