Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bKxiP-0000pq-QZ for pgsql-bugs@arkaria.postgresql.org; Thu, 07 Jul 2016 01:02:54 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bKxiP-0007mp-De for pgsql-bugs@arkaria.postgresql.org; Thu, 07 Jul 2016 01:02:53 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bKxhC-00074p-Sb for pgsql-bugs@postgresql.org; Thu, 07 Jul 2016 01:01:39 +0000 Received: from pv36p08im-ztdg07101401.me.com ([17.142.193.34]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1bKxhA-0003DR-BV for pgsql-bugs@postgresql.org; Thu, 07 Jul 2016 01:01:37 +0000 Received: from process-dkim-sign-daemon.pv36p08im-ztdg07101401.me.com by pv36p08im-ztdg07101401.me.com (Oracle Communications Messaging Server 7.0.5.38.0 64bit (built Feb 26 2016)) id <0O9X00L006KR4Q00@pv36p08im-ztdg07101401.me.com> for pgsql-bugs@postgresql.org; Thu, 07 Jul 2016 01:00:05 +0000 (GMT) Received: from [172.20.10.5] (unknown [78.95.250.25]) by pv36p08im-ztdg07101401.me.com (Oracle Communications Messaging Server 7.0.5.38.0 64bit (built Feb 26 2016)) with ESMTPSA id <0O9X00B216S1H710@pv36p08im-ztdg07101401.me.com>; Thu, 07 Jul 2016 01:00:05 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-07-06_11:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 clxscore=1011 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1510270003 definitions=main-1607070007 Content-type: multipart/alternative; boundary="Apple-Mail=_AD556C01-4020-4756-90B3-1C4AC0F7B816" MIME-version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: BUG #14232: Possible mistake in the documentation From: Hicham AOUDA In-reply-to: Date: Thu, 07 Jul 2016 04:00:00 +0300 Cc: "pgsql-bugs@postgresql.org" Message-id: References: <20160706234654.1426.20399@wrigleys.postgresql.org> To: "David G. Johnston" X-Mailer: Apple Mail (2.3124) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=me.com; s=4d515a; t=1467853205; bh=L28iOuATHcBvB4sPZVLICsIzk+tlFXnWTriDrJMW9bU=; h=Content-type:MIME-version:Subject:From:Date:Message-id:To; b=D4fbojH9pTYXSpSqVbo0x4LiRnRT6d8MmEEjjkccGpiOTtAQNFiZbiuku1KVisH5f bW1HfUiRsoapnMA3LM3TP+P2kvuSd7pApB/Ui5F5Os4LWW67IWW3bEWb9u3qnYepPp jWt8B69ReHsWbmQg6/un83QbkA/dbHX8caqBsFrjjqXH3TVEdqe3SMNBMAg3dJZ6SL gkBE++2F07pZffrYvyNdnSuebKFj9GG2uMZdpaM1JoYLqAW+v7+3lsHxDMzcxlvIl2 GZe9L+xmu5k7Kx3dj8jY/Mt7V29nyDj8zJOF1vh1VmhDN/1M1xn+SWbxI6lrUG0s07 rW3cvJg9hjrgA== X-Pg-Spam-Score: -4.0 (----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org --Apple-Mail=_AD556C01-4020-4756-90B3-1C4AC0F7B816 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 thanks David for the explanation how would you use the function then in a select statement, i couldn=E2=80=99= t get it to work? On Jul 7, 2016, at 03:58, David G. Johnston = wrote: On Wednesday, July 6, 2016, > = wrote: The following bug has been logged on the website: Bug reference: 14232 Logged by: Hicham Aouda Email address: aouda.h@me.com PostgreSQL version: 9.5.3 Operating system: All Description: On page 1151 43.3.4. Composite Types of the pdf documentation for 9.5.3 I suspect a mistake: it should be : CREATE TYPE employee AS ( name text, salary integer, age integer ); and not CREATE TABLE employee ( name text, salary integer, age integer ); It's functionally correct. Every table you create automatically has a = type of the same name and structure. David J.=20 --Apple-Mail=_AD556C01-4020-4756-90B3-1C4AC0F7B816 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 thanks David for the explanation
how would you = use the function then in a select statement, i couldn=E2=80=99t get it = to work?

On Jul = 7, 2016, at 03:58, David G. Johnston <david.g.johnston@gmail.com> wrote:

On Wednesday, July = 6, 2016, <aouda.h@me.com> wrote:
The following bug has been logged on the = website:

Bug reference:      14232
Logged by:          Hicham Aouda
Email address:      aouda.h@me.com
PostgreSQL version: 9.5.3
Operating system:   All
Description:

On page 1151  43.3.4. Composite Types
of  the pdf documentation for 9.5.3
I suspect a mistake:

it should be :

CREATE TYPE  employee AS (
name text,
salary integer,
age integer );

and not

CREATE TABLE  employee (
name text,
salary integer,
age integer );



It's = functionally correct.  Every table you create automatically has a = type of the same name and structure.

David J. 

= --Apple-Mail=_AD556C01-4020-4756-90B3-1C4AC0F7B816--