Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1peupE-0005tF-Vr for pgsql-www@arkaria.postgresql.org; Wed, 22 Mar 2023 09:32:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1peupD-0001qq-BW for pgsql-www@arkaria.postgresql.org; Wed, 22 Mar 2023 09:32:07 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1peupD-0001qh-2v for pgsql-www@lists.postgresql.org; Wed, 22 Mar 2023 09:32:07 +0000 Received: from imap2.cmatte.me ([54.37.205.152]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1peup9-0000bk-QV for pgsql-www@lists.postgresql.org; Wed, 22 Mar 2023 09:32:05 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cmatte.me; s=myselector; t=1679477521; bh=Y62e6K7kAiaKBFEZRARJ77FXzPjrynevuMdXi6TKHBY=; h=Date:Subject:To:References:From:In-Reply-To; b=WPVc6U2Xhy29peYJzEEeRJQxiovNMcNW7VvOL/rGAocrtJ3ZfWMa6fcxODH2telH3 f4nQFQ6hm5rWHYSQi71/OwRJ/qI5kClFs10gP4jqqytuiT1tjphehVOI23xo47lwen ZKipzOJbRTWu97lDxsHTV5u/cS5wjkzxXvil7N/dA20a+bqcy6I8GYopx9H7JT4cAM RbRkPe/F0vs3ZZaRjGjc7k8KIMVJMN/vE/e2iuAsYhtTITaNnrleSOh4rYcvxihoBz yhRTVxaEDkLmLIXBDFF2umMq1s4cgzuIJZtuDBQKy/mZzcvYLNisGjnPBsvHbYFHNf B/SgeYfRDLKFQ== Content-Type: multipart/mixed; boundary="------------RjJOPMg0e0vLYxzgC6zUToqc" Message-ID: Date: Wed, 22 Mar 2023 10:32:00 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: [PATCHES] pgarchives: merge schema.sql into Django's model Content-Language: en-US To: pgsql-www@lists.postgresql.org, Magnus Hagander References: <12eb75f0-3fc2-14f3-0931-4f29e145f182@cmatte.me> From: =?UTF-8?Q?C=c3=a9lestin_Matte?= In-Reply-To: <12eb75f0-3fc2-14f3-0931-4f29e145f182@cmatte.me> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------RjJOPMg0e0vLYxzgC6zUToqc Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Adding a patch to this series to fix an issue with this migration: default value set in django is not taken account in load_messages.py because django's ORM is not used there, which leads to crashes. On 03/02/2022 14:30, Célestin Matte wrote: > As discussed in previous threads before [1, 2], database creations file are currently split between the Django model and a SQL file. Discrepancy in the database's definition exists between them. As a consequence, the database cannot be created easily. > This series of patches merge schema.sql into Django's model, and adds specific postgres components that cannot be handled by Django's ORM using RunSQL() in a migration file. > > Please also note that I integrated several other patches to avoid multiple migration files: > - I allowed message.parentid to be null, as discussed in [1]. This can cause Internal Server Errors in views.py, which are fixed by the second patch. > - I used BinaryFields for bytea columns (message.rawtxt and attachments.attachment), which seems to be the way to integrate bytea into Django > > It may be a good opportunity to remove all mentions of pg_dict, pg_stop and associated file. I'm not sure of the consequences of this. According to [2], these are the remains of an aborted idea. > Also, what does tsparer bring? Can the installation of pgarchives be simplified by replacing it with pg_catalog.english? > > > [1]: https://www.postgresql.org/message-id/CABUevEyFpYPEHh0AAyTAsgymRKOOVA1SY_pDHPCbBQQ9BawfTA%40mail.gmail.com > [2]: https://www.postgresql.org/message-id/CABUevEy_i1xAKscMv4KZ0%3DbE8050bBcQfWaNyjwZZBofZx7JgQ%40mail.gmail.com -- Célestin Matte --------------RjJOPMg0e0vLYxzgC6zUToqc Content-Type: text/x-patch; charset=UTF-8; name="0003-Bugfix-set-a-default-value-for-loaderror-column-dat.patch" Content-Disposition: attachment; filename*0="0003-Bugfix-set-a-default-value-for-loaderror-column-dat.pat"; filename*1="ch" Content-Transfer-Encoding: base64 RnJvbSAzZTM2NTMyNGZkYjcxOGFmYTYxNGVlMzljNWNmYjU5MDk1NWI5YTRjIE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiA9P1VURi04P3E/Qz1DMz1BOWxlc3Rpbj0yME1hdHRl Pz0gPGdpdGxhYkBjbWF0dGUubWU+CkRhdGU6IFdlZCwgMjIgTWFyIDIwMjMgMTA6MjU6NDEg KzAxMDAKU3ViamVjdDogW1BBVENIIDMvM10gQnVnZml4OiBzZXQgYSBkZWZhdWx0IHZhbHVl IGZvciBsb2FkZXJyb3IgY29sdW1uICJkYXQiCgpBIGRlZmF1bHQgdmFsdWUgZm9yIHRoaXMg Y29sdW1uIGlzIHNldCBpbiBkamFuZ28gd2l0aCBhdXRvX25vd19hZGQsIGJ1dCB0aGlzCmRl ZmF1bHQgaXMgbm90IHRha2VuIGludG8gYWNjb3VudCB3aGVuIGRqYW5nbydzIE9STSBpcyBu b3QgdXNlZCwgc3VjaCBhcyBpbgpsb2FkX21lc3NhZ2UucHksIHdoaWNoIGxlYWRzIHRvIGNy YXNoZXMKLS0tCiBkamFuZ28vYXJjaGl2ZXMvbWFpbGFyY2hpdmVzL21pZ3JhdGlvbnMvMDAw NV9tZXJnZV9zY2hlbWEucHkgfCAxICsKIDEgZmlsZSBjaGFuZ2VkLCAxIGluc2VydGlvbigr KQoKZGlmZiAtLWdpdCBhL2RqYW5nby9hcmNoaXZlcy9tYWlsYXJjaGl2ZXMvbWlncmF0aW9u cy8wMDA1X21lcmdlX3NjaGVtYS5weSBiL2RqYW5nby9hcmNoaXZlcy9tYWlsYXJjaGl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