[GENERAL] How to iterate fields into a NEW.* RECORD in a TRIGGER procedure ?

2010-10-14 Thread Bruno Baguette
, I have to iterate fields into the NEW.* How can I do that iteration ? Many thanks in advance for any tips ! Regards, -- Bruno Baguette -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] How can I get one OLD.* field in a dynamic query inside a trigger function ?

2009-10-25 Thread Bruno Baguette
Le 24/10/09 22:57, Pavel Stehule a écrit : 2009/10/24 Bruno Baguette : Which one would you advise me to learn and use, instead of PL/pgSQL ? It depends on what you are know (if you known better perl or pthon). Usually I using mainly plpgsql and on some functions plperl and C. plpgsql is good

Re: [GENERAL] How can I get one OLD.* field in a dynamic query inside a trigger function ?

2009-10-24 Thread Bruno Baguette
x27;t ? Once again, thanks a lot for your tips ! :-) Kind regards, -- Bruno Baguette - bruno.bague...@gmail.com -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] How can I get one OLD.* field in a dynamic query inside a trigger function ?

2009-10-24 Thread Bruno Baguette
Le 24/10/09 06:46, Pavel Stehule a écrit : 2009/10/24 Bruno Baguette : Hello ! I'm trying to write a little trigger function with variable arguments quantity (at least one, but can be 2,3,4 arguments). Theses arguments are fields name, so only varchar variable. Since it is a dynamic que

[GENERAL] How can I get one OLD.* field in a dynamic query inside a trigger function ?

2009-10-23 Thread Bruno Baguette
; END LOOP; RETURN OLD; END; $delete_acl_trigger$ LANGUAGE plpgsql; But, when the trigger is triggered, I receive this error message : "Query failed: ERROR: OLD used in query that is not in a rule" How can I get the value of the OLD.' || TG_ARGV[i] field ? Many thanks

Re: [GENERAL] Adding ACL notion to existing tables

2009-08-12 Thread Bruno Baguette
Le 08/08/09 02:13, Bruno Baguette a écrit : As you can see, I'm not really convinced for SOLUTION A or SOLUTION B as they have both some CONS. And they will both require some stored procedures to check references integrity. Solution B seems to be less weird to me. What would you do in

[GENERAL] Adding ACL notion to existing tables

2009-08-07 Thread Bruno Baguette
ey have both some CONS. And they will both require some stored procedures to check references integrity. Solution B seems to be less weird to me. What would you do in that kind of situation ? Which solution would you take ? Would you uses another design to solve that problem ? Feel free to

[GENERAL] Will PostgreSQL 8.4 allow having different encoding databases on a same PostgreSQL server ?

2009-04-09 Thread Bruno Baguette
nderstand right ? Thanks in advance for any informations about that feature ! Regards, -- Bruno Baguette - bruno.bague...@gmail.com -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] How to split timestamps values by 24h slices ?

2009-04-08 Thread Bruno Baguette
Le 30/03/09 05:39, Osvaldo Kussama a écrit : 2009/3/29 Bruno Baguette : I would like to do a SELECT of that table, but by splitting by 24h day : Try: bdteste=# \set ini '\'2009-03-30 14:50\'::timestamp' bdteste=# \set fim '\'2009-04-01 19:00\'::timestamp

[GENERAL] How to split timestamps values by 24h slices ?

2009-03-29 Thread Bruno Baguette
-01 00h00 | 2009-04-01 19h00 I was thinking of doing that by playing with three UNION requests (beginning date, intermediate(s) date(s) and ending dates. Am i going in the right way or is there a cleanest (or more elegant) way to do that ? Thanks in advance ! Regards, -- Bruno Baguette --

Re: [GENERAL] [PLPGSQL] PERFORM into an EXECUTE allowed ?

2008-10-27 Thread Bruno Baguette
he doc with an additionnal example with such a EXECUTE that put results in a target. Thanks for the light ! :-) Regards, -- Bruno Baguette -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] [PLPGSQL] PERFORM into an EXECUTE allowed ?

2008-10-27 Thread Bruno Baguette
Le 27/10/08 05:16, Tom Lane a écrit : Bruno Baguette <[EMAIL PROTECTED]> writes: EXECUTE 'PERFORM COUNT(*)' || ' FROM ' || quote_ident(TG_RELNAME) || ' GROUP BY ' || quote_ident(column_name_to_check) || ' HAVING COUNT(*) > 1';

[GENERAL] [PLPGSQL] PERFORM into an EXECUTE allowed ?

2008-10-26 Thread Bruno Baguette
s it allowed to do a PERFORM into an EXECUTE ? I didn't see any notes about such limitation in the doc, but I ask in case of... :-/ Many thanks in advance ! Regards, -- Bruno Baguette - [EMAIL PROTECTED] -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make ch

[GENERAL] How can I get the first and last date of a week, based on the week number and the year

2008-02-26 Thread Bruno Baguette
and the 31/12 || year. But I find that solution quite dirty and ressources consumming. Is there a cleanest way to do that ? Many thanks in advance ! Regards, -- Bruno Baguette - [EMAIL PROTECTED] ---(end of broadcast)--- TIP 3: Have you

Re: [GENERAL] "Ghost" colmumn with primary key

2006-06-26 Thread Bruno Baguette
omerID" FROM customers; Hope this helps, -- Bruno BAGUETTE - [EMAIL PROTECTED] "Nous n'avons pas à garantir la sécurité des produits alimentaires génétiquement modifiés (OGM). Notre intérêt est d'en vendre le plus possible." Propos de Monsanto, in le Monde Diploma

[GENERAL] How can I known the size of a database, table by table ?

2006-03-27 Thread Bruno Baguette
Hello, I works on a PostgreSQL 8.0.4 database, and I would like to known the size (in bytes, Mbytes or anything else) of that database, for each table. How can I do that ? Thanks in advance ! -- Bruno BAGUETTE ---(end of broadcast)--- TIP 5

[GENERAL] Problem using NULLIF in a CASE expression

2005-09-09 Thread Bruno BAGUETTE
operator does not exist: text = boolean HINT: No operator matches the given name and argument type(s). You may need to add explicit type casts. Why this query does not accept the NULLIF ? What can I do to solve that problem ? Thanks in advance ! Bruno BAGUETTE. ---(end of

[GENERAL] Primary key inheritance problem

2004-08-29 Thread Bruno Baguette
given keys for referenced table "child_foo" What can I do to solve that problem ? Thanks in advance for your help ! -- Bruno Baguette - [EMAIL PROTECTED] ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unre

[GENERAL] SQL norm views to describes tables (and probably some other things) of a database ?

2004-05-17 Thread Bruno BAGUETTE
vance ! --- Bruno BAGUETTE - [EMAIL PROTECTED] ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html

[GENERAL] Restart increment to 0 each year = re-invent the sequences mecanism ?

2004-04-26 Thread Bruno Baguette
004, myseq_2004, my_seq_2005,... and use a concatenation of the myseq_ string and the current year when calling nextval and curvall ? Or is there another way to do that ? Thanks in advance :-) -- Bruno Baguette - [EMAIL PROTECTED] ---(end of broadcast)--- TI

[GENERAL] Parse error a in short stored procedure : What's wrong ?

2004-04-16 Thread Bruno BAGUETTE
x27; || ''''organization'',LOWER(SUBSTR(NEW.org_name, 1, 1''; Do you see something to be wrong in theses lignes ? Thanks very much for your help ! PS : Is there a tool (on Linux, MacOsX or Windows) that help the writing of theses stored procedures ? -- Bruno BAGUETTE - [EMAIL PROTECTED] ---(end of broadcast)--- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match

RE : [GENERAL] Postgreqsl & Package

2003-10-23 Thread Bruno BAGUETTE
anwser :-) Regards, --- Bruno BAGUETTE - [EMAIL PROTECTED] ---(end of broadcast)--- TIP 8: explain analyze is your friend

RE : RE : [GENERAL] mod_auth_pgsql 2.0.1 don't close the backend

2003-10-05 Thread Bruno BAGUETTE
odule (and, in the same time, promoting PostgreSQL). Regards, --- Bruno BAGUETTE - [EMAIL PROTECTED] ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

RE : [GENERAL] mod_auth_pgsql 2.0.1 don't close the backend connection

2003-10-03 Thread Bruno BAGUETTE
haps he has > some input? I don't know, I've written to the maintainer but until now I never received any answer from him. Is there a CVS somewhere with that project ? Regards, --- Bruno BAGUETTE - [EMAIL PROTECTED] make_errors.log Description

RE : [GENERAL] Is the use of array as PL/PGSQL function arguments ?

2003-10-02 Thread Bruno BAGUETTE
nties, I never done a patch for PostgreSQL). In the meantime, is it possible to add this feature in the TODO list ? Regards, --- Bruno BAGUETTE - [EMAIL PROTECTED] ---(end of broadcast)--- TIP 2: you can get

[GENERAL] Stored procedures with variable number of args ?

2003-09-30 Thread Bruno BAGUETTE
Hello, Is it possible to make PL/PGSQL stored procedures with a variable number of args ? If yes, is it possible to have a sample ? Thanks you in advance :-) --- Bruno BAGUETTE - [EMAIL PROTECTED] ---(end of broadcast

[GENERAL] mod_auth_pgsql 2.0.1 don't close the backend connection ?

2003-09-24 Thread Bruno BAGUETTE
alue is 256 and there's only 5 users at the same time on this server (Intranet server). Is it a bug in the mod_auth_pgsql that don't close the connection or is it a setup somewhere ? Thanks in advance for your help ! ----- Bruno BA

[GENERAL] How to convert a UnixTimestamp to a PostgreSQL date without using ::abstime ?

2003-09-09 Thread Bruno BAGUETTE
at can I use to replace the abstime type in ? Thanks in advance :-) --- Bruno BAGUETTE - [EMAIL PROTECTED] ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate s

RE : [GENERAL] Reminder => Poll @ Codewalkers

2003-07-27 Thread Bruno BAGUETTE
Hello everybody, > 28% for postgresql now. Second after MySQL. PostgreSQL rating is currently decreasing : 22% Don't forget to vote for your favorite RDBMS on http://codewalkers.com/ ! :-) --- Bruno BAGUETTE - [EMAIL P

RE : [pgadmin-hackers] [GENERAL] pgAdmin III - Call for Translators

2003-07-04 Thread Bruno BAGUETTE
ke "déclancheur" for "trigger", This is not "déclancheur", the right writting is "déclencheur" ! :-) Do you need french translation ? (I live in Belgium). Regards, --- Bruno BAGUETTE - [EMAIL PROTE

[GENERAL] [REPOST] Problem for dumping a 6.5.2 database

2003-07-03 Thread Bruno BAGUETTE
why the pg_dump is not working... :-( Can you help me ? Thanks in advance ! --- Bruno BAGUETTE - [EMAIL PROTECTED] ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

[GENERAL] Difficulties to do a migration from Oracle8i to PostgreSQL 7.3.3

2003-06-29 Thread Bruno BAGUETTE
ion, I don't have more ideas to help him... Is there some people that have do that kind of migration ? Is there a FAQ about migrating from Oracle to PostgreSQL ? Thanks really much in advance for him ! :-) ----- Bruno BAGUETTE - [EMAIL PROTECTED]

RE : [GENERAL] [pgsql-advocacy] interesting PHP/MySQL thread

2003-06-23 Thread Bruno BAGUETTE
ng PHP5 (which should have a better object model with the possibility to throws some exceptions) and newer PEAR::DB that uses the PHP5 possibilities. So, I will still use the pg_ functions for several years again before having a new look on that ! :-) Cheers,