<html>
<head>
</head>
<body style="margin-left: 4px; margin-top: 4px; margin-bottom: 1px; font-weight: normal; font-size: 12pt; font-variant: normal; margin-right: 4px; font-family: Comic Sans MS; line-height: normal; font-style: normal">
<p style="margin-top: 0; margin-bottom: 0">
<font size="3" face="Comic Sans MS">Hi S,</font> </p>
<br>
<p style="margin-top: 0; margin-bottom: 0">
<font size="3" face="Comic Sans MS">Yeah I found all that out while trying to figure things.</font> </p>
<br>
<p style="margin-top: 0; margin-bottom: 0">
<font size="3" face="Comic Sans MS">It's some sort of permissions error, as in the old user/role has the correct permissioms to make it work, since I went back to the original user and all is well again. I'll need to figure it out though.</font> </p>
<br>
<p style="margin-top: 0; margin-bottom: 0">
<font size="3" face="Comic Sans MS">bobb</font> </p>
<br> <br>
<p style="margin-top: 0; margin-bottom: 0">
<br>
<br>
>>> Stephen Woodbridge <woodbri@swoodbridge.com> wrote:<br> </p>
<table border="0" bgcolor="#f3f3f3" style="margin-left: 15px; margin-top: 0; margin-bottom: 0; font-size: 1em; margin-right: 0">
<tr>
<td>
<div style="border-left: solid 1px #050505; padding-left: 7px">
<p style="margin-top: 0; margin-bottom: 0">
Bob,<br><br>Do this instead:<br><br>CREATE TABLE cmdstpinfo<br>(<br> cmdrecid bigserial NOT NULL,<br> updsw smallint,<br> rxtime timestamp without time zone DEFAULT now(),<br> cmd text,<br> CONSTRAINT cmdstpinfo_pkey PRIMARY KEY (cmdrecid)<br> )<br> WITH ( OIDS=FALSE );<br><br>If you use type serial or bigserial, it will create an int or bigint<br>respectively and create the sequence.<br><br>more below ...<br><br>On 3/15/2012 3:19 PM, Bob Basques wrote:<br>> All,<br>><br>><br>> I have this sequence:<br>><br>><br>> CREATE SEQUENCE cmdstpinfo_cmdrecid_seq<br>><br>> INCREMENT 1<br>><br>> MINVALUE 1<br>><br>> MAXVALUE 9223372036854775807<br>><br>> START 132894<br>><br>> CACHE 1;<br>><br>> ALTER TABLE cmdstpinfo_cmdrecid_seq<br>><br>> OWNER TO gismo;<br>><br>><br>> and I'm trying to create this table:<br>><br>><br>> CREATE TABLE cmdstpinfo<br>><br>> (<br>><br>> cmdrecid bigint NOT NULL DEFAULT<br>> nextval('cmdstpinfo_cmdrecid_seq'::regclass),<br><br>Use double quotes for object names, ie:<br><br>nextval("cmdstpinfo_cmdrecid_seq"::regclass),<br><br>single quotes are for text strings. This is probably what caused your error.<br><br>-Steve<br><br><br>> updsw smallint,<br>><br>> rxtime timestamp without time zone DEFAULT now(),<br>><br>> cmd text,<br>><br>> CONSTRAINT cmdstpinfo_pkey PRIMARY KEY (cmdrecid)<br>><br>> )<br>><br>> WITH (<br>><br>> OIDS=FALSE<br>><br>> );<br>><br>><br>> but get the following error, if I remove the "cmdrecid" column creation<br>> line, I get the same error but for the smallint on "updsw" on the next<br>> line down :<br>><br>><br>> ERROR: syntax error at or near "bigint"<br>><br>> LINE 3: cmdrecid bigint NOT NULL DEFAULT nextval('cmdstpinfo_cmdre...<br>><br>> ^<br>><br>> ********** Error **********<br>><br>><br>> ERROR: syntax error at or near "bigint"<br>><br>> SQL state: 42601<br>><br>> Character: 38<br>><br>><br>> What am I doing wrong, Is this a permissions error of some sort?<br>><br>><br>> Thanks<br>><br>><br>> bobb<br>><br>><br>><br>><br>><br>> _______________________________________________<br>> postgis-users mailing list<br>> postgis-users@postgis.refractions.net<br>> <a href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br><br>_______________________________________________<br>postgis-users mailing list<br>postgis-users@postgis.refractions.net<br><a href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>
</p>
</div>
</td>
</tr>
</table>
</body>
</html>