You should start here:
http://www.postgresql.org/docs/9.1/static/extend.htmlInteresting sections of that page :
if you want to make a completely new type:(35.11)
http://www.postgresql.org/docs/9.1/static/xtypes.html Or if a DOMAIN will do:(an existing type with constraints, 35.2.3):
http://www.postgresql.org/docs/9.1/static/extend-type-system.html#AEN49589 there's also a YouTube video about domains from Cybertech:
http://www.youtube.com/watch?v=wa-x4p6oHusHTH,
WBL
On Fri, May 4, 2012 at 4:30 AM, Bibek Behera
<bibek.iitkgp@gmail.com> wrote:
i MEANT I AM ASKED DO it as a project to introduce a new data type that is similar to polygon but not the same.Please tell me how to achieve this thing.On Thu, May 3, 2012 at 6:24 PM, Willy-Bas Loos
<willybas@gmail.com> wrote:
you could use postgis. it has a geometry datatype. you can define it to be a polygon.
like so:
create table test(id serial primary key);
select addgeometrycolumn('public', 'test', 'the_geom', 4326, 'POLYGON', 2);
hth
WBLOn Thu, May 3, 2012 at 1:04 PM, Bibek Behera
<bibek.iitkgp@gmail.com> wrote:
Where in the postgres source code should we make changes to run a sql query likecreate table test(a polygon2)
--
Regards,
Bibek behera IIT Bombay
Ph no.- 8879005749
--
"Quality comes from focus and clarity of purpose" -- Mark Shuttleworth
--
Regards,
Bibek behera
IIT Bombay
Ph no.- 8879005749
--
"Quality comes from focus and clarity of purpose" -- Mark Shuttleworth