Re: [HACKERS] Adding a typmod field to Const et al

2007-03-16 Thread Tom Lane
Gregory Stark <[EMAIL PROTECTED]> writes:
> I'm not entirely convinced by this one. Does that mean expressions like this
> would throw an error if col1 was declared as a numeric(1)?
>  ARRAY[col1] || 10

No, because the result of the || operator won't have a specific typmod.

regards, tom lane

---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings


Re: [HACKERS] Adding a typmod field to Const et al

2007-03-16 Thread Gregory Stark

"Tom Lane" <[EMAIL PROTECTED]> writes:

>   ArrayExpr:  should adopt the same behavior as Coalesce and
>   similar nodes, ie, if all the elements show the
>   same type/typmod then return that typmod
>   instead of -1
...
> Comments, objections?

I'm not entirely convinced by this one. Does that mean expressions like this
would throw an error if col1 was declared as a numeric(1)?

 ARRAY[col1] || 10



-- 
  Gregory Stark
  EnterpriseDB  http://www.enterprisedb.com

---(end of broadcast)---
TIP 7: You can help support the PostgreSQL project by donating at

http://www.postgresql.org/about/donate