help postgres

From: "petite-etoile(at)voila(dot)fr"<petite-etoile(at)voila(dot)fr>
To: pgsql-general(at)PostgreSQL(dot)org
Subject: help postgres
Date: 2001-11-27 09:46:11
Message-ID: GNGDSZ$I9a7Lm1XD3C5SGhkK0LhKE0_GNGpSmLV7iNg_Eh3j2Tjkcbv7_bzzU@voila.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Hy,

I need some help in Postgres, my problem :

I've got a script in which there is :

create sequence num_fa;

create table hst_fa(
id_ori__nom text,
id_ori char(12),
nom char(32),
number int4 not null default nextval('num_fa'),
comment text,
id_f char(8),
gr char(1),
type char(8),
date_app timestamp,
date_cor timestamp,
corrige text,
primary key(id_ori__nom,date_app)
);

I must have date_app in primary key because number is not enought.

Postgres message is :

NOTICE: CREATE TABLE/PRIMARY KEY will create implicit index 'hst_fa_pkey' for table 'hst_fa'
ERROR: Can't find a default operator class for type 1296.

I've got for example many queries with "INSERT INTO ...." for the database.
If I already had the same queries I want to stop the "INSERT ..." and read the following queries to apply it on the database.

should I use cast to write this in the script :

create table hst_fa(
id_ori__nom text,
id_ori char(12),
nom char(32),
number int4 not null default nextval('num_fa'),
comment text,
id_f char(8),
gr char(1),
type char(8),
date_app timestamp,
date_cor timestamp,
corrige text,
primary key(id_ori__nom, select d (cast date_app as text))
);

thanks

Pe

____________________________________________________________
Faites un voeu et puis Voila ! www.voila.fr
Avec Voila Mail, consultez vos e-mails sur votre mobile Wap.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andy Marden 2001-11-27 09:55:41 Casting Varchar to Numeric
Previous Message Stepan Abramovich 2001-11-27 09:09:16 advice needed about "libpq - C Library: Asynchronous Query Processing"