| From: | David Raznick <kindly(at)gmail(dot)com> |
|---|---|
| To: | pgsql-novice(at)postgresql(dot)org |
| Subject: | copy a text type. |
| Date: | 2012-07-21 23:18:33 |
| Message-ID: | CAN4mCtkbx67j3W_89gbbAT9CxntAru3CP=qUR6WU7h8q2+YsYA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-novice |
Hello,
It there a way to create a new type, not a composite one, that acts in
exactly the same way as the text type except that it has a different
name.
The only way I can see to do this is by writing simple c functions
into create type but even then I am not sure that I will get the
semantics completely correct..
Is there a simple way to do this?
Thanks
David
P.S the reason for this is that I want the application to infer types
off the database and do not want to keep it as application specific.
For example I want a yaml type and want to the application to know
that what is in the field (should be) yaml. I know that the database
will not validate it iss yaml but I am fine with that.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2012-07-22 00:18:25 | Re: copy a text type. |
| Previous Message | Ioannis Anagnostopoulos | 2012-07-21 20:29:28 | Re: A very long running query.... |