Return-Path: owner-postman Received: from localhost.Berkeley.EDU (localhost.Berkeley.EDU [127.0.0.1]) by nobozo.CS.Berkeley.EDU (8.6.10/8.6.3) with SMTP id TAA12548 for postgres-redist; Mon, 28 Aug 1995 19:03:54 -0700 Resent-From: POSTGRES mailing list Resent-Message-Id: <199508290203.TAA12548@nobozo.CS.Berkeley.EDU> X-Authentication-Warning: nobozo.CS.Berkeley.EDU: Host localhost.Berkeley.EDU didn't use HELO protocol Sender: owner-postman@postgres.Berkeley.EDU X-Return-Path: owner-postman Received: from Informatik.RWTH-Aachen.DE (campino.Informatik.RWTH-Aachen.DE [137.226.225.2]) by nobozo.CS.Berkeley.EDU (8.6.10/8.6.3) with ESMTP id TAA13311 for ; Mon, 28 Aug 1995 19:03:51 -0700 Received: from downtown.oche.de (root@[194.94.253.3]) by Informatik.RWTH-Aachen.DE (RBI-Z-2/8.6.12) with SMTP id EAA07496 for ; Tue, 29 Aug 1995 04:00:04 +0200 Received: by luedi.tng.oche.de (CrossPoint v3.02); 29 Aug 1995 03:55:18 +0100 Date: 29 Aug 1995 03:41:00 +0100 From: dirk@luedi.tng.oche.de (Dirk Lütjens) To: postgres@postgres.Berkeley.EDU Message-ID: <5smCBOGPJAB@luedi.tng.oche.de> Subject: different questions X-Mailer: XP v3.02 MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Organization: Studentisches Netzwerk Aachen, Mitglied im IN e.V. Resent-To: postgres-redist@postgres.Berkeley.EDU Resent-Date: Mon, 28 Aug 95 19:03:54 -0700 Resent-XMts: smtp Hello, my Name is Dirk, and I'm new in working with postgres 4.2. Therefor there are a lot of questions for me. I've already read the manual, the manpages, the tutorial and other papers related to postgres, but didn't fond the answers to my questions. I'm working with Linux 1.2.6 on a i486. 1.) I like to create a new datatype e.g. with define function circle_in (language ="c", returntype =circle) arg is (any) as "/usr/local/postgres/src/examples/circle.o" \g define function circle_out (language ="c", returntype =any) arg is (any) as "/usr/local/postgres/src/examples/circle.o" \g define type circle (internallength = 24, input = circle_in, output = circle_out) \g and correct C-Functions. There is no problem with the datatype. But what to do if the input data to circle_in has not the correct form. e.g. I would like to make a range check in the circle_in c-function. How can I tell postgres, not to append the new tuple with this bad data. Returning a NULL don't work. 2.) Isn't there another possibility to create complexe user types except converting the abstract data to a string, sending it as a String to postgres, converting it to abstract data, and vice versa. 3.) How to handle portals? a.)Let's think I created a class with create Name (Familiename=string, Name = string, ...)\g and filled it with usefull data append Name (Familiename="Bollo", Name = "Hain", ...)\g append Name (Familiename="Tull", Name ="Jethro", ....)\g I started a query with begin\g retrieve portal test (Name.all)\g fetch 1 in test\g I got --------------------------------------------------- | Familiename | Name | ... --------------------------------------------------- | Bollo | Hain | ... --------------------------------------------------- again fetch 1 in test\g --------------------------------------------------- | Familiename | Name | ... --------------------------------------------------- | Tull | Jethro | ... --------------------------------------------------- The next fetch will produce only the header fetch 1 in test\g --------------------------------------------------- | Familiename | Name | ... --------------------------------------------------- and a fetch backward don't work correct fetch backward 1 in test\g --------------------------------------------------- | Familiename | Name | ... --------------------------------------------------- Closing the portal will produce close test\g NOTICE:Aug 29 02:51:35:PortalHeapMemoryFree: 0x1d6f90 not in alloc set! NOTICE:Aug 29 02:51:35:PortalHeapMemoryFree: 0x1d6f50 not in alloc set! WHY, and how to get around this? b.) In the postgres related paper "The Design of Postgres" is written: " ... replace EMP(salary=NewSalary) where EMP.name="Smith" fetch 20 into P The Replace command modifies Smith's tuple in the EMP relation and the Fetch command synchronizes the buffer ... " But not in my version. When I replace a tuple in the database and try to get the updated tuple out of the database with fetch backward 1 in P\g fetch 1 in P\g I'll get the old version. After close P\g end\g begin\g retrieve ... fetch 20 into P\g the updated tuple is ok. How to get around first ending the transaction? 4.) Is there anybody out there? I'am subscribed to the postgres newsgroup since one month. But I got only one mail with a question. I would like to read the answers too, if there are any, or are the answers privat ?-) Huh, that was a long one. I hope somebody out there can help me. Hope to hear something Dirk ## CrossPoint v3.02 ## ============================================================================== To add/remove yourself to/from the POSTGRES mailing list: send mail with the subject line ADD or DEL to "postgres-request@postgres.Berkeley.EDU". If this fails, send mail to "post_questions@postgres.Berkeley.EDU" and a human will deal with it. DO NOT post to the "postgres" mailing list. ============================================================================== URL: http://s2k-ftp.CS.Berkeley.EDU:8000/postgres/