Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2009


    Hi..I'm a new member to this forum,

    I want to ask about PostgreSql hope someone can help me,

    I want to create a table rectangle with new data type rect that I specified as below:

    create type rect as(X1 Integer,Y1 Integer,X2 Integer,Y2 Integer)

    I want to make a function overlap to check whether this rectangle overlap to a certain square point, but now I get confused how to make it it postgre.


  2. #2
    Join Date
    Jun 2004
    Arizona, USA
    Have you looked into postgreSQL's already included geometric types? points, line segments, boxes, etc. ???

    The box type is defined by specifying the x,y points for opposite corners of the box.

    In addition to the standard geometric data types, pg has previously defined geometric functions and operators which may already do what you need...
    "Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
    "I have my standards. They may be low, but I have them!" - Bette Middler
    "It's a book about a Spanish guy named Manual. You should read it." - Dilbert

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts