[GENERAL] generic crosstab

2007-11-06 Thread Toni Casueps
I'm using the PostgreSQL crosstab functions to do something like this: From this table ... ax 10 bx 13 ay 11 by 17 ... I get: xy a10 11 b13 17 To get the second table I have to specify the field list when I call t

[GENERAL] copy row tree

2007-01-17 Thread Toni Casueps
I have a set of tables with one-to-many relationships between them: T1 <-->> T2 <-->> T3 <-->> T4 I need to copy some rows of these tables to another set of tables which have the same fields. There are two rows on T1 that I want to copy, and then those rows of T2 linked to the other ones, and

[GENERAL] sync linux and postgresql users and groups

2006-11-15 Thread Toni Casueps
Is this possible? It want to avoid the need for two passwords, one for login and another one for the database. The user accounts and the Postgresql server are on the same machine. _ Moda para esta temporada. Ponte al día de todas

[GENERAL] dependencies between objects

2006-02-02 Thread Toni Casueps
I have got some views (for example view B) that use another views (for example view A) in the FROM clause. If I want to change view A, and it doesn't allow me to (for example adding a new column), another way would be dropping A and recreating it with the new column, but it doesn't allow me to

[GENERAL] accessing text of the query in a rule

2005-12-02 Thread Toni Casueps
I am making rules for a table and I want to know what values or variables can I use apart from the "new..." and old... fields, for example I would like to read the SQL query that the user wrote that caused this rule to execute. Can this be done? ---(end of broadcast)-