Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using postgreSQL as an object database

Status
Not open for further replies.

jonil

Programmer
May 18, 2004
1
SE
I'm trying to use postgreSQL (7.4.2) as an object database by creating a type (with CREATE TYPE, see example below) that consists of several attributes with own data types. Then I tried to create a table (see below) with one columns using my own created data type as data type.

Sadly this does not work, see error-message below.

Do anyone have an idea of what to do?

> CREATE TYPE PersonType AS (
> name VARCHAR(15),
> id INTEGER);
CREATE TYPE


> CREATE TABLE PersonTypeTable (info PersonType, attribut INTEGER);
ERROR: Attribute "info" has composite type persontype
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top