Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fz1Mn-0002fa-JY for pgsql-docs@arkaria.postgresql.org; Sun, 09 Sep 2018 15:11:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fz1Ml-0005HY-3s for pgsql-docs@arkaria.postgresql.org; Sun, 09 Sep 2018 15:11:11 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fz1Mk-0005HQ-Ro for pgsql-docs@lists.postgresql.org; Sun, 09 Sep 2018 15:11:10 +0000 Received: from mail-qt0-x22e.google.com ([2607:f8b0:400d:c0d::22e]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1fz1Mi-0002ie-6h for pgsql-docs@lists.postgresql.org; Sun, 09 Sep 2018 15:11:10 +0000 Received: by mail-qt0-x22e.google.com with SMTP id g44-v6so21408169qtb.12 for ; Sun, 09 Sep 2018 08:11:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=CEYLq+56PXtXiLmWxunM4UCKZWYxL8YMyWydOc1ICRE=; b=kHCUdWln8OwkyHV22H1ChBg6Z9CrZk+4IYwLAu2bzNWuXhBlgQ14V2cLk2fM7QBmek VuUaO5bi3fpltg3Q7O6fM+RQoOFA7jy5azpQINVNPtuZhO63dJZZYdeOvtGyumDIHg8M no2yCNrQESYpauTaAu3ReCxQm38Ma0yJwnK0aSKp6LjRNpd2mXW6hyf9TlM+rO+xUDvi rc0YAg4kJyYxjyqDMwpyrcK0O0qOB1xhl5yyKbZG/aE7v0EkGavZnKkL9aUhwNMLYooy OsUUsqU5r7zGiQAU4KZoMUm0S5JdWhtNmJiVDj2NJJIhE5M3TFvEl/ZO5/pAi85Sgu8D dtaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=CEYLq+56PXtXiLmWxunM4UCKZWYxL8YMyWydOc1ICRE=; b=do3uaJEQh8QbVjPTZ59T5utLv4qXElrGCjxYFsHFJWzdDkSVpFg19Ywmub+PTuaqzq h9V1Ohha82fDtUnFHmRF7KA13lOEczTwMNvYNRy/isfZvuMEuZ206yOpVKOuTIKqNZqj xcXBOXMuYq6sJMba8TViaIzqP7ps+ciyQfbBt7Y7OmlggGChADwUFbhVQwMVLZdVevkA ejPpuIFGvqwTJ63Ds/99ZIfhBAa/qSe1DsJPQsekybdCQPQSr68RB7f5l2UT0ORVHNqs Xq9fcFXgBftNdMQ5tz+0TLNZ4CS1UT+mTzhZuMrbEY+fUMvac/ZYcKjs0RCvDXbRcLp1 kJsQ== X-Gm-Message-State: APzg51CGOWtuuxo64OQkoC/MDlGvGNyYK9Vn2bDceDz7/bFww34/RhF4 if5xoP44gXrMPHEjis9eHJaprpnXMVwZzW67fWc= X-Google-Smtp-Source: ANB0VdZIzejkPMB0h/grcGC2m8QzrmOf4sB1Idy/xl+Oa0SaLOuvJ3r/OupC0H/KoqaZmbagv3+mzs9h+Ote6Pq/wEg= X-Received: by 2002:a0c:d928:: with SMTP id p37-v6mr11756409qvj.237.1536505866097; Sun, 09 Sep 2018 08:11:06 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a0c:bf98:0:0:0:0:0 with HTTP; Sun, 9 Sep 2018 08:11:05 -0700 (PDT) In-Reply-To: <153640779702.23141.377057841943706781@wrigleys.postgresql.org> References: <153640779702.23141.377057841943706781@wrigleys.postgresql.org> From: "David G. Johnston" Date: Sun, 9 Sep 2018 08:11:05 -0700 Message-ID: Subject: Re: Extend phrase by an example To: "kes-kes@yandex.ru" , "pgsql-docs@lists.postgresql.org" Content-Type: multipart/alternative; boundary="000000000000581937057571a68b" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --000000000000581937057571a68b Content-Type: text/plain; charset="UTF-8" On Saturday, September 8, 2018, PG Doc comments form wrote: > the constraints shown in the table > definition do not apply to values of the composite type outside the table. > (A partial workaround is to use domain types as members of composite > types.) > > The part: > >(A partial workaround is to use domain types as members of composite > types.) > > From here I can understand that workaround is possible. > > But what is workaround? and why it is partial? > Would be great to have this description. > The main thing is that some constraints are implemented via triggers and those can only be attached to actual tables. So in the example the REFERENCES constraint can only be used on the original table records and can never applied to a standalone value of that type. David J. --000000000000581937057571a68b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Saturday, September 8, 2018, PG Doc comments form <noreply@postgresql.org> wrote:
the constraints shown in the table
definition do not apply to values of the composite type outside the table.<= br> (A partial workaround is to use domain types as members of composite
types.)

The part:
>(A partial workaround is to use domain types as members of composite types.)