24 | | #apt-get install postgres-8.1 postgresql-plperl-8.1 |
25 | | #cpan install Math::Expression |
| 24 | # apt-get install postgres-8.1 postgresql-plperl-8.1 |
| 25 | # su postgres -c "createlang plperl template1" |
| 26 | # su postgres -c "createlang plperlu template1" |
| 27 | # su postgres -c "createlang plpgsql template1" |
| 28 | # cpan install Math::Expression |
| 29 | # su postgres -c "psql template1" |
| 30 | template1=# create database omnidata; |
| 31 | template1=# \q |
| 32 | # su postgres -c "psql omnidata" |
| 33 | omnidata=# CREATE GROUP omnidata |
| 34 | WITH SYSID 3101980; |
| 35 | CREATE GROUP omnidatavizualizare; |
| 36 | CREATE GROUP omnidatainserare; |
| 37 | CREATE GROUP omnidatamodificare; |
| 38 | CREATE GROUP omnidatastergere; |
| 39 | CREATE USER gestiune |
| 40 | WITH SYSID 31031980 PASSWORD 'omnidata' |
| 41 | CREATEDB CREATEUSER; |
| 42 | ALTER GROUP omnidata ADD USER gestiune; |
| 43 | CREATE TABLE public.scheme |
| 44 | ( |
| 45 | id serial NOT NULL, |
| 46 | nume varchar(50) NOT NULL, |
| 47 | numefirma varchar(50), |
| 48 | directorgeneral varchar(50), |
| 49 | contabilsef varchar(50), |
| 50 | judet varchar(25), |
| 51 | strada varchar(25), |
| 52 | nr varchar(25), |
| 53 | codpostal varchar(25), |
| 54 | bloc varchar(10), |
| 55 | scara varchar(10), |
| 56 | etaj varchar(5), |
| 57 | apartament varchar(3), |
| 58 | telefon varchar(25), |
| 59 | email varchar(25), |
| 60 | iml varchar(50), |
| 61 | localitate varchar(25), |
| 62 | registrucomertului varchar(25), |
| 63 | cui varchar(25), |
| 64 | sector varchar(15), |
| 65 | luna int2 DEFAULT 3, |
| 66 | anul int2 DEFAULT 2006, |
| 67 | versiune_major int2 default 0, |
| 68 | versiune_minor int2 default 0, |
| 69 | versiune_text varchar(25), |
| 70 | CONSTRAINT "cheiePrimaraScheme" PRIMARY KEY (id) |
| 71 | ) WITHOUT OIDS; |
| 72 | REVOKE ALL ON TABLE public.scheme FROM public; |
| 73 | GRANT ALL ON TABLE public.scheme TO GROUP omnidata; |