| From: | Joe Conway <mail(at)joeconway(dot)com> |
|---|---|
| To: | "Hackers (PostgreSQL)" <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | IS OF |
| Date: | 2003-03-22 23:56:13 |
| Message-ID: | 3E7CF81D.1000203@joeconway.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers pgsql-patches |
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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2003-03-23 00:24:56 | Re: IS OF |
| Previous Message | Joe Conway | 2003-03-22 23:48:12 | Re: Fwd: [GENERAL] statement id |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2003-03-23 00:24:56 | Re: IS OF |
| Previous Message | Bruce Momjian | 2003-03-22 03:46:34 | Re: Add CLUSTER ON to pg_dumps |