While messing around in gram.y I came across a production like this:

| a_expr IS OF '(' type_list ')' %prec IS
{
  $$ = (Node *) makeSimpleA_Expr(AEXPR_OF, "=", $1, (Node *) $5);
}
| a_expr IS NOT OF '(' type_list ')' %prec IS
{
  $$ = (Node *) makeSimpleA_Expr(AEXPR_OF, "!=", $1, (Node *) $6);
}

Works like so:

regression=# select array[1,1.2] is of (numeric[]);
 ?column?
----------
 t
(1 row)

Pretty handy! But I couldn't find it documented anywhere -- is it?

Thanks,

Joe


---------------------------(end of broadcast)--------------------------- TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Reply via email to