Re: What am I doing wrong in here?

Поиск
Список
Период
Сортировка
От Casey Allen Shobe
Тема Re: What am I doing wrong in here?
Дата
Msg-id 200312271024.03665.cshobe@softhome.net
обсуждение исходный текст
Ответ на What am I doing wrong in here?  (Devrim GUNDUZ <devrim@gunduz.org>)
Ответы Re: What am I doing wrong in here?  (Devrim GUNDUZ <devrim@gunduz.org>)
Список pgsql-sql
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
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
('datasources_id_seq'),     "name"      varchar(32)   not null unique,     "type_id"   varchar(16)   not null,
primarykey   ("id")     ); 

comment on table "datasources" is 'Datasource Definition';


This also gives you more flexibility since you can change the parameters of
the sequence (oftentimes I use start 0 minvalue 0, instead), and you can use
a name of your own choice.  The settings shown are the default when you use
'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æll,

--
Sigþór Björn Jarðarson (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


В списке pgsql-sql по дате отправления:

Предыдущее
От: Devrim GUNDUZ
Дата:
Сообщение: What am I doing wrong in here?
Следующее
От: "Andy Lewis"
Дата:
Сообщение: Re: Radius of a zip code