[GENERAL] select row value from column's oid

2008-09-24 Thread Mathieu
Hi guys. I'd like to make a sql request able to get both row value and column name of a table for a specific id. Since I need the column name in my process, i first got interested in a way to get this info from pg tables with this request : SELECT a.attname as "column_name" FROM

[GENERAL] COPY command file name encoding issue (UTF8/WIN1252)

2015-03-23 Thread Pujol Mathieu
t;\303\251" é in WIN1252"\351" This command works on a database encoded in WIN1252 (same as OS) . So it seems that COPY command don't take care of file name encoding. Is it a bug ? a limitation ? Thanks for your help Mathieu PUJOL -- Sent via pgsql-general mailing lis

Re: [GENERAL] COPY command file name encoding issue (UTF8/WIN1252)

2015-03-23 Thread Pujol Mathieu
#x27;) WITH BINARY but this call is not allowed. Sending him a text containing escaped WIN1252 hex value fails, because query parser detect invalid UTF8 sequence (which is logical). The problem is that I can't find any way to workaround this bug. Regards Mathieu Pujol Le 23/03/2015 11:46

Re: [GENERAL] Unexpected result using floor() function

2016-03-14 Thread Pujol Mathieu
Hi I reproduce your bug using "PostgreSQL 9.3.6, compiled by Visual C++ build 1600, 64-bit" on Windows 8 I also notice that SELECT floor(4.725 * power(10, 2)::numeric + 0.5) work as expected Mathieu Le 14/03/2016 15:11, Frank Millman a écrit : Hi all I am running PostgreSQL 9.4.4

Re: [GENERAL] Unexpected result using floor() function

2016-03-14 Thread Pujol Mathieu
Le 14/03/2016 15:29, Merlin Moncure a écrit : On Mon, Mar 14, 2016 at 9:21 AM, Pujol Mathieu wrote: Hi I reproduce your bug using "PostgreSQL 9.3.6, compiled by Visual C++ build 1600, 64-bit" on Windows 8 I also notice that SELECT floor(4.725 * power(10, 2)::numeric + 0.5) work a

Re: [GENERAL] COPY command & binary format

2016-05-10 Thread Pujol Mathieu
description of the file format in section Binary Format. Mathieu Pujol

[GENERAL] TOAST, large objects and ACIDity

2007-07-10 Thread Benoit Mathieu
Hi all, I want to use postgres to store data and large files, typically audio files from 100ko to 20Mo. For those files, I just need to store et retrieve them, in an ACID way. (I don't need search, or substring, or others functionnalities) I saw postgres offers at least 2 method : bytea column

[GENERAL] TOAST, large objects, and ACIDity

2007-07-12 Thread Benoit Mathieu
Hi all, I want to use postgres to store data and large files, typically audio files from 100ko to 20Mo. For those files, I just need to store et retrieve them, in an ACID way. (I don't need search, or substring, or others functionnalities) I saw postgres offers at least 2 method : bytea column

[GENERAL] GIST optimization to limit calls to operator on sub nodes

2014-06-18 Thread Pujol Mathieu
test on R and then skip tests on other nodes. So is there a way to do that in the GIST API ? Or could I share data from R to Nx and then From Na to Lax and Nb to Lbx ? Thanks, Mathieu -- 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] converting a N rows table to a 1 row table ?

2014-07-03 Thread Pujol Mathieu
Le 03/07/2014 14:30, Arup Rakshit a écrit : Hi, One query is producing the below table :- answer | count | avg a1 3 14 a2 2 10 How to convert this to a single row table ? count | avg_a1 | avg_a2 5 14 10 Regards, Arup Rakshit Hi, Could you ha

Re: [GENERAL] conditional IF statements in postgresql

2014-07-07 Thread Pujol Mathieu
IS NULL THEN\n"; lStatement += "ALTER TABLE protein_sequence ADD comment VARCHAR(500) \n"; lStatement += "ELSE\n"; lStatement += "UPDATE TABLE protein_sequence ADD comment VARCHAR(500)\n"; lStatement += "END IF;\n"; lStatement += "END;\n&quo

Re: [GENERAL] conditional IF statements in postgresql

2014-07-07 Thread Pujol Mathieu
Le 07/07/2014 13:44, Pujol Mathieu a écrit : Le 07/07/2014 12:48, Albe Laurenz a écrit : Madhurima Das wrote: I am writing a C program to access a PostgreSQL database, where I add a column if it doesn't exists in the table or, update the column, if the column already exits. Please su

Re: [GENERAL] conditional IF statements in postgresql

2014-07-08 Thread Pujol Mathieu
running the program as: Adding col to table (ALTER) Failed: ERROR: syntax error at or near "ELSE" LINE 5: ELSE ^ Can you provide some suggestions. On Mon, Jul 7, 2014 at 10:46 AM, Pujol Mathieu mailto:mathieu.pu...

Re: [GENERAL] How can I group all children by their parent ?

2014-07-17 Thread Pujol Mathieu
Mathieu Pujol

Re: [GENERAL] How to implement a uniqueness constraint across multiple tables?

2014-08-01 Thread Pujol Mathieu
mns ) INHERITS (sub_template); So the foreign key constraint will be on the sub_template avoiding two row of sub_x to reference the same foreign key. This is just an idea I let you check for syntax. http://www.postgresql.org/docs/9.3/static/ddl-inherit.html Regards, Mathieu -- Sent via pgs

Re: [GENERAL] Re: How to implement a uniqueness constraint across multiple tables?

2014-08-01 Thread Pujol Mathieu
Le 01/08/2014 09:28, David G Johnston a écrit : Pujol Mathieu wrote Le 31/07/2014 20:38, Kynn Jones a écrit : I want to implement something akin to OO inheritance among DB tables. The idea is to define some "superclass" table, e.g.: (BTW, one could use PostgreSQL built-in support

[GENERAL] Hardware requirements for a PostGIS server

2015-02-10 Thread Mathieu Basille
my questions and comments may be a confusing, likely because of the lack of experience about these issues on my side. I really welcome any feedback of people working with PostgreSQL servers (+ PostGIS ideally!) in a small unit, or any similar setting that could be informative! In advance, thank

Re: [GENERAL] Hardware requirements for a PostGIS server

2015-02-11 Thread Mathieu Basille
disks, I/O limiting factor. Thanks again for the good feedback! This gives me very useful information to get started (I think this is still going to be a long process). Mathieu Basille. [1] http://lists.osgeo.org/pipermail/postgis-users/2015-February/040120.html [2] http://www.postgr

Re: [GENERAL] Hardware requirements for a PostGIS server

2015-02-13 Thread Mathieu Basille
be IT choice! As long as it makes sense from a user perspective (performance, feature set, usability, etc.)... Thanks again! As usual, feel free to add more to the discussion, but there are already plenty of information that is very useful to start the process with IT in my center! Best, Ma

[GENERAL] Logical decoding CPU-bound w/ large number of tables

2017-05-05 Thread Mathieu Fenniak
ould describe what is happening here, and have a discussion with me about what kind of changes might be necessary to improve the performance. Thanks all, *Mathieu Fenniak* | Senior Software Architect | Phone 1-587-315-1185 *Replicon* | The leader in cloud time tracking applications - 7,800

Re: [GENERAL] Logical decoding CPU-bound w/ large number of tables

2017-05-10 Thread Mathieu Fenniak
.182015-06) (other test details: wal_level=logical; max_wal_senders=5; wal_sender_timeout = 3600s; max_locks_per_transaction = 65536; max_replication_slots = 5) On Fri, May 5, 2017 at 7:38 PM, Andres Freund wrote: > On 2017-05-05 21:32:27 -0400, Tom Lane wrote: > > Andres Freund writes: &g

Re: [GENERAL] Logical decoding CPU-bound w/ large number of tables

2017-05-12 Thread Mathieu Fenniak
an the earlier samples from my development machine on OSX. `perf report`: https://gist.github.com/mfenniak/9a3484c426a497f3903051d9fdf8b221 Raw perf data (49kb bzip2): https://www.dropbox.com/s/3jfxtg9kjzjztmp/linux-pg-walsender-patched.perf.data.bz2?dl=0 Mathieu On Wed, May 10, 2017 at 3:10 PM, A

[GENERAL] fast-archiver tool, useful for pgsql DB backups

2012-08-24 Thread Mathieu Fenniak
d to rsync taking 3hrs for the same transfer. fast-archiver is available at GitHub: https://github.com/replicon/fast-archiver I hope this is useful to others. :-) Mathieu $ time fast-archiver -c -o /dev/null /db/data skipping symbolic link /db/data/pg_xlog 1008.92user 663.00system 27:38.27elaps

Re: [GENERAL] Notification of Limited Account Access

2010-04-28 Thread Mathieu Rozieres
Le 27/04/2010 21:34, Howe, Jeffrey a écrit : > > Due to increase in phishing attacks, we are currently working to > improve on the security of all Email Accounts as we periodically > review certain accounts which are vulnerable to Unauthorised Access. > We have noticed some unusual invalid login

Re: [GENERAL] 4 billion record limit?

2000-07-27 Thread Mathieu Arnold
sappear. that's the kind of thing people said about y2k, isn't it ? -- Mathieu Arnold

[GENERAL] locales and indexes.

2000-11-10 Thread Mathieu Arnold
;t be necessary to do so, isn't it ? -- Mathieu Arnold

Re: [GENERAL] locales and indexes.

2000-11-10 Thread Mathieu Arnold
ne i've done some more testing, and it appears that if i start for instance : LANG= postmaster then : LANG=fr_FR psql the sort will be done in the fr_FR locale, not the default one. -- Mathieu Arnold

[GENERAL] make check and make installcheck

2000-11-23 Thread Mathieu Arnold
4567890123456789.000 (5 rows) SELECT '' AS to_char_14, to_char(q2, 'FM.999') FROM INT8_TBL; == does someone think that someone should do something just not to scare people ? :) -- Mathieu Arnold

Re: [GENERAL] Question on Explain : Index Scan

2010-10-21 Thread Mathieu De Zutter
e for yourself if index-scan would be faster in your case by running the following command before "explain (analyze)": set enable_seqscan = off; BTW, try to use explain analyze instead of explain, that way you'll see the actual timings too instead of just the planner estimates. Kin

Re: [GENERAL] Question on Explain : Index Scan

2010-10-22 Thread Mathieu De Zutter
ese pages sequentially) so to have sequential I/O instead, which is usually faster. If your query really returns 73 rows, it would be a good choice. However, for your case, the estimates are off (73 matches estimated vs 2 matches actual). Therefore the planner needs better statistics on the actual

Re: [GENERAL] PHP Web Auditing and Authorization

2010-11-04 Thread Mathieu De Zutter
t connections)! Afterwards I clean up/aggregate unimportant actions (like pages that only do SELECTs) so to keep the impact on database size low. Kind regards, Mathieu

Re: [GENERAL] What Linux edition we should chose?

2010-06-02 Thread Mathieu De Zutter
oable. As many other people have this idea, you can just re-use their back-porting work: backports.org Never had a quality issue with these packages and updates are quickly available. YMMV. -- Kind regards, Mathieu -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make c

Re: [GENERAL] convert accented character to base character

2010-06-28 Thread Mathieu De Zutter
eturn unac_string('UTF8', $_[0]); $$ LANGUAGE plperlu IMMUTABLE STRICT; On debian you need the following package: libtext-unaccent-perl Kind regards, Mathieu

Re: [GENERAL] Idle connections

2010-10-06 Thread Mathieu De Zutter
why is this happening ? > > Are you using any kind of connection pooler? Maybe persistent DB connections on the webserver? Regards, Mathieu -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] Constraint exclusion issue

2010-01-16 Thread Mathieu De Zutter
::y).n)) -> Seq Scan on child1 parent (cost=0.00..39.10 rows=1 width=12) Filter: ((c = ('(b,0)'::y).c) AND (n = ('(b,0)'::y).n)) -- So the problem seems to be that the 'b' value cannot be deduced in time for the constraint exclusion to do its job. -- Regards, Mathieu -- 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] Constraint exclusion issue

2010-01-16 Thread Mathieu De Zutter
On Sat, Jan 16, 2010 at 7:26 PM, Scott Marlowe wrote: > On Sat, Jan 16, 2010 at 11:02 AM, Mathieu De Zutter > wrote: >> shs-dev=# explain select * from parent where (c,n) = '("b",0)'; >> ERROR:  input of anonymous composite types is not implemented >

Re: [GENERAL] Constraint exclusion issue

2010-01-17 Thread Mathieu De Zutter
On Sun, Jan 17, 2010 at 8:06 PM, Jeff Davis wrote: > On Sat, 2010-01-16 at 19:02 +0100, Mathieu De Zutter wrote: >> Hi, >> >> I'm trying to make constraint exclusion work correctly in a query with >> only one parameter, but I have some issues. >> Please have