Re: [HACKERS] Re: [GENERAL] Foreign Keys: check_primary_function

1999-04-08 Thread Margarita Barvinok


Try this

create table FOOS(
opaque_id int4 NOT NULL PRIMARY KEY,
name text NOT NULL,
bars int4 NOT NULL,
bazs int4 NOT NULL
);

or this

create table FOOS(
opaque_id int4 NOT NULL,
name text NOT NULL,
bars int4 NOT NULL,
bazs int4 NOT NULL,
CONSTRAINT opaque_key PRIMARY KEY (opaque_id)
);

-Margarita

On Thu, 8 Apr 1999, Todd Graham Lewis wrote:

 My inference based on this email, namely that foreign keys are in some
 at-least-minimal way supported or will be soon, is given the lie on my
 compile today out of CVS:
 
 
 tlewis=  create table FOOS(
   opaque_id int4 NOT NULL,
   name text NOT NULL,
   bars int4 NOT NULL,
   bazs int4 NOT NULL)
   PRIMARY KEY (opaque_id);
 ERROR:  parser: parse error at or near "primary"
 
 tlewis= \h create table
 Command: create table
 Description: create a new table
 Syntax:
 CREATE [TEMP] TABLE class_name
 (attr1 type1 [DEFAULT expression] [NOT NULL], ...attrN
 [[CONSTRAINT name] CHECK condition1, ...conditionN] )
 [INHERITS (class_name1, ...class_nameN)
 ;
 
 So, Brunhilda, what's the magin incantation?  Do I need some tail
 of Newt?  8^)
 




Re: [GENERAL] dbase converter

1999-04-08 Thread Oleg Broytmann

On Thu, 8 Apr 1999, Patrick Welche wrote:
 Is there a dbase3 = postgresql converter available at all? I found
 dbf2sql v2.2 which converts to (but not from) Postgres95, with notes such as
 
 -p  primary:
 Select the primary key. You have to give the exact
 field-name. (Only for dbf2msql, Postgres95 doesn't have a primary key)
 
 which of course PostgreSQL does. Anyone know of something more recent?

   I heared about some project called "xbase". Try to search FreshMeat for
"xbase", "dbf postgres" or such...

 Cheers,
 
 Patrick
 

Oleg.
 
Oleg Broytmann  National Research Surgery Centre  http://sun.med.ru/~phd/
   Programmers don't die, they just GOSUB without RETURN.