[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Pg-database.sql



On 7/18/07, Seneca Cunningham <..hidden..> wrote:
On Wed, Jul 18, 2007 at 11:33:19AM -0500, David Bandel wrote:
> First problem I've run into is creating the ledgersmb database using
> the sql/Pg-database.sql script.
>
> Line 283 of said script has created a table named note and is trying
> to create a column named vector of type tsvector, but no such type has
> been declared.
>
> If someone could clue me in what they're trying to accomplish (an
> array perhaps?) and if so I can fix, test, and provide a patch.

Read INSTALL.  tsvector is part of tsearch2.

Thanx Seneca (guess I need to learn to read).

However, need to add tablefunc.sql to the INSTALL file.  Did not find
it mentioned, but apparently that is also required for the connectby()
function.

Patch attached.

David A. Bandel
--
Focus on the dream, not the competition.
           - Nemesis Air Racing Team motto
--- INSTALL.orig	2007-07-18 12:26:58.000000000 -0500
+++ INSTALL	2007-07-18 12:42:14.000000000 -0500
@@ -36,29 +36,33 @@
 3)  Decide where to put the user/session management tables.  In general, we
 recommend as follows:
   a)  Single dataset installations should use the user tables in the dataset.
-  b)  Multicompany installations should use user tables in a separate dataset
+  b)  Multi-company installations should use user tables in a separate dataset
       from any accounting data.
 
 4)  Install Tsearch2 Full Text indexing engine for PostgreSQL (not optional)
   a) If you installed PostgreSQL from source, Tsearch2 is in contrib.
   b) If you installed from package, you will need the package
-  postgresql-contrib or equivelant
-  c) Use psql to apply the tsearch2.sql. The file is normally installed to
+  postgresql-contrib or equivalent
+  c) Use psql to apply the tsearch2.sql to template1. The file is normally 
+  installed to
   /usr/share/postgresql/contrib/tsearch2.sql or
   //usr/share/postgresql/<version>/contrib/tsearch2.sql
 
-5)  Create central database
+5)  Install tablefunc.sql for PostgreSQL (not optional)
+  See notes in 4 above for location of script and apply to template1.
 
-  a) cd to the sql/ directory of the new ledger directory.
-  b) run "psql" with appropriate options to connect to your database.
-  c) Run the SQL script Pg-central.sql.
+6)  Create central database
+  a) create the ledgersmb role (optional)
+  b) create the ledgersmb database (if using a multi-company central db)
+  c) cd to the sql/ directory of the new ledger directory.
+  d) load the Pg-database.sql script into ledgersmb or your database.
 
-6)  Set the admin password:
-  a)  From psql, determine what admin password you wish to use.  Then type:
+7)  Set the admin password:
+  From psql, determine what admin password you wish to use.  Then type:
       "update users_conf set password = md5('my_password');"
       Naturally you would use your password instead of my_password.
 
-6)  Edit the ledger-smb.conf file as appropriate.
+8)  Edit the ledger-smb.conf file as appropriate.
 
 Congratulations, you have manually installed LedgerSMB 1.3.