Search Postgresql Archives

Re: Using a boolean column with IF / THEN

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

 




On Saturday, December 5, 2020, Alexander Farber <alexander.farber@xxxxxxxxx> wrote:
Good evening,

hopefully my question is not too stupid, but -

in a 13.1 database I have a words_users table with a boolean column:

        -- the user is not allowed to chat or change the motto
        muted         boolean NOT NULL DEFAULT false,

Currently I check the value as follows, but I wonder if this is the best way with PL/pgSQL -


Maybe not “simpler” but for all those checks you could write a single query that pulls out all the data at once into a record variable and test against the columns pf that instead of executing multiple queries.

David J.

[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 Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux