Re: {Spam} [GENERAL] simple SQL question

2007-06-25 Thread Dimitri Fontaine
Le lundi 25 juin 2007, Joshua a écrit : > I have been playing around with string functions but cannot seem to > figure out a quick solution. Does anyone have any suggestions? > > Please let me know. What about: pgloader=# select a::float / 100 from (values(5673), (4731), (4462), (5422), (756), (

Re: [GENERAL] table disk space usage query?

2007-07-02 Thread Dimitri Fontaine
Le jeudi 28 juin 2007, [EMAIL PROTECTED] a écrit : > Hello all - > > I was looking for a way to find out how much disk space each table is > using. As of PostgreSQL 8.1 you can use the following: http://www.postgresql.org/docs/8.1/static/functions-admin.html#FUNCTIONS-ADMIN-DBSIZE Example query t

Re: [GENERAL] importing limited set of rows/tuples

2007-07-02 Thread Dimitri Fontaine
Hi, Le lundi 02 juillet 2007, cha a écrit : > Now I want to import limited set of records/rows ( 1000 tuples ) from the > eliminated tables. > > Is this possible? If yes, please tell me how to accomplish this? If you have CSV or CSV-like data file format, you can use pgloader with the -C option,

Re: [GENERAL] How-To: Aggregate data from multiple rows into a delimited list.

2007-07-03 Thread Dimitri Fontaine
Le lundi 02 juillet 2007, D. Dante Lorenso a écrit : > I wanted to select several rows of data and have them returned in a > single record with the rows joined by a delimiter. Turns out this is > very easy to do in PostgreSQL: > >SELECT a.id, a.name, > ARRAY_TO_STRING(ARRAY( >SELE

Re: [GENERAL] How to get fast ~ operator using C locale

2007-07-05 Thread Dimitri Fontaine
Hi, Le jeudi 05 juillet 2007, Artur Rataj a écrit : > Hello, I want to have pg use fast indexing for ~ operator. Is setting > C locale for this is still necessary? If yes, is it enough to > initdb/createdb with C locale? If it is not enough, why setting locale > to C and starting postmaster still

Re: [GENERAL] Postgres 8.2 binary for ubuntu 6.10?

2007-07-10 Thread Dimitri Fontaine
Le mardi 10 juillet 2007, novnov a écrit : > I have postgres 8.1 installed on ubuntu 6.10 via synapic package manager. I > would like to install 8.2, but it's not offered in the list. I think 8.2 is > offered on 7.x ubuntu, and I wonder if 8.2 will be offered on 6.10? > Probably the recommondation

Re: [GENERAL] Vacuum issue

2007-07-10 Thread Dimitri Fontaine
Le lundi 09 juillet 2007, Gregory Stark a écrit :0 > The output of vacuum verbose can be hard to interpret, if you want help > adjusting the fsm settings send it here. Using pgfouine, one gets easy to read reports: http://pgfouine.projects.postgresql.org/vacuum.html http://pgfouine.projects.po

Re: [GENERAL] free scheduled import utility

2007-07-10 Thread Dimitri Fontaine
Le mardi 10 juillet 2007, Zlatko Matic a écrit : > Is there any free program/utility for batch imports from .csv files, that > can be easily scheduled for daily inserts of data to PostgreSQL tables? COPY itself would do the job, but you can also use pgloader: http://pgfoundry.org/projects/pgload

Re: [GENERAL] multirow insert

2007-07-18 Thread Dimitri Fontaine
Le samedi 14 juillet 2007, Tom Allison a écrit : > On Jul 13, 2007, at 2:11 PM, A. Kretschmer wrote: > > am Fri, dem 13.07.2007, um 18:50:26 +0200 mailte Zlatko Mati? > > > > folgendes: > >> When using multirow INSERT INTO...VALUES command, are all rows > >> inserted in a > >> batch, or row by row

Re: [GENERAL] [PERFORM] Parrallel query execution for UNION ALL Queries

2007-07-19 Thread Dimitri Fontaine
Hi, Le mercredi 18 juillet 2007, Jonah H. Harris a écrit : > On 7/18/07, Benjamin Arai <[EMAIL PROTECTED]> wrote: > > But I want to parrallelize searches if possible to reduce > > the perofrmance loss of having multiple tables. > > PostgreSQL does not support parallel query. Parallel query on top

Re: {Spam} [GENERAL] Need help with bash script and postgresql

2007-07-23 Thread Dimitri Fontaine
Hi, Le lundi 23 juillet 2007, Chuck Payne a écrit : > for i in `cat > myfile.txt` ; do mysql -uxxx -p -Asse mydatabase  "insert > into mytable  (aaa,bbb) values ("xxx", > "yyy");" It seems a part of your problem is not about scripting psql but loading data into PostgreSQL, so let me present

Re: {Spam} [GENERAL] FOREIGN KEY migration of syntax, help needed

2007-08-01 Thread Dimitri Fontaine
Le mardi 31 juillet 2007, Mike Haberman a écrit : >My old database has the old-style FOREIGN KEY syntax: I've had this very same transition to make on a database here, and successfully used adddepend: http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/adddepends/adddepends/ It has been moved out

Re: [GENERAL] Persistent connections in PHP

2007-08-13 Thread Dimitri Fontaine
Le lundi 13 août 2007, Erik Jones a écrit : > If you need something to pool connections, look at pgpool. Or better yet, pgbouncer. At least for my values of better :) https://developer.skype.com/SkypeGarage/DbProjects/PgBouncer http://pgfoundry.org/projects/pgbouncer/ Hope this helps, -- dim

Re: [GENERAL] entry log

2007-08-20 Thread Dimitri Fontaine
Le dimanche 19 août 2007, Robin Helgelin a écrit : > My question, is this interesting information enough to save on the > table itself? If so, I guess this could easily be solved with a > trigger, however, should one instead create a log table and log > changes, etc? > > Hints and tips are apprecia

Re: [GENERAL] [OT - sorta] How to extract a substring using Regex

2007-08-24 Thread Dimitri Fontaine
Le Friday 24 August 2007 17:09:16 Joshua D. Drake, vous avez écrit : > > As long as we are talking about regex tools... I found this tool a while > > back and today I don't know how I ever figured out regular expressions > > without it. (http://www.regexbuddy.com/) > > Woah! That is great. Now to

Re: {Spam} [GENERAL] pgloader - Can't find textreader/csvreader

2007-08-27 Thread Dimitri Fontaine
Le lundi 27 août 2007, Ow Mun Heng a écrit : > I'm trying to see if pgloader will make my work easier for bulkloads. > I'm testing it out and I'm stucked basically because it can't find the > module TextReader or CSVreader. > > Googling doesn't help as there seems to be no reference to a module > n

Re: {Spam} [GENERAL] pgloader - Can't find textreader/csvreader

2007-08-27 Thread Dimitri Fontaine
Le lundi 27 août 2007, Ow Mun Heng a écrit : > > It's a pgloader provided module, and the error arise because I forgot to > > make sure you can use pgloader without installing it properly in the > > system. After some testing, it seems pgloader is still usable without system installation at all.

Re: [GENERAL] importing pgsql schema into visio (for diagramming)

2007-09-13 Thread Dimitri Fontaine
Hi list, Le jeudi 13 septembre 2007, Andrew Hammond a écrit : > Does anyone know where I could find a tool which allows importing schema > information from a postgres database into visio? The boss guys want some > pretty pictures... Druid[1] is somewhat capable of delivering nice pictures out of

Re: [GENERAL] importing large files

2007-10-01 Thread Dimitri Fontaine
Hi, Le Friday 28 September 2007 10:22:49 [EMAIL PROTECTED], vous avez écrit : > I need to import between 100 millions to one billion records in a > table. Each record is composed of two char(16) fields. Input format > is a huge csv file.I am running on a linux box with 4gb of ram. > First I crea

Re: [GENERAL] Data cube in PostgreSQL

2007-10-01 Thread Dimitri Fontaine
Hi, Le Wednesday 26 September 2007 20:58:38 Gowrishankar, vous avez écrit : > Is there any other way of extending postgresql to include cubes? Something like the cube contrib? http://developer.postgresql.org/cvsweb.cgi/pgsql/contrib/cube/ Contribs are part of PostgreSQL sources and maintained

Re: [GENERAL] How to make LIKE to use index in "abc%" query?

2007-10-08 Thread Dimitri Fontaine
Le lundi 08 octobre 2007, Dmitry Koterov a écrit : > explain analyze > SELECT id FROM "table" WHERE name LIKE 'dt%'; > > having a btree index on "name" column. But unfortunately it uses seqscan > instead of index scan, it's too slow. It seems to me you'd benefit from reading this page of the fine

Re: [GENERAL] DB upgrade

2007-10-09 Thread Dimitri Fontaine
Le mardi 09 octobre 2007, Andrew Kelly a écrit : > On Tue, 2007-10-09 at 13:58 +0200, Peter Eisentraut wrote: > Where can I read what that means in the great scheme of things? > Are you saying that Deb is markedly different from other packages (.rpm) > or that any packaged version of PG is differen

Re: [GENERAL] Abbreviation list

2007-10-19 Thread Dimitri Fontaine
Hi, Le Friday 19 October 2007 22:29:37 Steve Crawford, vous avez écrit : > > Do we use that term? Normally for us it's "large objects". > > Perhaps we should add "LO" but the documentation does refer to the term > BLOB though typically in the context of "The SQL standard defines a > different bin

Re: [GENERAL] COPY ... FROM and index usage

2007-11-04 Thread Dimitri Fontaine
Hi, Le Sunday 04 November 2007 11:22:19 Reg Me Please, vous avez écrit : > That is, should I drop all indexes during a "COPY ... FROM" in order to > gain the maximum speed to load data? When looking for a way to speed up data loading, you may want to consider pgbulkload, a project which optimize

Re: [GENERAL] Syntax error in a large COPY

2007-11-06 Thread Dimitri Fontaine
Hi, Le Tuesday 06 November 2007 22:40:50 Tom Lane, vous avez écrit : > Reg Me Please <[EMAIL PROTECTED]> writes: > > I'm trying to understand what and where. > > The point is that I have this 29M+ lines script telling me there's a > > problem somewhere. You could use pgloader, which reads CSV inp

Re: [GENERAL] Syntax error in a large COPY

2007-11-07 Thread Dimitri Fontaine
Le mercredi 07 novembre 2007, Reg Me Please a écrit : > pgloader seems not that easy to use for a newbie like myself. > Also because domentation seems too skinny. Sorry about this, writting documentation in English is not that easy when it's not one's natural language... I'll accept any comment/p

Re: [GENERAL] Syntax error in a large COPY

2007-11-07 Thread Dimitri Fontaine
Le mercredi 07 novembre 2007, Reg Me Please a écrit : > Maybe just a complete example would suffice. Let's say a table structure, a > CSV and a raw text file, a config file and the run output. Do you mean something like the included examples, which I tend to also use as (regression) tests? http

Re: [GENERAL] Syntax error in a large COPY

2007-11-07 Thread Dimitri Fontaine
Le mercredi 07 novembre 2007, Reg Me Please a écrit : > I installed .deb. The man page has not been included. It seems the latter package on pgfoundry does have a problem here. As I have some patches waiting for a release, I'll make current CVS the 2.2.2 version and update the pgfoundry files so

Re: [GENERAL] Filter tables

2007-11-12 Thread Dimitri Fontaine
Hi, Le lundi 12 novembre 2007, Reg Me Please a écrit : > What I'd need to do is to "filter" t1 against f1 to get only the rows > ( 'field1',1 ) and ( 'field2',1 ). select * from t1 natural join f1 where t1.id = 1; t| id + field1 | 1 field2 | 1 (2 lignes) I'm not sure abou

Re: [GENERAL] Bulk Load Ignore/Skip Feature

2007-11-16 Thread Dimitri Fontaine
Hi all, Le Friday 16 November 2007 18:04:44 Willem Buitendyk, vous avez écrit : > Martijn van Oosterhout wrote: > > On Thu, Nov 15, 2007 at 08:09:46PM -0800, Willem Buitendyk wrote: > >> Damn - so the unqiue contraint is still an issue. What gives? Why is > >> it so hard to implement this in Pos

Re: [GENERAL] pg_get_procdef ?

2010-11-02 Thread Dimitri Fontaine
dl/sql/function.body.sql The Omiti version will output a single file with the objects in there, the other version will split the objects each in its own file in directories, to be svn / git friendly. With the python version: ./getddl.py -f -F fun_dir -d db -h host -p port -U user Regards, -- Dimitri Fo

Re: [GENERAL] how to get the height of index tree?

2010-11-02 Thread Dimitri Fontaine
sts for btree, but I guess it would be very useful. Regards, -- Dimitri Fontaine http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support -- 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] Replication

2010-11-02 Thread Dimitri Fontaine
and the fact that running queries are not canceled at the time you flick the switch to have your standby a master. The ongoing read-only traffic is not affected. That's hot. Regards, -- Dimitri Fontaine http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support -- Sent via p

Re: [GENERAL] index in desc order

2010-11-02 Thread Dimitri Fontaine
that how to model that is still unclear and undone in the cost estimations. You will have to crawl the pgsql-performance list yourself, though… Regards, -- Dimitri Fontaine http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support -- Sent via pgsql-general mailing list (pg

Re: [GENERAL] Group by and limit

2010-11-03 Thread Dimitri Fontaine
Regards, -- Dimitri Fontaine http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support -- 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] Cloning database without dump/restore

2010-11-05 Thread Dimitri Fontaine
I'm wouldn't expect it to be "fast" though. -- Dimitri Fontaine http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support -- 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] Need magic to clean strings from unconvertible UTF8

2010-11-08 Thread Dimitri Fontaine
process the source files before importing them? Regards, -- Dimitri Fontaine http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support -- 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] finding the other statement causing a sharelock

2010-11-09 Thread Dimitri Fontaine
docs/8.3/static/explicit-locking.html#ADVISORY-LOCKS http://www.postgresql.org/docs/8.3/static/functions-admin.html#FUNCTIONS-ADVISORY-LOCKS Regards, -- Dimitri Fontaine http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support -- Sent via pgsql-general mailing list (pgsql-general@postgre

Re: [GENERAL] Can you check in SQL if a fields can be encoded using specified charset

2010-11-17 Thread Dimitri Fontaine
n't be converted, but you could have a plpgsql function catching the exception for you and returning false. Won't be very fast, but will do the job. Regards, -- Dimitri Fontaine http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support -- Sent via pgsql-general mailing lis

Re: [GENERAL] Adding data from mysql to postgresql periodically

2010-11-17 Thread Dimitri Fontaine
odule reformat feature, and the mysql to PostgreSQL timestamp that you have to use sometime (depends on the MySQL minor version, if memory serves). Regards, -- Dimitri Fontaine http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support -- Sent via pgsql-general mailing list (pgsql

Re: [GENERAL] Full Text Partial Match at begining

2010-12-02 Thread Dimitri Fontaine
AI Rumman writes: > Is it possible to match "%text' in Postgresql 9 Full Text. See http://www.sai.msu.su/~megera/wiki/wildspeed -- Dimitri Fontaine http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support -- Sent via pgsql-general mailing list (pgsql-general@postg

Re: [GENERAL] Have any tricks not to recreate a standby server to switch to the former primary?

2011-01-06 Thread Dimitri Fontaine
com/greg2ndQuadrant/repmgr http://groups.google.com/group/repmgr Regards, -- Dimitri Fontaine http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support -- 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] Updated Latch Patch

2011-01-06 Thread Dimitri Fontaine
Shoma S Achar writes: > I would like to know where I could find the latest available Latch patch. If > anyone knows, please share this information. I guess you would find it there: http://git.postgresql.org/gitweb?p=postgresql.git&a=search&h=HEAD&st=commit&s=latch

Re: [GENERAL] How best to load modules?

2011-01-28 Thread Dimitri Fontaine
ou can even clone the git repository where the development occurs (branches named "extension" and "upgrade") and try it for yourself, then maybe send a mail about your findings (we call that a review): http://git.postgresql.org/gitweb?p=postgresql-extension.git;a=summary http:

Re: [GENERAL] How to extract a value from a record using attnum or attname?

2011-02-22 Thread Dimitri Fontaine
n array_lower(keycols, 1)..array_upper(keycols, 1) loop > select quote_ident(attname) from pg_catalog.pg_attribute > where attrelid = tg_relid and attnum = keycols[i]::oid Beware of attisdropped, which I've not fixed in the published URL before (the tapoueh.org one). Regards,

Re: [GENERAL] Finding Errors in .csv Input Data

2011-03-06 Thread Dimitri Fontaine
ns. Did you try pgloader yet? http://pgloader.projects.postgresql.org/ http://pgfoundry.org/projects/pgloader/ https://github.com/dimitri/pgloader http://packages.debian.org/sid/pgloader Regards, -- Dimitri Fontaine http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Suppor

Re: [GENERAL] Covert database from ASCII to UTF-8

2011-03-06 Thread Dimitri Fontaine
ose blog articles of mine might be of interest to you: http://tapoueh.org/articles/blog/_Getting_out_of_SQL_ASCII,_part_1.html http://tapoueh.org/articles/blog/_Getting_out_of_SQL_ASCII,_part_2.html Regards, -- Dimitri Fontaine http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Supp

Re: [GENERAL] FTS and words near one another

2011-03-06 Thread Dimitri Fontaine
ntation at pgcon here: http://www.pgcon.org/2009/schedule/events/119.en.html Regards, -- Dimitri Fontaine http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your su

Re: [GENERAL] How to Create Table from CSV

2011-03-06 Thread Dimitri Fontaine
BLE http://developer.postgresql.org/pgdocs/postgres/ddl-foreign-data.html http://developer.postgresql.org/pgdocs/postgres/sql-createforeigndatawrapper.html http://developer.postgresql.org/pgdocs/postgres/file-fdw.html Regards, -- Dimitri Fontaine http://2ndQuadrant.fr PostgreSQL : Expertise, Formation

Re: [GENERAL] loading files into tables

2008-02-04 Thread Dimitri Fontaine
Hi, Le lundi 04 février 2008, Pau Marc Munoz Torres a écrit : > I'm an ex-mysql user, i know there was a sentence in mysql that was > > load data local infile "somefile.txt" into table "sometable; > > I'm trying to do something similar in postgresql, can someone help me? COPY manual entry

Re: [GENERAL] copy question - fixed width?

2008-02-11 Thread Dimitri Fontaine
Le lundi 11 février 2008, Klint Gore a écrit : > Is there any way to make copy work with fixed width files? I'll try to see about implementing this in pgloader, shouldn't be complex. But we have some other things on the TODO (which could get formalized by now...). So at the moment the preprocess

Re: [GENERAL] [PERFORM] multi-threaded pgloader makes it in version 2.3.0

2008-03-10 Thread Dimitri Fontaine
Hi, Le samedi 01 mars 2008, Simon Riggs a écrit : > On Tue, 2008-02-26 at 13:08 +0100, Dimitri Fontaine wrote: > > I'd like to have some feedback about the new version, in term of bugs > > encountered and performance limitations (is pgloader up to what you would > > expe

Re: [GENERAL] [PERFORM] multi-threaded pgloader makes it in version 2.3.0

2008-03-10 Thread Dimitri Fontaine
Le lundi 10 mars 2008, Simon Riggs a écrit : > Not sure when or why I would want an rrqueue_size larger than > copy_every, and less sounds very strange. Can we get away with it being > the same thing in all cases? In fact, that's just that you asked for a reader which reads one line at a time and

Re: [GENERAL] PostgreSQL Replication with read-only access to standby DB

2008-03-26 Thread Dimitri Fontaine
Le mercredi 26 mars 2008, Greg Smith a écrit : > (My favorite acronym is TLA) Hehe :) I'd vote for A... -- dim signature.asc Description: This is a digitally signed message part.

Re: [GENERAL] Survey: renaming/removing script binaries (createdb, createuser...)

2008-03-26 Thread Dimitri Fontaine
Le Wednesday 26 March 2008 15:25:04 Zdeněk Kotala, vous avez écrit : > 1) What type of names do you prefer? > --- > > a) old notation - createdb, createuser ... > b) new one with pg_ prefix - pg_createdb, pg_creteuser ... > c) new one with pg prefix - pgcreatedb, pgcreat

Re: [GENERAL] anyone have experience with using Talend ETL tool

2008-04-01 Thread Dimitri Fontaine
Hi, Le Tuesday 01 April 2008 22:00:11 Irina Connelly, vous avez écrit : > I am looking around for an ETL tool to transfer data from one Postgres > database to another periodically. You could simply rely on COPY for this, as data coming out of PG could be trusted to be able to get in the other da

Re: [GENERAL] Master-master replication with PostgreSQL

2008-04-16 Thread Dimitri Fontaine
Hi, Le mercredi 16 avril 2008, Rob Collins a écrit : > There is one central server with 19 branches. Some tables need to replicate > from the central server to the branches. Other tables are centralised from > the branches into one totalling table at the centre. A few tables need to > replicate in

Re: [GENERAL] Master-master replication with PostgreSQL

2008-04-16 Thread Dimitri Fontaine
Hi, Le mercredi 16 avril 2008, Rob Collins a écrit : > To clarify the requirement: much like you, we're not looking for > synchronous replication, which would be too slow. The branches and central > server can be different for about 5 to 10 minutes. But the branches need to > be able to function i

Re: [GENERAL] Import German Decimal Numbers

2008-05-08 Thread Dimitri Fontaine
Hi, Le 7 mai 08 à 15:57, Tino Wildenhain a écrit : There is also http://pgfoundry.org/projects/pgloader/ and if not already implemented it should be fairly easy to implement a data filter within this one. pgloader indeed support user reformating modules, and comes with a mysql to pgsql times

Re: [GENERAL] Custom Base Type in C

2008-05-08 Thread Dimitri Fontaine
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, Le 8 mai 08 à 01:06, Toby Chavez a écrit : My custom type needs to have one biginteger and one text value... pretty straight forward. I guess my first question is if there are any examples out there that do something similar. I have looked

Re: [GENERAL] PG -v- MySQL

2008-05-13 Thread Dimitri Fontaine
Le mardi 13 mai 2008, Joshua D. Drake a écrit : > I suggest you take a look at: > > http://www.scribd.com/doc/2575733/The-future-of-MySQL-The-Project > http://sql-info.de/mysql/gotchas.html > http://www.bytebot.net/blog/archives/2008/04/17/what-mysql-can-learn-from-p >ostgresql http://www.commandpr

Re: [GENERAL] Need timestamp function that will change within a transaction

2008-05-14 Thread Dimitri Fontaine
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, Le 14 mai 08 à 21:56, D. Dante Lorenso a écrit : I'd like to find a timestamp function that WILL change within a transaction. See the fine manual: http://www.postgresql.org/docs/current/static/functions-datetime.html#FUNCTIONS-DATETIME-CU

Re: [GENERAL] Tripping up on my first attempt at building PG from source

2008-06-05 Thread Dimitri Fontaine
Le jeudi 05 juin 2008, Joshua D. Drake a écrit : > You don't have any build tools install. Try: > apt-get install binutils gcc autoconf flex Or even better: apt-get build-dep postgresql-8.3 -- dim signature.asc Description: This is a digitally signed message part.

Re: [GENERAL] Multithreaded queue in PgSQL

2008-06-10 Thread Dimitri Fontaine
Le mardi 10 juin 2008, Nikola Milutinovic a écrit : > Suppose we have one table in PgSQL which is a job queue, each row > represents one job with several status flags, IDs,... Several processes > will attempt to access the queue and "take" their batch of jobs, the batch > will have some parameteriz

Re: [GENERAL] Inter-app communication via DB

2008-06-19 Thread Dimitri Fontaine
Le jeudi 19 juin 2008, David a écrit : > One pattern I've used is for apps to communicate events to each other > through the database. > > ie: > > - App 1 sents a boolean value to True > - App 2 queries the field every 10s, sets the value to False, and does > something. > > Is this reasonable, or s

Re: [GENERAL] How to store text files in the postgresql?

2009-06-07 Thread Dimitri Fontaine
Hi, Le 6 juin 09 à 12:41, DimitryASuplatov a écrit : My task is to store a lot (10^5) of small ( <10 MB) text files in the database with the ability to restore them back to the hard drive on demand. The following article deals specifically with files containing XML but goes as far as explain

Re: [GENERAL] PL/PGSQL

2009-06-08 Thread Dimitri Fontaine
Hi, Welcome aboard :) Jordi Martínez writes: > 1.- Exception throwed by cast('mmdd' as timestamp) > > I do a cast conversion from a string to a timestamp. When I put a bad > date on the string, the cast throw an error on my PL/PGSQL but I can't > capture (I'm new). Which type of exception

Re: [GENERAL] invalid byte sequence for encoding "UTF8": 0xab

2009-06-08 Thread Dimitri Fontaine
"Grand, Mark D." writes: > It turns out that my problem was that the editor I was using (emacs) > does not properly support utf8 encoding. Emacs does support utf8 properly. http://www.emacswiki.org/emacs/ChangingEncodings It could be I'm biased because I use emacs from CVS, which is going to

Re: [GENERAL] postgres getting slow under heavy load though autivacuum is enabled

2009-06-09 Thread Dimitri Fontaine
Bill Moran writes: > In response to "tamanna madaan" : >> >> I am using postgres 8.1.2 with slony 1.1.5 used for replication >> between two nodes. Very high number of db operations like (2.8 >> million inserts, 1.4 million update and 4.5 lakhs deletes.) are being >> done on db in one transaction

Re: [GENERAL] Postgres Pg_connect PHP

2009-06-11 Thread Dimitri Fontaine
Vyacheslav Kalinin writes: > $conn = pg_pconnect("dbname=foo"); Please reconsider and use plain pg_connect(). -- dim -- 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] running pg_dump from python

2009-06-22 Thread Dimitri Fontaine
Hi, Erik Jones writes: > On Jun 15, 2009, at 5:17 AM, Jasen Betts wrote: > >> On 2009-06-14, Garry Saddington wrote: >>> def backup(): >>>import os >>>os.popen("c:/scholarpack/postgres/bin/pg_dump scholarpack > >>> c:/scholarpack/ancillary/scholarpack.sql") >> >> are you sure you're

Re: [GENERAL] Replication

2009-06-24 Thread Dimitri Fontaine
Hi, Gerry Reno writes: >> You can also get support for Londiste (which >> is used in production by Skype... I think that speaks for itself). > > Londiste is beta. The fact that Skype uses it is because it's part of > Skytools which is their product. They may want to run their own beta stuff. >

Re: [GENERAL] masking the code

2009-06-26 Thread Dimitri Fontaine
Hi, Le 26 juin 09 à 10:56, luca.cicirie...@email.it a écrit : Do exist a way to mask the code of the store procedure shipped with my DB? There's a way to do it which is not intended to cover this need: write the procedure code in C, and only ship the .so and .sql, not the .c code. You'll

Re: [GENERAL] Replication

2009-06-26 Thread Dimitri Fontaine
Hi, Le 25 juin 09 à 11:26, Jasen Betts a écrit : On 2009-06-23, Mike Christensen wrote: Does anyone actually have that (any node can go down and the others still replicate amongst themselves?) you are describing usenet. (it was not designed for relational database replication but it does

Re: [GENERAL] Group by on %like%

2009-07-03 Thread Dimitri Fontaine
Hi, Le 3 juil. 09 à 11:44, Jennifer Trey a écrit : I would like to run a query and group several rows based on a phone number. However, the same phone number might have a prefix on occasion, example : name | phone_number -- james | 123456 james | 00441234556 as you can s

Re: [GENERAL] Table Partitioning : Having child tables in multiple database servers

2009-07-07 Thread Dimitri Fontaine
Hi, Ransika de Silva writes: > The client wants to have the freedom of increasing the processor power > AND the storage by introducing new database servers. I think the following document will be of interest: http://wiki.postgresql.org/wiki/Image:Moskva_DB_Tools.v3.pdf It presents the archite

Re: [GENERAL] howto determine rows count to be returned by DECLARE ... SELECT ...

2009-07-08 Thread Dimitri Fontaine
Konstantin Izmailov writes: > However, it is not clear how to determine max rows count that the > cursor can return. The count is necessary for two purposes: render > scrollbar and support jumping to the last rows in the grid. You can MOVE LAST, it'll tell you how many rows are in there, then MO

Re: [GENERAL] "= Null" <> "is Null"?

2009-07-08 Thread Dimitri Fontaine
Durumdara writes: > Some of other DBs are uses Null as Null in >=< comparisons. Is PG not? > What are the rules? PostgreSQL implements SQL, which has a 3-valued logic. There's True, there's False, and there's NULL. NULL means that we know nothing about what's in there. Would you really want to

Re: [GENERAL] uuid_hash declaration

2009-07-13 Thread Dimitri Fontaine
Mel Flynn writes: > Is there a way in the API to tell the backend that "uuid_hash function is > implemented by the foo__uuid_hash function" so that backwards compatibility > isn't broken? Yes. http://www.postgresql.org/docs/8.3/interactive/xfunc-c.html#XFUNC-C-PGXS For example: CREATE OR R

Re: [GENERAL] PG equivalent of "mysqlhotcopy"?

2009-07-31 Thread Dimitri Fontaine
Hi, Le 30 juil. 09 à 15:34, Phoenix Kiula a écrit : I know about pg_dumpall, which creates a humongous SQL file, but is there something equivalent in the postgresql world, like a "pgsqlhotcopy" which copies data folders in a similar way as mysqlhotcopy? Copying the raw data files of a live da

Re: [GENERAL] bigint to ip

2009-08-16 Thread Dimitri Fontaine
"Mindaugas G." writes: > for example I have db with ip_src etc ant its data type bigint, > how must look select query what I can see ip address (int) instead of > bigint? You might be interrested into the ip4r project: http://pgfoundry.org/projects/ip4r/ Regards, -- dim -- Sent via pgsql-ge

Re: [GENERAL] Get closest numbers between intervals

2009-09-01 Thread Dimitri Fontaine
xaviergxf writes: > city_code, start_ip, end_ip > > I´m searching for the city that its between two ip´s. But, i would > like to get the nearest´s cities too. I'd have a look at ip4r rather than having both the start and end ip there. The GiST index on ip4r allow for quick lookup: SELECT * FRO

Re: [GENERAL] [Q] optmizing postgres for 'single client' / many small queries

2009-09-04 Thread Dimitri Fontaine
Hi, Tom Lane writes: > Just out of curiosity, does anyone know of any ORM anywhere that doesn't > suck? They seem to be uniformly awful, at least in terms of their > interfaces to SQL databases. If there were some we could recommend, > maybe people would be less stuck with these bogus legacy ar

Re: [GENERAL] PL/Perl 64-bit and sending emails

2009-09-04 Thread Dimitri Fontaine
Hi, Steve Atkins writes: > On Sep 3, 2009, at 11:30 AM, Mark Lubratt wrote: >> Or, does someone know of another way to get the >> backend to send an email? > > Have a queue table in the database you put your emails into and an external > process that polls the table, sends the email and deletes

Re: [GENERAL] strange error occurs when adding index

2009-09-04 Thread Dimitri Fontaine
hubert depesz lubaczewski writes: > On Fri, Sep 04, 2009 at 05:42:31PM +0800, Juan Backson wrote: >> When I tried to add the following index, I get some strange error. Does >> anyone know what these errors mean and how to fix it? >> Here is the index query: >> create index idx_product_items_digi

Re: [GENERAL] schema proxying virtual database

2009-09-13 Thread Dimitri Fontaine
Rajesh Kumar Mallah writes: > my question is , is it a feasible idea to have some special kind of database > in the postgresql cluster that mimics a schema of an existsing > database. Try abusing pgbouncer to this effect. Configure several pgbouncer databases pointing to the same physical one, w

Re: [pgeu-general] [GENERAL] Call for design: PostgreSQL mugs

2013-09-05 Thread Dimitri Fontaine
Marc Balmer writes: > My SQL is PostgreSQL PostgreSQL really is YeSQL! -- you can check http://yesql.org too -- Dimitri Fontaine06 63 07 10 78 http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support -- Sent via pgsql-general mail

Re: [GENERAL] Huge spikes in number of connections doing "PARSE"

2011-04-30 Thread Dimitri Fontaine
is tied to real active connection, I don't see what it would solve. Still, if you're searching ideas… Regards, -- Dimitri Fontaine http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes

Re: [GENERAL] Multiple instances with same version?

2011-04-30 Thread Dimitri Fontaine
ges: http://manpages.debian.net/cgi-bin/man.cgi?query=pg_lsclusters http://manpages.debian.net/cgi-bin/man.cgi?query=pg_createcluster Regards, -- Dimitri Fontaine http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To mak

Re: [GENERAL] converting databases form SQL_ASCII to UTF8

2011-04-30 Thread Dimitri Fontaine
erting, you might be interested into those two blog entries: http://tapoueh.org/articles/blog/_Getting_out_of_SQL_ASCII,_part_1.html http://tapoueh.org/articles/blog/_Getting_out_of_SQL_ASCII,_part_2.html Regards, -- Dimitri Fontaine http://2ndQuadrant.fr PostgreSQL : Expertise, Formation

Re: [GENERAL] Partitioning an existing table

2011-04-30 Thread Dimitri Fontaine
the "name". Later on you still can rejigger your data around if you wish. With time based partitioning it's best to wait until the old partition is not the target of INSERTs or UPDATEs any more. Regards, -- Dimitri Fontaine http://2ndQuadrant.fr PostgreSQL : Expertise, Formation e

Re: [GENERAL] [HACKERS] PostgreSQL Core Team

2011-04-30 Thread Dimitri Fontaine
Thom Brown writes: > Excellent! Magnus is a very valuable contributor to the PostgreSQL > community and I think the community can only benefit from this addition to > the core team. +1 Congrats, Magnus! -- Dimitri Fontaine http://2ndQuadrant.fr PostgreSQL : Expertise, Formation e

Re: [GENERAL] pgloader hangs with an invalid filename

2011-08-15 Thread Dimitri Fontaine
ly due to current threading implementation in pgloader, I guess the control thread is still waiting for the load to terminate, which will never happen. It seems to be fixed in current version though. See if you can upgrade. Regards, -- Dimitri Fontaine http://2ndQuadrant.fr PostgreSQL : Exp

Re: [GENERAL] Adapting existing extensions to use CREATE EXTENSION

2011-08-15 Thread Dimitri Fontaine
gfincore recently, and will probably do some more of it later. You can look at those links for the time being: http://tapoueh.org/blog/2011/06/29-multi-version-support-for-extensions.html https://github.com/klando/pgfincore/tree/master/debian http://packages.debian.org/sid/postgresql-9.0-p

Re: [GENERAL] pgloader hangs with an invalid filename

2011-08-15 Thread Dimitri Fontaine
o the development now happens at github. http://packages.debian.org/search?keywords=pgloader http://github.com/dimitri/pgloader Regards, -- Dimitri Fontaine http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support -- Sent via pgsql-general mailing list (pgsql-general@postgresql.or

Re: [GENERAL] Using Postgresql as application server

2011-08-18 Thread Dimitri Fontaine
e queue and send emails. Regards, -- Dimitri Fontaine http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support -- 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] Using Postgresql as application server

2011-08-18 Thread Dimitri Fontaine
not thinking of implementing as it is It's been around for a long time already: http://asmith.id.au/mod_libpq.html Regards, -- Dimitri Fontaine http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) T

Re: [GENERAL] Dump a database excluding one table DATA?

2011-08-19 Thread Dimitri Fontaine
s as for -n. -N can be given more than once to exclude schemas matching any of several patterns. Regards, -- Dimitri Fontaine http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make chan

Re: [GENERAL] Using Postgresql as application server

2011-08-28 Thread Dimitri Fontaine
been existing in PostgreSQL land for a long time already, no need to resort to other proprietary architectures here. Regards, -- Dimitri Fontaine http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To m

Re: [GENERAL] PostgreSQL vs. Microsoft SQL server

2010-05-02 Thread Dimitri Fontaine
Merlin Moncure writes: > On Sat, May 1, 2010 at 2:47 PM, Thomas Løcke > wrote: >> Anybody know of any recent comparisons made between the two? >> >> I'm in the process of buying a new telephony related software suite, > > if you are writing stuff in C/C++, doing significant coding INSIDE the >

  1   2   >