pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Frank <u8924383@cc.nkfust.edu.tw>
To: pgsql-interfaces@postgresql.org
Subject: about PostgreSQL...(important)
Date: Sat, 2 Jun 2001 20:14:59 +0800
Message-ID: <9falko$t0q$1@bbs.nkfu.edu.tw> (raw)

Hi to all:
    I have a question.
    PostgreSQL is Object-Relational DBMS . Can I progam Object-Oriented
Language for PostgreSQL?

Example:
    I create two tables:
                create table Address(
                              street char(20),
                              city char(20),
                              province char(20)
                 );

                 create table students(
                                 no int4,
                                 name char(8),
                                 address  Address,
                )
               insert into Address values ('ZHONG-SHAN','TAIPEI','TAIWAN');

    I find the Address record's oid:
            =>  select oid from Address where province='TAIWAN';

                               oid
                             --------
                              28672
    Then, I insert a record to students table:
            =>  insert into students values (8852,'John',28672::Address);

   Finally, I select the  record about the student's province depend on oid:
            =>select no,name,address.province from students;

   BUT PostgreSQL's message is error,why?

Thank you.....
                 Frank








Message-ID: <9falko$t0q$1@bbs.nkfu.edu.tw>
Permalink:  ../9falko$t0q$1@bbs.nkfu.edu.tw/
Also on:    postgresql.org/message-id/9falko$t0q$1@bbs.nkfu.edu.tw

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: u8924383@cc.nkfust.edu.tw
  Subject: Re: about PostgreSQL...(important)
  In-Reply-To: <9falko$t0q$1@bbs.nkfu.edu.tw>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox