Re: [GENERAL] cloning database

2014-09-20 Thread Philipp Kraus
On 2014-09-19 11:04:36 +, hubert depesz lubaczewski said: On Fri, Sep 19, 2014 at 8:35 AM, Philipp Kraus wrote: Is there a buildin way to clone the "database_source" with all structure and data into a new database "database1..150" ? assuming you're using bas

[GENERAL] cloning database

2014-09-18 Thread Philipp Kraus
Hello, I need around 150 copies of a database (for an exam). I have got a database with tables and data and for my exam I would copy this database in his way: database_source database1 database2 …. database150 Is there a buildin way to clone the "database_source" with all structure and dat

[GENERAL] build from source with MSVC

2013-12-11 Thread Philipp Kraus
Hello, I must build the pg library from sources under MSVC 2010 and later 2012. Under OSX & Linux I call the configure / make tools and I can build the lib well, but is there a project structure for building under MSVC? So how can I build the postgres library (shared / static version) under MSVC

Re: [GENERAL] trigger without trigger call

2013-10-14 Thread Philipp Kraus
Am 14.10.2013 um 11:49 schrieb Alban Hertroys : > On Oct 14, 2013, at 8:18, Philipp Kraus wrote: > >> Hello, >> >> I have written a update & delete trigger of a table. >> My delete trigger runs an update statement but this create a (semantic) >>

[GENERAL] trigger without trigger call

2013-10-13 Thread Philipp Kraus
Hello, I have written a update & delete trigger of a table. My delete trigger runs an update statement but this create a (semantic) problem. How can I disable the update trigger for only this update call within the delete trigger? So my delete trigger need not call the update trigger Thanks Phi

Re: [GENERAL] databse version

2013-06-11 Thread Philipp Kraus
On 2013-06-11 00:42:59 +0200, John R Pierce said: On 6/10/2013 12:52 AM, Philipp Kraus wrote: I'm creating a database and I have got a table with a "version" field. Can I update on structure changes (DDL) like create / update table increment this field automatically? I would l

[GENERAL] databse version

2013-06-10 Thread Philipp Kraus
Hello, I'm creating a database and I have got a table with a "version" field. Can I update on structure changes (DDL) like create / update table increment this field automatically? I would like to create a versionizing for my database which counts the changes. IMHO I need a trigger, which is r

Re: [GENERAL] dataset lock

2013-04-17 Thread Philipp Kraus
On 2013-04-17 09:18:13 +0200, Albe Laurenz said: Philipp Kraus wrote: My PG database is connected to differend cluster nodes (MPI). Each programm / process on each node are independed and run the SQL select * from table where status = waiting after that I update the row with the update

Re: [GENERAL] dataset lock

2013-04-16 Thread Philipp Kraus
On 2013-04-16 19:11:20 +0200, Steve Atkins said: On Apr 16, 2013, at 7:50 AM, Philipp Kraus wrote: Hello, I use a PG database on a HPC system (cluster). My processes get a dataset from the database and change the row, each process is independend. My table shows something like: id

[GENERAL] dataset lock

2013-04-16 Thread Philipp Kraus
Hello, I use a PG database on a HPC system (cluster). My processes get a dataset from the database and change the row, each process is independend. My table shows something like: id, status, data id = PK a unqiue number status a enum value which "open", "waiting", "working", "done" So each proc

[GENERAL] libpq compatibility

2013-02-12 Thread Philipp Kraus
Hello, I'm using PG 9.2.2 with Qt for accessing the server. If I compile Qt with the 9.2.2 libpg, can I use this libpg also with eg 8.3 ? So can I use the libpg with earlier Postgres database versions? Thanks Phil -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make c

Re: [GENERAL] rights for schema

2012-12-31 Thread Philipp Kraus
Am 31.12.2012 um 22:18 schrieb Adrian Klaver: > On 12/31/2012 09:02 AM, Philipp Kraus wrote: >> >> Am 31.12.2012 um 15:54 schrieb Adrian Klaver: >> >>> On 12/31/2012 05:41 AM, Philipp Kraus wrote: >>>> >>>> Am 31.12.2012 um 02:11 schrieb

[GENERAL] trigger on adding / deleting / modify user on pg_authid

2012-12-31 Thread Philipp Kraus
Hello, can I create on PG 9.1 or newer a trigger or something other, that runs a function if a new user is added, changed, deleted to / on the database? I have got a "usertable" which stores some additional user information (full name, mail address, etc) and I would like to create default data i

Re: [GENERAL] rights for schema

2012-12-31 Thread Philipp Kraus
Am 31.12.2012 um 18:02 schrieb Philipp Kraus: > > Am 31.12.2012 um 15:54 schrieb Adrian Klaver: > >> On 12/31/2012 05:41 AM, Philipp Kraus wrote: >>> >>> Am 31.12.2012 um 02:11 schrieb Adrian Klaver: >>> >> >>>>

Re: [GENERAL] rights for schema

2012-12-31 Thread Philipp Kraus
Am 31.12.2012 um 15:54 schrieb Adrian Klaver: > On 12/31/2012 05:41 AM, Philipp Kraus wrote: >> >> Am 31.12.2012 um 02:11 schrieb Adrian Klaver: >> > >>> >>> Actually as of 9.0 that is not strictly true: >>> http://www.postgresql.org/d

Re: [GENERAL] rights for schema

2012-12-31 Thread Philipp Kraus
Am 31.12.2012 um 02:11 schrieb Adrian Klaver: > On 12/30/2012 04:06 PM, Christian Hammers wrote: >> Am Sun, 30 Dec 2012 15:54:32 +0100 >> schrieb Philipp Kraus : >> >>> Hello, >>> >>> can I set all rights to a schema and its content? I have d

Re: [GENERAL] rights for schema

2012-12-31 Thread Philipp Kraus
Am 31.12.2012 um 02:11 schrieb Adrian Klaver: > On 12/30/2012 04:06 PM, Christian Hammers wrote: >> Am Sun, 30 Dec 2012 15:54:32 +0100 >> schrieb Philipp Kraus : >> >>> Hello, >>> >>> can I set all rights to a schema and its content? I have d

[GENERAL] view with insert rule

2012-12-30 Thread Philipp Kraus
Hello, I use some views for creating some different accessibility of the table data. For inserting I use a rule, which works at the moment, but my rules runs the SQL statement "insert into myschema.mytable values (new.*)" If I run on my view the command: insert into myview (field1, field4) value

[GENERAL] rights for schema

2012-12-30 Thread Philipp Kraus
Hello, can I set all rights to a schema and its content? I have different schema and in the public schema all users should be do everything (select, update, delete, call functions, etc). Also if I add a new user, the user should be get also the rights. My other schemas are only access by the da

Re: [GENERAL] logger table

2012-12-25 Thread Philipp Kraus
Am 25.12.2012 17:19, schrieb Jason Dusek: 2012/12/24 Philipp Kraus : I need some ideas for creating a PG based logger. I have got a job, which can run more than one time. So the PK is at the moment jobid & cycle number. The inserts in this table are in parallel with the same username

[GENERAL] dataset user access

2012-12-25 Thread Philipp Kraus
Hello, I need a idea to solve the following problem: I have a table which datasets are owned by th pg login user. If the pg user is deleted, the owner of the dataset should be set to null, that means that only a super user can access to the dataset. If the username is renamed the owner of the

[GENERAL] check user in group

2012-12-25 Thread Philipp Kraus
Hello, how can I check if a user is within a group? I use current_user() to get the logged-in user, but I have a group "service" and I need a check if the user is member of the group Thanks Phil -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your sub

[GENERAL] logger table

2012-12-23 Thread Philipp Kraus
Hello, I need some ideas for creating a PG based logger. I have got a job, which can run more than one time. So the PK is at the moment jobid & cycle number. The inserts in this table are in parallel with the same username from different host (clustering). The user calls in the executable "mypri

[GENERAL] rule / trigger definition

2012-12-22 Thread Philipp Kraus
Hello, I'm aktually create a database with postgres, but I'm a long time out-of-date working with Postgres (I think I have worked last time with PG 5.4), so I need some help to create a working trigger / rule solution: I have got a master table and a slave table (1:N). The master table create a

[GENERAL] libpq

2012-12-04 Thread Philipp Kraus
Hello, I would like to build a C program, that can access to a Postgres database and I would like to compile the client myself. I think I need "libpq" for access the database, but I can not download the sources of the driver, because www.libpqxx.org seems to be down. Where can download the sou

[GENERAL] full text index / search

2012-06-15 Thread Philipp Kraus
Hello, I have created a table with a text field under PG 9.1, that should store source codes. I would like to search in this text field with regular expressions. I think I need a full-text-index, do I? How can I create this index, do I need some additional extensions? The PG server runs under O

[GENERAL] trigger on view returning created serial

2012-06-12 Thread Philipp Kraus
Hello, I have created a view and on this view a trigger, which is called on an insert command on the view. Within the trigger I run an insert on a table and one of the table fields uses a serial sequence, that creates values. If I run in the trigger after the insert a "return NEW", the field (i

[GENERAL] pass NEW / OLD variable in trigger to table

2012-06-09 Thread Philipp Kraus
Hello, I'm using some trigger functions on a view. Can I pass the NEW / OLD variable to the table of the view? An excerpt of my view shows: IF TG_OP = 'INSERT' then insert into mytable (name, data, commentdata, history) values (NEW.name, NEW.data, NEW.commentdata, NEW.history); ernd if

Re: [GENERAL] acessibility for tables

2012-06-07 Thread Philipp Kraus
including some test data). then people on the list can help cheers, WBL On Thu, Jun 7, 2012 at 1:59 AM, Philipp Kraus wrote: Hello, On 2012-06-06 09:24:16 +0200, Albe Laurenz said: You can define INSTEAD OF triggers on a view so that you can insert, update and delete on it.  The trigger p

Re: [GENERAL] acessibility for tables

2012-06-06 Thread Philipp Kraus
Hello, On 2012-06-06 09:24:16 +0200, Albe Laurenz said: You can define INSTEAD OF triggers on a view so that you can insert, update and delete on it. The trigger performs an operation on the base table instead. I have created the trigger with "insead of". If I try to insert a row into the vi

Re: [GENERAL] acessibility for tables

2012-06-06 Thread Philipp Kraus
Anfang der weitergeleiteten E-Mail: > Von: Willy-Bas Loos > Datum: 6. Juni 2012 13:57:45 MESZ > An: Kraus Philipp > Kopie: Albe Laurenz , pgsql-general@postgresql.org > Betreff: Re: [GENERAL] acessibility for tables > > Do you mean, you want everyone to see the data, but only the "owner" can >