copy a text type. - Mailing list pgsql-novice

From David Raznick
Subject copy a text type.
Date
Msg-id CAN4mCtkbx67j3W_89gbbAT9CxntAru3CP=qUR6WU7h8q2+YsYA@mail.gmail.com
Whole thread Raw
Responses Re: copy a text type.  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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.

pgsql-novice by date:

Previous
From: Tom Lane
Date:
Subject: Re: Backend freezes at "idle in transaction" while using libpq PQexec (PostgreSQL version 9.1.2)
Next
From: Tom Lane
Date:
Subject: Re: copy a text type.