Thread: BUG #14232: Possible mistake in the documentation
VGhlIGZvbGxvd2luZyBidWcgaGFzIGJlZW4gbG9nZ2VkIG9uIHRoZSB3ZWJz aXRlOgoKQnVnIHJlZmVyZW5jZTogICAgICAxNDIzMgpMb2dnZWQgYnk6ICAg ICAgICAgIEhpY2hhbSBBb3VkYQpFbWFpbCBhZGRyZXNzOiAgICAgIGFvdWRh LmhAbWUuY29tClBvc3RncmVTUUwgdmVyc2lvbjogOS41LjMKT3BlcmF0aW5n IHN5c3RlbTogICBBbGwKRGVzY3JpcHRpb246ICAgICAgICAKCk9uIHBhZ2Ug MTE1MSAgNDMuMy40LiBDb21wb3NpdGUgVHlwZXMNCm9mICB0aGUgcGRmIGRv Y3VtZW50YXRpb24gZm9yIDkuNS4zDQpJIHN1c3BlY3QgYSBtaXN0YWtlOg0K DQppdCBzaG91bGQgYmUgOg0KDQpDUkVBVEUgVFlQRSAgZW1wbG95ZWUgQVMg KA0KbmFtZSB0ZXh0LA0Kc2FsYXJ5IGludGVnZXIsDQphZ2UgaW50ZWdlciAp Ow0KDQphbmQgbm90DQoNCkNSRUFURSBUQUJMRSAgZW1wbG95ZWUgKA0KbmFt ZSB0ZXh0LA0Kc2FsYXJ5IGludGVnZXIsDQphZ2UgaW50ZWdlciApOwoK
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 <javascript:;> > 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.
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 <david.g.johnston@gmail.com> = wrote: On Wednesday, July 6, 2016, <aouda.h@me.com <mailto: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 <javascript:;> 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
On Wednesday, July 6, 2016, Hicham AOUDA <aouda.h@me.com> wrote: > 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? > > select *, overpaid(employee) from employee; Ther are other options but this is the traditional form. David J.
many thanks best regards On Jul 7, 2016, at 04:15, David G. Johnston <david.g.johnston@gmail.com> = wrote: On Wednesday, July 6, 2016, Hicham AOUDA <aouda.h@me.com = <mailto:aouda.h@me.com>> wrote: 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? select *, overpaid(employee) from employee; Ther are other options but this is the traditional form. David J.