From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Brendan Jurd" <direvus(at)gmail(dot)com> |
Cc: | "Martijn van Oosterhout" <kleptog(at)svana(dot)org>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: [GENERAL] Empty arrays with ARRAY[] |
Date: | 2007-11-26 21:04:18 |
Message-ID: | 2922.1196111058@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers pgsql-patches |
"Brendan Jurd" <direvus(at)gmail(dot)com> writes:
> This approach is making sense to me, but I've run into a bit of a
> dependency issue. A_Const does indeed have a slot for typecasts by
> way of a TypeName member. A_Const and TypeName are both defined in
> parsenodes.h, whereas ArrayExpr is defined in primnodes.h. So
> unfortunately I can't just add a TypeName member to ArrayExpr.
That would be quite the wrong thing to do anyway, since ArrayExpr is
a run-time representation and shouldn't have any such thing attached
to it. What you probably need is a separate parse-time representation
of ARRAY[], a la the difference between A_Const and Const.
Another possibility is to just hack up a private communication path
between transformExpr and transformArrayExpr, ie when you see TypeCast
check to see if its argument is ArrayExpr and do something different.
This would be a mite klugy but it'd be a much smaller patch that way.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Chris Browne | 2007-11-26 21:15:48 | Re: replication in Postgres |
Previous Message | Brendan Jurd | 2007-11-26 20:42:21 | Re: [GENERAL] Empty arrays with ARRAY[] |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2007-11-26 22:02:09 | Re: Locating sharedir in PostgreSQL on Windows |
Previous Message | Dave Page | 2007-11-26 20:45:03 | Re: Locating sharedir in PostgreSQL on Windows |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2007-11-26 21:48:42 | Proposed patch to fix plpgsql's handling of block labels |
Previous Message | Brendan Jurd | 2007-11-26 20:42:21 | Re: [GENERAL] Empty arrays with ARRAY[] |