Search Postgresql Archives

Re: Converting yes or no to one letter strings.

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

 



On 6/4/19 3:29 PM, Lou wrote:
Hi everyone,

Is it possible to convert a boolean yes or no field to hold a one letter string? For example, the strings: 's' 'f' 'p' 'e'

To start off, I just need to convert true to 's'. false will have to be manually changed to 'f' or 'p' or 'e' as appropriate.

Why not an enum field?:

https://www.postgresql.org/docs/11/datatype-enum.html




Lou



--
Adrian Klaver
adrian.klaver@xxxxxxxxxxx





[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