My script inst/init-base didn't run
От | lise chhay |
---|---|
Тема | My script inst/init-base didn't run |
Дата | |
Msg-id | 20040610101337.4AAA91F4FEB@ws1-2.us4.outblaze.com обсуждение исходный текст |
Список | pgsql-admin |
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
В списке pgsql-admin по дате отправления: