Another question about composite types - Mailing list pgsql-sql

From Rodrigo Sakai
Subject Another question about composite types
Date
Msg-id 000101c70752$3de4b560$4700a8c0@TREEZANTHUS
Whole thread Raw
Responses Re: Another question about composite types
List pgsql-sql
<div class="Section1"><p class="MsoNormal"><font face="Arial" size="2"><span lang="EN-US" style="font-size:
10.0pt;font-family:Arial">  Hi, I need to create a table like:</span></font><p class="MsoNormal"><font face="Arial"
size="2"><spanlang="EN-US" style="font-size: 
10.0pt;font-family:Arial"> </span></font><p class="MsoNormal"><b><font face="Arial" size="2"><span lang="EN-US"
style="font-size:10.0pt;font-family:Arial;font-weight:bold"> CREATE TYPE t_salary AS (</span></font></b><p
class="MsoNormal"><b><fontface="Arial" size="2"><span lang="EN-US"
style="font-size:10.0pt;font-family:Arial;font-weight:bold">   Value numeric(10,2),</span></font></b><p
class="MsoNormal"><b><fontface="Arial" size="2"><span lang="EN-US"
style="font-size:10.0pt;font-family:Arial;font-weight:bold">   Validity date</span></font></b><p
class="MsoNormal"><b><fontface="Arial" size="2"><span lang="EN-US"
style="font-size:10.0pt;font-family:Arial;font-weight:bold"> );</span></font></b><p class="MsoNormal"><b><font
face="Arial"size="2"><span lang="EN-US"
style="font-size:10.0pt;font-family:Arial;font-weight:bold"> </span></font></b><pclass="MsoNormal"><b><font
face="Arial"size="2"><span lang="EN-US" style="font-size:10.0pt;font-family:Arial;font-weight:bold">  CREATE TABLE
employee(</span></font></b><p class="MsoNormal"><b><font face="Arial" size="2"><span lang="EN-US"
style="font-size:10.0pt;font-family:Arial;font-weight:bold">    id int,</span></font></b><p class="MsoNormal"><b><font
face="Arial"size="2"><span lang="EN-US" style="font-size:10.0pt;font-family:Arial;font-weight:bold">     name
varchar(30),</span></font></b><pclass="MsoNormal"><b><font face="Arial" size="2"><span lang="EN-US"
style="font-size:10.0pt;font-family:Arial;font-weight:bold">    salary t_salary[]</span></font></b><p
class="MsoNormal"><b><fontface="Arial" size="2"><span lang="EN-US"
style="font-size:10.0pt;font-family:Arial;font-weight:bold"> );</span></font></b><p class="MsoNormal"><b><font
face="Arial"size="2"><span lang="EN-US"
style="font-size:10.0pt;font-family:Arial;font-weight:bold"> </span></font></b><pclass="MsoNormal"><b><font
face="Arial"size="2"><span lang="EN-US"
style="font-size:10.0pt;font-family:Arial;font-weight:bold"> </span></font></b><pclass="MsoNormal"><font face="Arial"
size="2"><spanlang="EN-US" style="font-size: 
10.0pt;font-family:Arial">  That is, I need an array of composite type and searching on google I found that is
impossibleto do it! Is it really impossible? Anyone have do it ?</span></font><p class="MsoNormal"><font face="Arial"
size="2"><spanlang="EN-US" style="font-size: 
10.0pt;font-family:Arial"> </span></font><p class="MsoNormal"><font face="Arial" size="2"><span lang="EN-US"
style="font-size:
10.0pt;font-family:Arial"> </span></font><p class="MsoNormal"><font face="Arial" size="2"><span lang="EN-US"
style="font-size:
10.0pt;font-family:Arial"> Thanks!</span></font></div>

pgsql-sql by date:

Previous
From: ivan marchesini
Date:
Subject: drop a check
Next
From: Richard Broersma Jr
Date:
Subject: Re: RES: Inserting data in composite types!