CREATE TYPE

From: "Rodrigo Sakai" <rodrigo(dot)sakai(at)zanthus(dot)com(dot)br>
To: <pgsql-general(at)postgresql(dot)org>
Subject: CREATE TYPE
Date: 2006-04-27 10:45:39
Message-ID: 003301c669e7$b9c07ec0$4700a8c0@TREEZANTHUS
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi all,

I need some help to create types to use in a table. For exemple, I want to create:

CREATE TYPE salary_type (
value NUMERIC(10,2),
date DATE
)

CREATE TABLE employee (
num_employee INT,
name VARCHAR(60),
salary salary_type
)

I know I need two functions written in C (input_function, output_function). So, anyone can show me an example of this functions for my type salary_type?

Thanks!

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Shoaib Mir 2006-04-27 11:04:32 Re: CREATE TYPE
Previous Message Michael Artz 2006-04-27 09:46:36 Re: Disk Failure Scenarios