pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: lise chhay <lise.chhay@mail.com>
To: pgsql-admin@postgresql.org
Subject: My script inst/init-base didn't run
Date: Thu, 10 Jun 2004 05:13:37 -0500
Message-ID: <20040610101337.4AAA91F4FEB@ws1-2.us4.outblaze.com> (raw)

 I executed the script inst/creer-base, the script run, because when I did :  
 $ psql auth  
 auth=# \dt  
 List of relations  
 Schema   |  name           |    Type    |   Owner  
 -------------------------------------------------  
 public   | config          |   table    | postgres  
 public   | groupes         |  table     | postgres  
 public   | membres         |  table     | postgres  
 public   | utilisateurs    |  table     | postgres  
   
 auth=# \q  
 
------------------------------------------------------------------------- 
 
The content of my script inst/init-base is : 
 
PGPASSWORD=postgres 
export PGPASSWORD 
 
BASE=auth 
 
psql -q $BASE <<'EOF' 
 
    INSERT INTO groupes (groupe, descr) 
                VALUES ('postgres', 'Administrateurs de la base Auth') ; 
 
    -- mot de passe = "a-changer" 
    INSERT INTO utilisateurs (login, password, nom, prenom) 
                VALUES ('postgres', 'postgres', '$1$qYOi/u4K$J0hEbJMRy2KmZP/yjl2Te/', 'postgres') ; 
 
    INSERT INTO membres (login, groupe) 
                VALUES ('postgres', 'postgres') ; 
 
EOF 
 
------------------------------------------------------------------------------------------------------- 
 
My script inst/init-base didn't run, it has given the following errors :   
ERROR: duplicate key violates unique constraint "groupes_pkey" 
ERROR: function soundex(text) does not exist 
HINT:  No function matches the given name and argument types. You may need to add explicit type casts. 
CONTEXT:  PL/pgSQL function "ajouter_soundex" line 2 at assignment 
ERROR:  insert or update on table "membres" violates foreign key constraint "$1" 
DETAIL:  Key (login)=(postgres) is not present in table "utilisateurs". 
 
I've the program soundex.sql which contains the function CREATE FUNCTION soundex (TEXT) RETURNS TEXT AS.  
If I must  execute the program soundex.sql, can you tell me how to execute the program soundex.sql, please. 
 
Can you explain me for all these errors, please. 
Thanks   
-- 
___________________________________________________________
Sign-up for Ads Free at Mail.com
http://promo.mail.com/adsfreejump.htm




Message-ID: <20040610101337.4AAA91F4FEB@ws1-2.us4.outblaze.com>
Permalink:  ../20040610101337.4AAA91F4FEB@ws1-2.us4.outblaze.com/
Also on:    postgresql.org/message-id/20040610101337.4AAA91F4FEB@ws1-2.us4.outblaze.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: lise.chhay@mail.com
  Subject: Re: My script inst/init-base didn't run
  In-Reply-To: <20040610101337.4AAA91F4FEB@ws1-2.us4.outblaze.com>
  References: <20040610101337.4AAA91F4FEB@ws1-2.us4.outblaze.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox