X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id AD239D1B465 for ; Sat, 27 Dec 2003 15:32:55 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 52516-06 for ; Sat, 27 Dec 2003 11:32:09 -0400 (AST) Received: from jive.SoftHome.net (jive.SoftHome.net [66.54.152.27]) by svr1.postgresql.org (Postfix) with SMTP id 1CEFED1B466 for ; Sat, 27 Dec 2003 11:32:05 -0400 (AST) Received: (qmail 7577 invoked by uid 417); 27 Dec 2003 15:32:09 -0000 Received: from tango-.softhome.net (HELO softhome.net) (172.16.2.14) by shunt-smtp-com-out-com-0 with SMTP; 27 Dec 2003 15:32:09 -0000 Received: from eirny.bellsouth.net ([68.215.193.149]) (AUTH: PLAIN cshobe@softhome.net) by softhome.net with esmtp; Sat, 27 Dec 2003 08:32:09 -0700 From: Casey Allen Shobe To: Devrim GUNDUZ Subject: Re: What am I doing wrong in here? Date: Sat, 27 Dec 2003 10:24:03 -0500 User-Agent: KMail/1.5.94 Cc: PostgreSQL Mailing Lists-SQL References: In-Reply-To: MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Message-Id: <200312271024.03665.cshobe@softhome.net> X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200312/202 X-Sequence-Number: 16368 Devrim GUNDUZ (Saturday 27 December 2003 10:12) > create_date timestamp NOT NULL DEFAULT 'NOW', > change_date timestamp NOT NULL DEFAULT 'NOW', Do these actually work? I've always used 'default now()'... > And I get: > > NOTICE: CREATE TABLE will create implicit sequence "tdmalias_mid_seq" for > "serial" column "tdmalias.mid" If you want to avoid this, then create your sequences manually instead of= =20 using 'serial'. \echo '* datasources' create sequence "datasources_id_seq" start 1 increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1; comment on sequence "datasources_id_seq" is 'Datasources ID'; create table "datasources" ( "id" integer not null unique default nextval=20 ('datasources_id_seq'), "name" varchar(32) not null unique, "type_id" varchar(16) not null, primary key ("id") ); comment on table "datasources" is 'Datasource Definition'; This also gives you more flexibility since you can change the parameters of= =20 the sequence (oftentimes I use start 0 minvalue 0, instead), and you can us= e=20 a name of your own choice. The settings shown are the default when you use= =20 'serial'. > ERROR: permission denied for schema pg_catalog The user you create the user as needs to have createuser permission. select * from "pg_catalog"."pg_user"; ...will show you all that you need to know. alter user "foo" with createuser; ...(run as an appropriate user) will grant the user such permission. Vertu s=E6ll, --=20 Sig=FE=F3r Bj=F6rn Jar=F0arson (Casey Allen Shobe) cshobe@softhome.net / http://rivyn.livejournal.com Jabber: sigthor@jabber.org; ICQ: 1494523; AIM/Yahoo: SomeLinuxGuy Free development contributor of: > KDE toolbar icons > Kopete user interface, usability, and testing > X11 Icelandic Dvorak keymaps > Reporting of over 100 Kopete bugs