Re: [HACKERS] PostgreSQL 7.3: help on new CREATE TYPE

From: "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au>
To: "Jerome Chochon" <jerome(dot)chochon(at)ensma(dot)fr>, <pgsql-hackers(at)postgresql(dot)org>, <pgsql-announce(at)postgresql(dot)org>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: [HACKERS] PostgreSQL 7.3: help on new CREATE TYPE
Date: 2002-09-17 09:25:24
Message-ID: GNELIHDDFBOCMGBFGEFOEEEFCEAA.chriskl@familyhealth.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Hi Jerome,

The RECORD type is used for writing stored procedures and functions that
return sets.

eg. CREATE FUNCTION foo() RETURNS setof adress
AS '...';

Sort of thing...

Chris
-----Original Message-----
From: pgsql-hackers-owner(at)postgresql(dot)org
[mailto:pgsql-hackers-owner(at)postgresql(dot)org]On Behalf Of Jerome Chochon
Sent: Tuesday, 17 September 2002 5:17 PM
To: pgsql-hackers(at)postgresql(dot)org; pgsql-announce(at)postgresql(dot)org;
pgsql-general(at)postgresql(dot)org
Subject: [HACKERS] PostgreSQL 7.3: help on new CREATE TYPE

Hi all.

I have read the last version of PostgreSQL (7.3 beta) and found that the
second version of CREATE TYPE is very interesting.

So we can create a type that look like a RECORD.
For example:
CREATE TYPE adress AS (number int, street text, country VARCHAR);

But can i use this type in a table definition like this:
CREATE TABLE person (his_name VARCHAR, his_adress adress);

Someone can answer to my question.

Thanks for your help.

Jérôme Chochon.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Wim 2002-09-17 09:32:30 Copying table to another database.
Previous Message Jerome Chochon 2002-09-17 09:17:14 PostgreSQL 7.3: help on new CREATE TYPE

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paesold 2002-09-17 10:02:33 Backend crash
Previous Message Jerome Chochon 2002-09-17 09:17:14 PostgreSQL 7.3: help on new CREATE TYPE