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


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 like
create 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

В списке pgsql-novice по дате отправления:

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: Import CSV with Dates & Times
Следующее
От: James David Smith
Дата:
Сообщение: Re: Import CSV with Dates & Times