Search Postgresql Archives

Re: Cast INTEGER to BIT confusion

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Aug 15, 2023 at 4:49 AM [Quipsy] Markus Karg <karg@xxxxxxxxx> wrote:


CREATE TABLE T (c BIT);

INSERT INTO T VALUES (1);

-- I MUST NOT change both lines in any way as these are part of a third-party application!


That is quite the requirement! I hope that the rest of the application is more flexible, or you might be fighting an uphill battle for a long time.

However, if the application will drive forward even after an error, you could pre-create the table "T" the way you want (esp. "c INT"), let the application's "CREATE TABLE" call fail, and then the subsequent insert(s) will succeed. Other than that, there is not much that can be easily done, as the error that is thrown happens pretty early in the process.

Cheers,
Greg 

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux