Re: [PATCH] DB_DataObject support for PostgreSQL casts
| From: | Ian Eure | Date: | Fri, 03 Oct 2003 18:57:25 +0000 |
| Subject: | Re: [PATCH] DB_DataObject support for PostgreSQL casts | ||
| References: | 1 2 3 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-22367@lists.php.net to get a copy of this message | ||
On Friday October 3 2003 12:39 am, Alan Knowles wrote:
> Could you have a look at supporting this by
> a) generator writes:
> fieldname = bytea
> (eg. the field type.)
>
> b) DataObjects doing
> $suffix = '';
> if (is_string($v)) {
> $suffix='::'.$v;
> $k = DB_DATAOBJECT_STR;
> }
>
I could, but it would only be useful in the bytea case. Casts are useful
elsewhere, e.g. 100::money would cast '100' (int) to '$100.00' (float), and
shouldn't (imo) be limited to one type per field.