Re: binary upgade errors

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

 



David Modica <davidmo@xxxxxxxxxxxxxxxxxxx> writes:
> isn't 0::uint1 casting an int as uint and '0'::uint1 is casting a text as a uint1 ?

No.  0 is an integer constant and so the first case requires invoking
an int -> uint1 cast.  The second syntax implies applying uint1's type
input function to the string '0', and arriving at a constant immediately.
It's perhaps unfortunate that similar-looking syntax means two basically
different things ... but it's not the only place in SQL where much turns
on punctuation.

https://www.postgresql.org/docs/current/static/sql-expressions.html#SQL-SYNTAX-TYPE-CASTS

			regards, tom lane





[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