[HACKERS] Patch to implement pg_current_logfile() function

2016-03-09 Thread Gilles Darold
If the use of the postmater.pid file is a problem I can easily modify the patch to use an alternate file. Best regards, -- Gilles Darold Consultant PostgreSQL http://dalibo.com - http://dalibo.org diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index 4b5ee81..313403e 100644 -

Re: [HACKERS] Patch to implement pg_current_logfile() function

2016-03-10 Thread Gilles Darold
Le 10/03/2016 16:26, Tom Lane a écrit : > Robert Haas writes: >> On Wed, Mar 9, 2016 at 12:32 PM, Gilles Darold >> wrote: >>> I choose to allow the log collector to write his current log file name >>> into the lock file 'postmaster.pid'. >> Gosh

Re: [HACKERS] Patch to implement pg_current_logfile() function

2016-03-11 Thread Gilles Darold
Le 11/03/2016 10:49, Shulgin, Oleksandr a écrit : > On Thu, Mar 10, 2016 at 9:05 PM, Tom Lane <mailto:t...@sss.pgh.pa.us>> wrote: > > Gilles Darold <mailto:gilles.dar...@dalibo.com>> writes: > > Then, should I have to use an alternate file

Re: [HACKERS] Patch to implement pg_current_logfile() function

2016-03-11 Thread Gilles Darold
Le 11/03/2016 15:22, Tom Lane a écrit : > Gilles Darold writes: >> Le 11/03/2016 10:49, Shulgin, Oleksandr a écrit : >>> Would it make sense to have it as a symlink instead? >> The only cons I see is that it can be more "difficult" with some >> language t

Re: [HACKERS] Patch to implement pg_current_logfile() function

2016-03-23 Thread Gilles Darold
Le 22/03/2016 14:44, Michael Paquier a écrit : > On Sat, Mar 12, 2016 at 12:46 AM, Gilles Darold > wrote: >> Here is the patch rewritten to use alternate file >> $PGDATA/pg_log_filename to store the current log filename used by >> syslogger. All examples used in the first

Re: [HACKERS] Optimizer questions

2016-01-18 Thread Gilles Darold
uc.user_id > ORDER BY > s.mtime > LIMIT 9; > Thanks Bruce for the pointer on this tool, even if it is not perfect I think it can be useful. There's also an on-line version at http://sqlformat.darold.net/ that every one can use without having to install it and

Re: [HACKERS] proposal: schema variables

2017-10-27 Thread Gilles Darold
t; regards > > Pavel > > Great feature that will help for migration. How will you handle CONSTANT declaration? With Oracle it is possible to declare a constant as follow:   varname     CONSTANT INTEGER    := 500; for a variable that can't be changed. Do you plan to add a CON

Re: [HACKERS] proposal: schema variables

2017-10-31 Thread Gilles Darold
ON END DROP" is used otherwise it will persist after the transaction end. I guess that this is the same as using TEMP keyword? -- Gilles Darold Consultant PostgreSQL http://dalibo.com - http://dalibo.org -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] proposal: schema variables

2017-10-31 Thread Gilles Darold
Le 31/10/2017 à 23:36, Gilles Darold a écrit : > Le 31/10/2017 à 22:28, srielau a écrit : >> Pavel, >> >> There is no >> DECLARE TEMP CURSOR >> or >> DECLARE TEMP variable in PLpgSQL >> and >> CREATE TEMP TABLE has a different meaning from what I

Re: [HACKERS] proposal: schema variables

2017-11-01 Thread Gilles Darold
t; doesn't ON TRANSACTION END. > So may be if you elaborate I understand where you are coming from. > > > TEMP has same functionality (and implementation) like our temp tables > - so at session end the temp variables are destroyed, but it can be > assigned to t

Re: [HACKERS] proposal: psql \setfileref

2016-10-03 Thread Gilles Darold
The following review has been posted through the commitfest application: make installcheck-world: tested, passed Implements feature: tested, failed Spec compliant: tested, failed Documentation:not tested Contents & Purpose == This patch adds a new type

Re: [HACKERS] proposal: psql \setfileref

2016-10-03 Thread Gilles Darold
Le 03/10/2016 à 23:03, Robert Haas a écrit : > On Mon, Oct 3, 2016 at 3:54 PM, Gilles Darold wrote: >> 4) An other problem is that like this this patch will allow anyone to upload >> into a >> column the content of any system file that can be read by postgres system >

Re: [HACKERS] proposal: psql \setfileref

2016-10-04 Thread Gilles Darold
Le 03/10/2016 à 23:23, Gilles Darold a écrit : > Le 03/10/2016 à 23:03, Robert Haas a écrit : >> On Mon, Oct 3, 2016 at 3:54 PM, Gilles Darold wrote: >>> 4) An other problem is that like this this patch will allow anyone to >>> upload into a >>> column the co

Re: [HACKERS] proposal: psql \setfileref

2016-10-04 Thread Gilles Darold
Le 04/10/2016 à 17:29, Pavel Stehule a écrit : > > > 2016-10-04 9:18 GMT+02:00 Gilles Darold <mailto:gilles.dar...@dalibo.com>>: > > Le 03/10/2016 à 23:23, Gilles Darold a écrit : > > Le 03/10/2016 à 23:03, Robert Haas a écrit : > >> On Mon

Re: [HACKERS] Patch to implement pg_current_logfile() function

2016-10-07 Thread Gilles Darold
pg_read_file -------- LOG: duration: 0.182 ms statement: select pg_read_file(log) from pg_current_logfile() file(log

Re: [HACKERS] proposal: psql \setfileref

2016-10-10 Thread Gilles Darold
Le 09/10/2016 à 11:48, Pavel Stehule a écrit : > hi > > 2016-10-04 9:18 GMT+02:00 Gilles Darold <mailto:gilles.dar...@dalibo.com>>: > > Le 03/10/2016 à 23:23, Gilles Darold a écrit : > > Le 03/10/2016 à 23:03, Robert Haas a écrit : > >> On Mon

Re: [HACKERS] proposal: psql \setfileref

2016-10-10 Thread Gilles Darold
Le 10/10/2016 à 14:38, Daniel Verite a écrit : > Gilles Darold wrote: > >>postgres=# \setfileref b /dev/random >>postgres=# insert into test (:b); >> >> Process need to be killed using SIGTERM. > This can be fixed by setting sigint_interrupt_enabled

Re: [HACKERS] proposal: psql \setfileref

2016-10-11 Thread Gilles Darold
Le 11/10/2016 à 07:53, Pavel Stehule a écrit : > > > 2016-10-10 19:50 GMT+02:00 Pavel Stehule <mailto:pavel.steh...@gmail.com>>: > > > > 2016-10-10 15:17 GMT+02:00 Gilles Darold <mailto:gilles.dar...@dalibo.com>>: > >

Re: [HACKERS] Patch to implement pg_current_logfile() function

2016-10-14 Thread Gilles Darold
Le 14/10/2016 à 18:50, Christoph Berg a écrit : > Re: To Gilles Darold 2016-10-14 <20161014125406.albrfj3qldiwj...@msg.df7cb.de> >> A better design might be to return two columns instead: >> >> postgres=# select * from pg_current_logfil

Re: [HACKERS] Patch to implement pg_current_logfile() function

2016-10-18 Thread Gilles Darold
Le 14/10/2016 à 20:45, Christoph Berg a écrit : > Re: Gilles Darold 2016-10-14 >> Agree, the usability of the current version is really a pain. What I've >> thought is that the function could return the csv log in all case when >> csvlog is set in log_destination an

Re: [HACKERS] Patch to implement pg_current_logfile() function

2016-10-26 Thread Gilles Darold
Le 26/10/2016 à 05:30, Karl O. Pinc a écrit : > On Tue, 18 Oct 2016 14:18:36 +0200 > Gilles Darold wrote: > >> Here is the v6 of the patch, here is the description of the >> pg_current_logfile() function, I have tried to keep thing as simple as >> possible: >> >

Re: [HACKERS] Patch to implement pg_current_logfile() function

2016-10-27 Thread Gilles Darold
be a good idea? > -1, SHOW is used to display run-time parameters values in our case this is log_destination + log_directory + log_filename. current_logfile is a filename not a parameter name. Thanks again for your reviews. -- Gilles Darold Consultant PostgreSQL http://dalibo.com - http:/

Re: [HACKERS] Patch to implement pg_current_logfile() function

2016-10-28 Thread Gilles Darold
Le 28/10/2016 à 05:09, Karl O. Pinc a écrit : > Hi Gilles, > > On Thu, 27 Oct 2016 19:03:11 +0200 > Gilles Darold wrote: > >> The current v8 of the patch > For your consideration. > > Attached is a patch to apply to v8 of your patch. > > I move

Re: [HACKERS] Patch to implement pg_current_logfile() function

2016-10-29 Thread Gilles Darold
Le 29/10/2016 à 14:38, Karl O. Pinc a écrit : > On Fri, 28 Oct 2016 10:03:37 +0200 > Gilles Darold wrote: > >> ... >> v9 of the patch, attached here. > Attached are 2 more documentation patchs to apply on > top of your v9 patch. > > > patch_pg_current_

Re: [HACKERS] Patch to implement pg_current_logfile() function

2016-10-31 Thread Gilles Darold
Le 30/10/2016 à 08:04, Karl O. Pinc a écrit : > On Sat, 29 Oct 2016 22:00:08 +0200 > Gilles Darold wrote: > >> The attached v10 of the current_logfiles patch include your last >> changes on documentation but not the patch on v9 about the >> user-supplied GUC value. I

Re: [HACKERS] Patch to implement pg_current_logfile() function

2016-10-31 Thread Gilles Darold
Le 31/10/2016 à 04:35, Karl O. Pinc a écrit : > Hi Gilles, > > On Sat, 29 Oct 2016 22:00:08 +0200 > Gilles Darold wrote: > >> The attached v10 of the current_logfiles patch > Attached is a patch to apply on top of the v10 patch. > > It updates current_logfiles only

Re: [HACKERS] Patch to implement pg_current_logfile() function

2016-11-02 Thread Gilles Darold
Le 02/11/2016 à 03:51, Karl O. Pinc a écrit : > On Mon, 31 Oct 2016 09:26:27 +0100 > Gilles Darold wrote: > >> Le 30/10/2016 à 08:04, Karl O. Pinc a écrit : >> Attached patch v11 include your patch. >> >>> I have some questions about logfile_writename(): >&

Re: [HACKERS] Patch to implement pg_current_logfile() function

2016-11-03 Thread Gilles Darold
ter "where are all of the files to which you are > logging?" sounds helpful. > +1 Current implementation always returns the log file in use by the logging collector when pg_current_logfile() is called without arguments. If stderr and csvlog are both enabled in log_destination, then it will return t

Re: [HACKERS] Patch to implement pg_current_logfile() function

2016-11-04 Thread Gilles Darold
Le 04/11/2016 à 00:34, Karl O. Pinc a écrit : > On Mon, 31 Oct 2016 09:26:27 +0100 > Gilles Darold wrote: > >> Le 30/10/2016 à 08:04, Karl O. Pinc a écrit : >>> Have you given any thought to my proposal to change >>> CURRENT_LOG_FILENAME to LOG_METAINFO_

Re: [HACKERS] Patch to implement pg_current_logfile() function

2016-11-04 Thread Gilles Darold
Le 04/11/2016 à 14:17, Karl O. Pinc a écrit : > On Mon, 31 Oct 2016 10:19:18 +0100 > Gilles Darold wrote: > >> Le 31/10/2016 à 04:35, Karl O. Pinc a écrit : >>> Attached is a patch to apply on top of the v10 patch. >>> >>> It updates current_logfile

Re: [HACKERS] Patch to implement pg_current_logfile() function

2016-11-07 Thread Gilles Darold
Le 04/11/2016 à 21:07, Karl O. Pinc a écrit : > On Fri, 4 Nov 2016 16:58:45 +0100 > Gilles Darold wrote: > >> I attached a v12 patch > Attached is a comment patch which improves the comment > describing CURRENT_LOG_FILENAME. It's been bugging me. > I should have mad

Re: [HACKERS] Patch to implement pg_current_logfile() function

2016-11-12 Thread Gilles Darold
>> are meta-information about the logging data. So maybe >> the right name is LOG_METAINFO_DATAFILE. > +1 for something like this. > Ok, it will be changed it in next patch. -- Gilles Darold Consultant PostgreSQL http://dalibo.com - http://dalibo.org -- Sent via pgsql-hacker

Re: [HACKERS] Patch to implement pg_current_logfile() function

2016-11-19 Thread Gilles Darold
Le 16/11/2016 à 17:38, Karl O. Pinc a écrit : > On Mon, 7 Nov 2016 23:29:28 +0100 > Gilles Darold wrote: > >> Here is the v13 of the patch, ... > Attached is a doc patch to apply on top of v13. > > It adds a lot more detail regards just what is > in the current_logfi

Re: [HACKERS] Patch to implement pg_current_logfile() function

2016-11-19 Thread Gilles Darold
Le 19/11/2016 à 16:22, Karl O. Pinc a écrit : > Hi Gilles, > > On Tue, 15 Nov 2016 15:15:52 -0600 > "Karl O. Pinc" wrote: > >>> On Mon, 7 Nov 2016 23:29:28 +0100 >>> Gilles Darold wrote: >>>> - Do not write current_logfiles when log_

[HACKERS] [patch] psql tab completion for ALTER DEFAULT PRIVILEGES

2016-11-20 Thread Gilles Darold
SCHEMA. If there's no objection I will add it to next commit fest. Best regards, -- Gilles Darold Consultant PostgreSQL http://dalibo.com - http://dalibo.org diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c index b556c00..d0c8eda 100644 --- a/src/bin/psql/tab-complete.c

Re: [HACKERS] Patch to implement pg_current_logfile() function

2017-02-19 Thread Gilles Darold
n we do, it can update the file. > I've attached a new full v30 patch that include last patch from Karl. Now the current_logfile file is removed only at postmaster startup, just before launching the syslogger for the first time. -- Gilles Darold Consultant PostgreSQL http://dalibo.com - http:/

[HACKERS] Issue with circular references in VIEW

2017-07-24 Thread Gilles Darold
way? In the last case does the use of pg_get_viewdef() to reconstruct the _RETURN rule could be a simple fix? For example: 'CREATE RULE "_RETURN" AS ON SELECT TO v_t1 DO INSTEAD %s;', pg_get_viewdef(...) Of course manually rewriting the view and replace it f

Re: [HACKERS] Issue with circular references in VIEW

2017-07-24 Thread Gilles Darold
Le 24/07/2017 à 19:19, Tom Lane a écrit : > Gilles Darold writes: >> There is an issue with version prior to 10 when dumping views with circular >> references. I know that these views are now exported as views in 10 but they >> are still exported as TABLE + RULE in prior vers

Re: [HACKERS] Issue with circular references in VIEW

2017-07-24 Thread Gilles Darold
Le 24/07/2017 à 21:18, Tom Lane a écrit : > Gilles Darold writes: >> Le 24/07/2017 à 19:19, Tom Lane a écrit : >>> ... I'm inclined to think in terms of fixing it at that level >>> rather than in pg_dump. It doesn't look like it would be hard to fi

Re: [HACKERS] psql and pset without any arguments

2013-09-02 Thread Gilles Darold
Patch added to current open commitfest under the Client section with title: "Call \pset without any arguments displays current status of all printing options" Status: Need review. Let me know if it should not be there. Regards, Le 29/06/2013 01:08, Gilles Darold a écrit : >

Re: [HACKERS] review: psql and pset without any arguments

2013-09-07 Thread Gilles Darold
this resume (not when a > option was changed or individual ask on option value) Yes this could be a good accommodation but I really prefer to not duplicate code and translation between this resume and the output when these options are set. If we can print the same output messages using:

Re: [HACKERS] review: psql and pset without any arguments

2013-09-29 Thread Gilles Darold
Le 07/09/2013 21:22, Pavel Stehule a écrit : > > > > 2013/9/7 Gilles Darold <mailto:gilles.dar...@dalibo.com>> > > Le 07/09/2013 10:02, Pavel Stehule a écrit : > > Hello > > > > * patch is cleanly patchable and compilation is without w

Re: [HACKERS] review: psql and pset without any arguments

2013-09-30 Thread Gilles Darold
Le 30/09/2013 05:43, Alvaro Herrera a écrit : > Gilles Darold escribió: > >> +else if (strcmp(param, "numericlocale") == 0) >> +{ >> +if (popt->topt.numericLocale) >> +puts(_("Locale-adjusted numeric output (nu

Re: [HACKERS] review: psql and pset without any arguments

2013-09-30 Thread Gilles Darold
Le 30/09/2013 17:35, Peter Eisentraut a écrit : > Please remove the tabs from the SGML files. Done. I've also fixed the typo reported by Ian. Here is the attached v4 patch. Thanks a lot for your review. Regards, -- Gilles Darold Administrateur de bases de données http://dalibo.co

[HACKERS] Patch pg_is_in_backup()

2012-01-30 Thread Gilles Darold
XCEPTION WHEN undefined_file THEN RETURN false; END $$ LANGUAGE plpgsql SECURITY DEFINER; Regards, -- Gilles Darold http://dalibo.com - http://dalibo.org diff -ru postgresql/doc/src/sgml/func.sgml postgresql-is_in_backup-patch/doc/src/sgml/func.sgml --- postgresql/doc/src/sgml/func.sgml 2012

Re: [HACKERS] Patch pg_is_in_backup()

2012-01-31 Thread Gilles Darold
Le 30/01/2012 22:14, Euler Taveira de Oliveira a écrit : > On 30-01-2012 15:33, Gilles Darold wrote: >> Yesterday I was facing a little issue with a backup software (NetBackup) >> that do not report error when a post backup script is run. The problem >> is that this script e

Re: [HACKERS] Patch pg_is_in_backup()

2012-02-02 Thread Gilles Darold
Le 02/02/2012 12:23, Marti Raudsepp a écrit : > On Mon, Jan 30, 2012 at 20:33, Gilles Darold wrote: >> After some time searching for a Pg system administration function like >> pg_is_in_recovery(), let's say pg_is_in_backup(), I couldn't find one. >> The mino

Re: [HACKERS] Patch pg_is_in_backup()

2012-03-02 Thread Gilles Darold
pg_exclusive_backup_start_time() as backup_started_since; backup_started_since 00:12:24.569226 (1 ligne) postgres=# select pg_stop_backup(); pg_stop_backup ---- 0/298 (1 ligne) postgres=# select pg_exclusive_backup_start_time

Re: [HACKERS] Patch pg_is_in_backup()

2012-04-03 Thread Gilles Darold
ns, the others are patches per function. They are all from the current HEAD branch, if they don't work please help me with the correct git/diff command to perform. Thank you, regards, -- Gilles Darold http://dalibo.com - http://dalibo.org diff -ru postgresql-head/doc/src/sgml/func.sgml post

[HACKERS] psql and pset without any arguments

2013-06-28 Thread Gilles Darold
printTableOpt when \pset is given without any arguments and also update documentation. Let me know if there's any additional work to do on this basic patch or something that I've omitted. Best regards, -- Gilles Darold http://dalibo.com - http://dalibo.org diff --git a/doc/src/sgm

Re: [HACKERS] psql and pset without any arguments

2013-06-29 Thread Gilles Darold
Le 29/06/2013 13:55, Erik Rijkers a écrit : > On Sat, June 29, 2013 01:08, Gilles Darold wrote: >> Here is a sample output: >> >> (postgres@[local]:5494) [postgres] > \pset >> Output format is aligned. >> Border style is 2. >>

Re: [HACKERS] [TODO] Track number of files ready to be archived in pg_stat_archiver

2014-08-25 Thread Gilles Darold
s.stats_reset FROM pg_stat_get_archiver() s; The function pg_stat_get_archive_ready_count() will also be available for any other querying. -- Gilles Darold http://dalibo.com - http://dalibo.org -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your su

[HACKERS] Segmentation fault in pg_dumpall from master down to 9.1 and other bug introduced by RLS

2014-11-13 Thread Gilles Darold
ix the two issues but for older branch, only alias to the first column of the query might be applied. Let me know if it need other work. Best regards, -- Gilles Darold http://dalibo.com - http://dalibo.org diff --git a/src/bin/pg_dump/pg_dumpall.c b/src/bin/pg_dump/pg_dumpall.c index 23cb0b4..b07b

[HACKERS] pg_dump restore error

2012-10-14 Thread Gilles Darold
ly be less confusing. I've attached a patch adding those IF EXISTS on each DROP and ALTER statements. Best regards, -- Gilles Darold http://dalibo.com - http://dalibo.org diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c index 9920d96..e61cdd6 100644 --- a/src/bin/pg_dump/pg_dump.

Re: [HACKERS] pg_dump restore error

2012-10-14 Thread Gilles Darold
Le 14/10/2012 18:50, Tom Lane a écrit : > Gilles Darold writes: >> Restoring a backup generated with pg_dump/pg_dumpall in plain text >> format and the --clean option will report errors if the backup is loaded >> in an other or empty database. > This is intentional. What

Re: [HACKERS] Patch pg_is_in_backup()

2012-05-14 Thread Gilles Darold
file and it is handled (with an exception) by the server. Cool. > >I spotted though some formatting issues, in particular indentation > and multi-line comments. Some rows are longer than 80 chars. > >Please resubmit with these cosmetic changes and it is fine with me. > Thank you.

Re: [HACKERS] Packages: Again

2017-01-11 Thread Gilles Darold
cks help me a lot to add more automatic migration code. I don't think it is possible to have a 100% automatic migration because there will always be some things that need manual rewrite, like point 3, I don't think we want stuff like NULL equal EMPTY. There is also tons of external modules like DBMS_* that can be compared to extension, but if every one share is work on migration perhaps we can save more of time. Regards, -- Gilles Darold Consultant PostgreSQL http://dalibo.com - http://dalibo.org

Re: [HACKERS] Patch to implement pg_current_logfile() function

2017-01-12 Thread Gilles Darold
Le 11/01/2017 à 08:39, Michael Paquier a écrit : > On Wed, Dec 14, 2016 at 12:19 AM, Robert Haas wrote: >> On Mon, Dec 12, 2016 at 4:31 AM, Gilles Darold >> wrote: >>> Applied in last version of the patch v18 as well as removing of an >>> unused variable. >&g

Re: [HACKERS] Patch to implement pg_current_logfile() function

2017-01-13 Thread Gilles Darold
led > s/logfiles/log files/. Applied. > Surely the temporary file of current_logfiles should not be included > in base backups (look at basebackup.c). Documentation needs to reflect > that as well. Also, should we have current_logfiles in a base backup? > I would think no. Done but can&#x

Re: [HACKERS] Patch to implement pg_current_logfile() function

2017-01-14 Thread Gilles Darold
Le 13/01/2017 à 14:09, Michael Paquier a écrit : > On Fri, Jan 13, 2017 at 5:48 PM, Gilles Darold > wrote: >> Le 13/01/2017 à 05:26, Michael Paquier a écrit : >>> Surely the temporary file of current_logfiles should not be included >>> in base backups (look at base

Re: [HACKERS] Patch to implement pg_current_logfile() function

2017-01-15 Thread Gilles Darold
Le 15/01/2017 à 06:54, Michael Paquier a écrit : > On Sat, Jan 14, 2017 at 10:02 PM, Gilles Darold > wrote: >> Le 13/01/2017 à 14:09, Michael Paquier a écrit : >>> On Fri, Jan 13, 2017 at 5:48 PM, Gilles Darold >>> wrote: >>>> Le 13/01/2017 à 05:26,

Re: [HACKERS] Patch to implement pg_current_logfile() function

2017-01-17 Thread Gilles Darold
even if the input > method is incorrect and even if the method is correct but it is not > present in current_logfiles. As the user is thought as a trusted user > as it has access to this function, I would think that being verbose on > the error handling, or at least warnings, woul

Re: [HACKERS] Patch to implement pg_current_logfile() function

2017-01-17 Thread Gilles Darold
Le 17/01/2017 à 19:58, Karl O. Pinc a écrit : > On Tue, 17 Jan 2017 19:06:22 +0100 > Gilles Darold wrote: > >> Le 17/01/2017 à 03:22, Michael Paquier a écrit : >>> On Tue, Jan 17, 2017 at 2:21 AM, Karl O. Pinc >>> wrote: >>>> On January 15, 2017

Re: [HACKERS] Patch to implement pg_current_logfile() function

2016-11-23 Thread Gilles Darold
use of strtok() pretty hard. > > As far as I can find, there are exactly two users of strtok() in > the backend, and they're already playing with fire because one > calls the other (look in utils/misc/tzparser.c). I don't want the > hazard to get any larger. > >

Re: [HACKERS] Patch to implement pg_current_logfile() function

2016-11-27 Thread Gilles Darold
t; On Sat, 19 Nov 2016 12:58:47 +0100 > Gilles Darold wrote: > >> ... attached v14 of the patch. > Attached are patches for your consideration and review. > (Including your latest v14 patch for completeness.) > > Some of the attached patches (like the GUC symbol > patch you

Re: [HACKERS] [patch] psql tab completion for ALTER DEFAULT PRIVILEGES

2016-11-28 Thread Gilles Darold
Le 20/11/2016 à 15:46, Gilles Darold a écrit : > Hi, > > When tab-completing after ALTER DEFAULT PRIVILEGES ... GRANT|REVOKE, > currently psql injects completion from the GRANT|REVOKE order, rather > than the one expected. > > A patch is attached. It adds the right completion

Re: [HACKERS] Patch to implement pg_current_logfile() function

2016-11-28 Thread Gilles Darold
Le 28/11/2016 à 18:54, Karl O. Pinc a écrit : > Hi Gilles, > > On Sun, 27 Nov 2016 21:54:46 +0100 > Gilles Darold wrote: > >> I've attached the v15 of the patch that applies your changes/fixes and >> remove the call to strtok(). > I like the idea of replacing th

Re: [HACKERS] Patch to implement pg_current_logfile() function

2016-12-06 Thread Gilles Darold
Le 02/12/2016 à 02:08, Karl O. Pinc a écrit : > On Sun, 27 Nov 2016 21:54:46 +0100 > Gilles Darold wrote: > >> I've attached the v15 of the patch >> I've not applied patch patch_pg_current_logfile-v14.diff.backoff to >> prevent constant call of logfil

Re: [HACKERS] Patch to implement pg_current_logfile() function

2016-12-09 Thread Gilles Darold
Le 08/12/2016 à 00:52, Robert Haas a écrit : > On Tue, Dec 6, 2016 at 6:11 PM, Gilles Darold > wrote: >> It seems that all fixes have been included in this patch. > Yikes. This patch has certainly had a lot of review, but it has lots > of basic inconsistencies with Postg

Re: [HACKERS] Patch to implement pg_current_logfile() function

2016-12-12 Thread Gilles Darold
_filepath = strchr(lbuffer, ' ')) > *log_filepath = '\0'; /* terminate log_format */ > else > { > /* Unknown format, no space. Return NULL to caller. */ > lbuffer[0] = '\0'; > break; > } > log

Re: [HACKERS] Bug in pg_dump

2015-02-23 Thread Gilles Darold
Le 17/02/2015 14:44, Michael Paquier a écrit : > On Tue, Jan 20, 2015 at 8:06 PM, Gilles Darold > wrote: >> Le 19/01/2015 14:41, Robert Haas a écrit : >>> On Thu, Jan 15, 2015 at 6:26 AM, Gilles Darold >>> wrote: >>>> I attach a patch that solves the

Re: [HACKERS] Bug in pg_dump

2015-02-24 Thread Gilles Darold
Le 24/02/2015 05:40, Michael Paquier a écrit : > > > On Tue, Feb 24, 2015 at 2:17 AM, Gilles Darold > mailto:gilles.dar...@dalibo.com>> wrote: > > Looks great to me, I have tested with the postgis_topology extension > everything works fine. > > > Actu

Re: [HACKERS] Bug in pg_dump

2015-02-27 Thread Gilles Darold
Le 26/02/2015 12:41, Michael Paquier a écrit : > On Wed, Feb 25, 2015 at 7:46 AM, Gilles Darold > wrote: >> This is a far better patch and the test to export/import of the >> postgis_topology extension works great for me. >> >> Thanks for the work. > Attached is

[HACKERS] Bug in pg_dump

2015-01-15 Thread Gilles Darold
t1(id) ); SELECT pg_catalog.pg_extension_config_dump('b_test_fk_in_ext1', ''); SELECT pg_catalog.pg_extension_config_dump('a_test_fk_in_ext1', ''); Best regards, -- Gilles Darold Consultant PostgreSQL http://dalibo.com - http://dalibo.org diff --git a/s

Re: [HACKERS] Bug in pg_dump

2015-01-16 Thread Gilles Darold
On 16/01/2015 01:06, Jim Nasby wrote: > On 1/15/15 5:26 AM, Gilles Darold wrote: >> Hello, >> >> There's a long pending issue with pg_dump and extensions that have >> table members with foreign keys. This was previously reported in this >> thread >

Re: [HACKERS] Bug in pg_dump

2015-01-20 Thread Gilles Darold
Le 19/01/2015 14:41, Robert Haas a écrit : > On Thu, Jan 15, 2015 at 6:26 AM, Gilles Darold > wrote: >> I attach a patch that solves the issue in pg_dump, let me know if it might >> be included in Commit Fest or if the three other solutions are a better >> choice. >

Re: [HACKERS] Patch to implement pg_current_logfile() function

2016-06-28 Thread Gilles Darold
Le 07/04/2016 08:30, Karl O. Pinc a écrit : > On Thu, 7 Apr 2016 01:13:51 -0500 > "Karl O. Pinc" wrote: > >> On Wed, 6 Apr 2016 23:37:09 -0500 >> "Karl O. Pinc" wrote: >> >>> On Wed, 6 Apr 2016 22:26:13 -0500 >>> "Karl O. Pinc

Re: [HACKERS] Re: From TODO, XML?

2001-07-31 Thread Gilles DAROLD
Hi, Why don't use the excellent DBIx-XML_RDB perl module ? Give it the query it will return XML output as you sample. With some hack you can do what you want... Regards Gilles DAROLD mlw wrote: > Bruce Momjian wrote: > > > > > > > I have managed to get several

Re: [HACKERS] Dollar in identifiers

2001-08-16 Thread Gilles DAROLD
Hi, Dollar in identifier is currently working, you just have to doublequote the identifier. create table "foo$" ( "foo$" int4 ); select * from "foo$"; select "foo$" from "foo$"; works just fine. Or create table "$foo" ( "$foo" int4 ); select * from "$foo"; select "$foo" from "$foo";

[HACKERS] Postgresql log analyzer

2001-08-21 Thread Gilles DAROLD
t or not but if timestamp is system local dependant I think it should be very difficult to me to have a portable log analyzer... Regards, Gilles Darold ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://www.postgresql.org/search.mpl

Re: [HACKERS] Postgresql log analyzer

2001-08-21 Thread Gilles DAROLD
Hi all, Here is a first draft generated by a log analyzer for postgres I've wrote today: http://www.samse.fr/GPL/log_report/ In all this html report there is what I'm able to extract minus the statistics. I need to know what people want to see reported to have a powerfull log analyzer, I

[HACKERS] Re: [GENERAL] Postgresql log analyzer

2001-08-23 Thread Gilles DAROLD
ncremental scan working on full or rotate log For other good requests it's done... Let me know any other requests otherwise I will publish the first release at least on monday if not tomorow ! http://www.samse.fr/GPL/log_report/ Regards, Gilles Darold Andrew McMillan wrote: > G

Re: [HACKERS] XML

2002-03-20 Thread Gilles DAROLD
Hi, I have something that do exactly what you are looking for (and more) but damned it's perl stuff ! You just have to set your SQL queries into XML files, associate XSL template to them and run a cgi perl script througth apache (with or without mod_perl). You can also add perl procedures to pro

[HACKERS] Contrib update

2002-03-26 Thread Gilles DAROLD
Hi Justin, I have a new updated version of the Ora2Pg tool which correct many problems and add some new features, could you or someone else update the contrib directory. (download at: http://www.samse.fr/GPL/ora2pg/ora2pg-1.8.tar.gz) I also just post a new tool in replacement of the Oracle XSQL

Re: [HACKERS] View tables relationship

2001-01-16 Thread Gilles DAROLD
Hi, This question have been posted recently, please take a look to archive. I use this very simple query : SELECT a.tgargs FROM pg_class c, pg_trigger a WHERE a.tgname LIKE 'RI_ConstraintTrigger_%' AND c.relname='$table' AND a.tgrelid = c.oid Regards, Gil

Re: [HACKERS] Call for platforms

2001-03-21 Thread Gilles DAROLD
Hi, I reported Linux RedHat 6.2 - 2.2.14-5.0smp #1 SMP Tue Mar 7 21:01:40 EST 2000 i686 2 cpu - 1Go RAM Gilles DAROLD ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://www.postgresql.org/search.mpl

Re: [HACKERS] Call for platforms

2001-03-21 Thread Gilles DAROLD
test (following the AIX FAQ it's normal ?) But when I configure with --with-perl I have the following error : make[4]: cc : Command not found Any idea ? Gilles DAROLD > Hi, > > I reported Linux RedHat 6.2 - 2.2.14-5.0smp #1 SMP Tue Mar 7 21:01:40 EST > 2000 i686 > 2 cpu

[HACKERS] Re: [GENERAL] PL/Perl compilation error

2000-10-17 Thread Gilles DAROLD
ill have problem to compiling this code ? If so send me an url where i can find the complete PG distribution you want to see working. I will check if it works for me and try to fix if there is problems. Not sure of what I can do... Regards Gilles DAROLD