Received: from davinci.ethosmedia.com (davinci.ethosmedia.com [209.10.40.250]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f6PFEKf36925 for ; Wed, 25 Jul 2001 11:14:20 -0400 (EDT) (envelope-from josh@agliodbs.com) Received: from [209.10.40.250] (account ) by davinci.ethosmedia.com (CommuniGate Pro WebUser 3.4.1) with HTTP id 91191; Wed, 25 Jul 2001 08:14:09 -0700 From: "Josh Berkus" Subject: Re: Re: Inserts in triggers Follow Up To: Morgan Curley , X-Mailer: CommuniGate Pro Web Mailer v.3.4.1 Date: Wed, 25 Jul 2001 08:14:09 -0700 Message-ID: In-Reply-To: <4.3.2.7.2.20010725085946.023e24a8@e4media.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="_===91191====davinci.ethosmedia.com===_" X-Archive-Number: 200107/340 X-Sequence-Number: 4153 This is a multi-part MIME message --_===91191====davinci.ethosmedia.com===_ Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit Morgan, > One other problem I am having in that proc is SELECT'ing INTO a var. > > declare > id lookup_sports.sport_id%TYPE; > begin > SELECT INTO id sport_id FROM lookup_sports WHERE....some > clause > > id is always null That's because the SELECT INTO variable and SELECT INTO record syntax are confusingly different. It's for records: SELECT INTO record_var * FROM ... for simple variables: SELECT column INTO variable FROM ... I'm not clear on the origin of the inconsistency; my guess is that jan copied it over from PL/SQL. > good suggestion to differentiate my vars from my columns. For the > sake of > expediency I named them the same so when I was writing the insert > statements I could just copy/past my columns list into my values > list. You should *always* do this. Most functions with identical column and variable names will confuse the compiler and result in errors. It'd have been nice if PL/pgSQL supported variable naming with a special character preifx (e.g. $variable). Does anyone know of a character that won't give the parser fits? Currently I'm using "v_", same as Richard. -Josh ______AGLIO DATABASE SOLUTIONS___________________________ Josh Berkus Complete information technology josh@agliodbs.com and data management solutions (415) 565-7293 for law firms, small businesses fax 621-2533 and non-profit organizations. San Francisco --_===91191====davinci.ethosmedia.com===_ Content-Type: text/plain Content-Disposition: attachment; filename="" Content-Transfer-Encoding: base64 DQo= --_===91191====davinci.ethosmedia.com===_ Content-Type: text/plain Content-Disposition: attachment; filename="" Content-Transfer-Encoding: base64 DQo= --_===91191====davinci.ethosmedia.com===_ Content-Type: text/plain Content-Disposition: attachment; filename="" Content-Transfer-Encoding: base64 DQo= --_===91191====davinci.ethosmedia.com===_--