binary upgade errors

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

 



On Monday, June 18, 2018, David Modica <davidmo@xxxxxxxxxxxxxxxxxxx> wrote:
isn't 0::uint1 casting an int as uint and '0'::uint1 is casting a text as a uint1 ?

The second one isn't casting, period.  It is an alternate spelling of "uint1 '0'" which itself is how you write a typed literal in SQL (:: syntax is a PostgreSQL extension).  The text between the single quotes is an untyped character string that gets passed directly into the declared type's constructor/_in function.

Since the first one is not quoted the value is interpreted as a number (special case reserved for core types, I think) and the :: is then interpreted as a cast in order to go from the number to the custom type.

David J.


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux