Triggers: options besides compiled code?
I started to look at the triggers documentation and was immediately
dismayed to discover that I would have compile code to create a
trigger. I have been using the old "rules" mechanism to automatically
put a sequence number into a tuple when inserting new rows. Are my
choices limited to just (1) compiled code, and (2) the old rules
mechanism?
roland
--
Roland B. Roberts
roberts@panix.com
Import Notes
Reply to msg id not found: TheHermitHacker'smessageofWed17Jun1998132114-0400EDT
On 9 Jul 1998, Roland Roberts wrote:
I started to look at the triggers documentation and was immediately
dismayed to discover that I would have compile code to create a
trigger. I have been using the old "rules" mechanism to automatically
put a sequence number into a tuple when inserting new rows. Are my
choices limited to just (1) compiled code, and (2) the old rules
mechanism?
if you insert a new row, isn't the sequence automatically inserted?
roland
--
Roland B. Roberts
roberts@panix.com
/-------------------------- signal@shreve.net -----------------------------\
| Brian Feeny | USR TC Hubs | ShreveNet Inc. (318)222-2638 |
| Network Administrator | Perl, Linux | Web hosting, online stores, |
| ShreveNet Inc. | USR Pilot | Dial-Up 14.4-56k, ISDN & LANs |
| 89 CRX DX w/MPFI, lots of |-=*:Quake:*=-| http://www.shreve.net/ |
| mods/Homepage coming soon |LordSignal/SN| Quake server: 208.206.76.47 |
\-------------------------- 318-222-2638 x109 -----------------------------/
I started to look at the triggers documentation and was immediately
dismayed to discover that I would have compile code to create a
trigger. I have been using the old "rules" mechanism toautomatically
put a sequence number into a tuple when inserting new rows. Are my
choices limited to just (1) compiled code, and (2) the old rules
mechanism?if you insert a new row, isn't the sequence automatically inserted?
It is if you use table defaults. (see 'create table', and 'netval()')
-DEJ
Import Notes
Resolved by subject fallback
"dej" == Jackson, DeJuan <djackson@cpsgroup.com> writes:
if you insert a new row, isn't the sequence automatically
inserted?
dej> It is if you use table defaults. (see 'create table', and
dej> 'netval()')
Thanks for the tip; Richard Lynch <lynch@lscorp.com> had sent me the
same information via email. I was unaware of the "default" clause
which certainly makes this piece easier.
I guess I'm still stuck with writing C-code to get cascading deletes,
but I can probably postpone that requirement for a while....
Thanks,
roland
--
Roland B. Roberts
roberts@panix.com
Import Notes
Reply to msg id not found: JacksonDeJuan'smessageofFri10Jul1998122229-0500
Hi there,
Please see subject.
I guess the problem is, that my unix shell doesn't accept them.
Are there any escape sequences I could use?
regards, Tony
--
----------C-Y-B-E-R-S-O-L-U-T-I-O-N-S----------------
Anton St�ckl mailto:tony@cys.de
CyberSolutions GmbH http://www.cys.de
Frankfurter Ring 193A Phone +49 89 32369223
80807 Muenchen Fax +49 89 32369220
------W-E----M-A-K-E----I-T----P-O-S-S-I-B-L-E-------
Check out the contrib/refint.* in the distribution. I believe it
handles CASCADE DELETE.
-DEJ
Show quoted text
-----Original Message-----
From: Roland Roberts [SMTP:roberts@panix.com]
Sent: Sunday, July 12, 1998 3:00 PM
To: pgsql-general@postgreSQL.org
Subject: Re: [GENERAL] Triggers: options besides compiled code?"dej" == Jackson, DeJuan <djackson@cpsgroup.com> writes:
if you insert a new row, isn't the sequence automatically
inserted?dej> It is if you use table defaults. (see 'create table', and
dej> 'netval()')Thanks for the tip; Richard Lynch <lynch@lscorp.com> had sent me the
same information via email. I was unaware of the "default" clause
which certainly makes this piece easier.I guess I'm still stuck with writing C-code to get cascading deletes,
but I can probably postpone that requirement for a while....Thanks,
roland
--
Roland B. Roberts
roberts@panix.com
Import Notes
Resolved by subject fallback