Am 2012-07-20 15:41, schrieb rodrigo tavares: 

> Hello
Stevan,

Hello Rodrigo, 

> Them, i login with postgres user. See the
results. 
> postgres=# d dspam_virtual_uids;
> Not found none relation
called "dspam_virtual_uids".
> postgres=# d+ dspam_virtual_uids;
> Not
found none relation called "dspam_virtual_uids". 
> Now, i try to
recreate tables: 
> postgres@debian-expresso:~$ psql -u dspam <
pgsql_objects.sql
> /usr/lib/postgresql/8.4/bin/psql: invalid option --
'u'
> Try "psql --help" to obter information adition.
>
postgres@debian-expresso:~$ psql dspam < pgsql_objects.sql
> ERROR:
relation "dspam_token_data" exist
> ERROR: relation
"dspam_signature_data" exist
> ERROR: relation "dspam_stats" já existe
>
ERROR: relation "dspam_preferences" já existe
> ERROR: function
"lookup_tokens" yet existe with sames argument types 
> ERROR: funtion
"lookup_tokens" yet existe with sames argument types
> ALTER TABLE
>
ALTER TABLE
> ALTER TABLE
> ALTER TABLE
> ANALYZE

This is wrong. You
can not just import the pgsql_objects.sql that way into PostgreSQL. I
think the documentation of the DSPAM PostgreSQL driver is explaining how
to create that the proper way. 
At least you must have something like
this: 
\set ON_ERROR_STOP = on;
CREATE USER [DSPAM_USER_NAME_HERE] WITH
PASSWORD '[DSPAM_USER_PASSWORD_HERE]' NOCREATEDB NOCREATEUSER;
CREATE
DATABASE [DSPAM_DB_NAME_HERE];
GRANT ALL PRIVILEGES ON DATABASE
[DSPAM_DB_NAME_HERE] TO [DSPAM_USER_NAME_HERE];
GRANT ALL PRIVILEGES ON
SCHEMA public TO [DSPAM_USER_NAME_HERE];
UPDATE pg_database SET
datdba=(SELECT usesysid FROM pg_shadow WHERE
usename='[DSPAM_USER_NAME_HERE]') WHERE
datname='[DSPAM_DB_NAME_HERE]';
\c [DSPAM_DB_NAME_HERE];
CREATE FUNCTION
plpgsql_call_handler() RETURNS language_handler AS '$libdir/plpgsql',
'plpgsql_call_handler' LANGUAGE c;
CREATE FUNCTION
plpgsql_validator(oid) RETURNS void AS '$libdir/plpgsql',
'plpgsql_validator' LANGUAGE c;
CREATE TRUSTED PROCEDURAL LANGUAGE
plpgsql HANDLER plpgsql_call_handler VALIDATOR plpgsql_validator; 

And
then you import the SQL file with 
psql -d [DSPAM_DB_NAME_HERE] -U
[DSPAM_USER_NAME_HERE] < pgsql_objects.sql 
psql -d [DSPAM_DB_NAME_HERE]
-U [DSPAM_USER_NAME_HERE] < virtual_users.sql 

postgres@debi

> sp;
.bash_history pgsql_objects.sql .psql_history .viminfo
virtual_users.sql
> postgres@debian-expresso:~$ psql dspam <
virtual_users.sql
> ERROR: relation "dspam_virtual_uids_seq" yet exist
>
ERROR: relation "dspam_virtual_uids" yet existe
> ERROR: relation
"id_virtual_uids_01" yet existe
> ERROR: relation
"id_virtual_uids_02"yet existe 
> Thanks ! 
> Please read the
documentation. It should have the info you need for creating that
PostgreSQL database.
color: #fff; font-family: Courier New, courier,
monaco, monospace, sans-serif; font-size: 10pt;"> 
Rodrigo Faria


-------------------------


Links:
------
[1]
http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
[2]
mailto:Dspam-user@lists.sourceforge.net
[3]
https://lists.sourceforge.net/lists/listinfo/dspam-user
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Dspam-user mailing list
Dspam-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspam-user

Reply via email to