Re: REGARDING ADDING A DATATYPE LIKE POLYGON
От | Willy-Bas Loos |
---|---|
Тема | Re: REGARDING ADDING A DATATYPE LIKE POLYGON |
Дата | |
Msg-id | CAHnozTg75TOoFXr-nyemXiNyxwUAJ1tcMqWEJZYpxf+fTH=wEQ@mail.gmail.com обсуждение исходный текст |
Ответ на | REGARDING ADDING A DATATYPE LIKE POLYGON (Bibek Behera <bibek.iitkgp@gmail.com>) |
Список | pgsql-novice |
You should start here:http://www.postgresql.org/docs/9.1/static/extend.html
Interesting 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-x4p6oHus
HTH,
WBL
--
"Quality comes from focus and clarity of purpose" -- Mark Shuttleworth
Interesting 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-x4p6oHus
HTH,
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
WBL--On 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 beheraIIT Bombay
Ph no.- 8879005749
"Quality comes from focus and clarity of purpose" -- Mark Shuttleworth
--
Regards,
Bibek beheraIIT Bombay
Ph no.- 8879005749
--
"Quality comes from focus and clarity of purpose" -- Mark Shuttleworth
В списке pgsql-novice по дате отправления: