Received: from mail.taxrefund.com (willy.pdq.net [216.88.69.2]) by postgresql.org (8.11.3/8.11.4) with ESMTP id f7C3oLP04137 for ; Sat, 11 Aug 2001 23:50:22 -0400 (EDT) (envelope-from rsanford@nolimitsystems.com) Received: from mightywombat [66.25.23.179] by mail.taxrefund.com (SMTPD32-7.00) id ACF81440108; Sat, 11 Aug 2001 22:50:16 -0500 From: "Robert J. Sanford, Jr." To: Subject: how do i... Date: Sat, 11 Aug 2001 22:49:19 -0500 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 X-Archive-Number: 200108/149 X-Sequence-Number: 4370 first - i'm new at this postgres thing... i'm coming from a MSAccess and MSSQLServer environment where i can set up and "AUTOINCREMENT" primary key so that when i insert a row into a table i don't have to worry about trying to figure out what the primary key should be. i know that i can set up a sequence in postgres but i then have to make sure that all of my inserts use the sequence to create the primary key and i would like to avoid that. is there any way that i can set up a sequence so that the primary key is automatically generated whenever a row is inserted? if not, then my plan is to create a stored procedure that performs the insert with the sequence call. however, i would like to make sure that ONLY the stored procedure has the ability to perform the insert and that my developers cannot insert directly into the table. is this possible? i'm worried that when i set up a stored procedure it only has the rights given to it by the caller so if i turn off insert rights for my applications then the store procedure won't be able to do the inserts either. many thanks! rjsjr