[Snort-users] What have I screwed up on this SQL call?

Hutchinson, Andrew Andrew.Hutchinson at ...3639...
Fri Apr 11 06:37:13 EDT 2003

I'm not certain exactly what your question is, but here are a couple

in your INSERT statements below, you're trying to insert a value into an
auto-increment field.

Here is a description (in postgresql) of the sig_class table:

# ==========

snort191=# \d sig_class
                                    Table "public.sig_class"
     Column     |  Type   |                              Modifiers

 sig_class_id   | integer | not null default
 sig_class_name | text    | not null
Indexes: sig_class_pkey primary key btree (sig_class_id),
         sig_class_name_idx btree (sig_class_name)

# ==========

The modifier on the sig_class_id field is "not null default
nextval('public.sig_class_sig_class_id_seq'::text)", meaning that it's
going to pull it's next value from the sig_class_class_id_seq sequence
(PostgreSQL uses something it refers to as sequences for implementing
"auto-increment" fields).

It could be that you're trying to insert a value that's a duplicate into
a sig_class_id (which is a primary key, so no dupes allowed).  What you
should do instead is insert like this:

INSERT INTO sig_class (sig_class_name) VALUES ('misc-activity');

and then query the table to get the sig_class_id for that

Hope this helps,


Andrew Hutchinson - Network Security
Vanderbilt University Medical Center
(615) 936-2856

> -----Original Message-----
> From: Jason Haar [mailto:Jason.Haar at ...294...] 
> Sent: Thursday, April 10, 2003 8:51 PM
> To: snort-users at lists.sourceforge.net
> Subject: [Snort-users] What have I screwed up on this SQL call?
> Hi there
> I'm trying to update logsnorter to handle snort 1.9 and I 
> just can't figure
> out why the likes of ACID  won't display the signature description.
> e.g.
> INSERT INTO sig_class VALUES (1,'misc-activity');
> INSERT INTO signature VALUES (1,'ciscoacl-110/0->0',1,3,1,NULL);
> All the acid_cache calls have got me totally lost as to what 
> it's looking
> for, but under ACID, the logsnorter results are showing up 
> with their sig_id
> as their name (i.e. "1") instead of the "ciscoacl-110/0->0" 
> type entries.
> I can't be bothered doing any of the reference table hooks - 
> as there isn't
> much point yet - but I'm wondering if that's the problem?
> Any ideas - please? :-)
> -- 
> Cheers
> Jason Haar
> Information Security Manager, Trimble Navigation Ltd.
> Phone: +64 3 9635 377 Fax: +64 3 9635 417
> PGP Fingerprint: 7A2E 0407 C9A6 CAF6 2B9F 8422 C063 5EBB FE1D 66D1
> -------------------------------------------------------
> This SF.net email is sponsored by: Etnus, makers of 
> TotalView, The debugger 
> for complex code. Debugging C/C++ programs can leave you 
> feeling lost and 
> disoriented. TotalView can help you find your way. Available 
> on major UNIX 
> and Linux platforms. Try it free. www.etnus.com
> _______________________________________________
> Snort-users mailing list
> Snort-users at lists.sourceforge.net
> Go to this URL to change user options or unsubscribe:
> https://lists.sourceforge.net/lists/listinfo/snort-users
> Snort-users list archive:
> http://www.geocrawler.com/redir-sf.php3?list=snort-users

More information about the Snort-users mailing list