Re: [SQL] insert values

2001-02-23 Thread Ines . Klimann
On Thu, Feb 22, 2001 at 11:01:11PM -0500, Tom Lane wrote: > [EMAIL PROTECTED] writes: > > I have the following type : > > ... > > How can I insert a value in this table ? > > INSERT INTO entiers VALUES('1234') should work fine. > I have tried and I have this message : ex1=# insert into entiers

[SQL] insert values

2001-02-22 Thread Ines . Klimann
Hi, I have the following type : CREATE FUNCTION entier_in(opaque) RETURNS entier AS '/ens/klimann/PostgreSQL/entier.o' LANGUAGE 'c'; CREATE FUNCTION entier_out(opaque) RETURNS opaque AS '/ens/klimann/PostgreSQL/entier.o' LANGUA

[SQL] How to insert values with a new type ?

2001-02-19 Thread Ines . Klimann
Hi, I have the following program : #include typedef struct complexe { float x; float y; } complexe; complexe * complex_in(float x, float y) { complexe *result; result = (complexe *)palloc(sizeof(complexe)); result->x = x; result->y = y; return (result); }

[SQL] How to create a type ?

2001-02-14 Thread Ines Klimann
Hello, I am trying to understand how works CREATE TYPE, but it seems to be too difficult for me... Can someone help me ? I have tried this : -- create function personne_in(text) returns personne as 'select $1;' language 'sql'; create function personne_out(text)

[SQL] Oracle8 / PostgreSQL

2001-02-14 Thread Ines . Klimann
Hello, does someone know how I can do this in PostgreSQL ? (this is in Oracle8) : CREATE OR REPLACE TYPE adresse_type AS OBJECT (norue NUMBER, rue VARCHAR2(20), ville VARCHAR2(30), code_postal VARCHAR2(5)); / CREATE TABLE adresse OF adresse_type / Thanks, Ines.