Re: [GENERAL] Best data type to use for sales tax percent

2009-10-08 Thread Christophe Pettus
, the basic sales tax rate in Los Angeles is 9.75%, so 0.0975. (There are other subtleties in sales tax calculation in California; feel free to ask off-list if you want more utterly non-PostgreSQL-related detail. :) ) -- -- Christophe Pettus x...@thebuild.com -- Sent via pgsql-general

Re: [GENERAL] numeric field overflow

2009-10-06 Thread Christophe Pettus
INTO test.test VALUES (1) into a NUMERIC(5,1), what you are doing is inserting: INSERT INTO test.test VALUES (1.0) 1.0 has six significant digits, rather than five, so the insert fails. -- -- Christophe Pettus x...@thebuild.com -- Sent via pgsql-general mailing list (pgsql

Re: [GENERAL] How useful is the money datatype?

2009-10-05 Thread Christophe Pettus
A quick check of the source code (src/backend/utils/adt/numeric.c) shows it's base 1, each digit represented as an int16. It's not strictly speaking BCD, but there's no computational difference. -- -- Christophe Pettus x...@thebuild.com -- Sent via pgsql-general mailing list (pgsql

Re: [GENERAL] How useful is the money datatype?

2009-10-04 Thread Christophe Pettus
On Oct 4, 2009, at 7:09 PM, Guy Rouillier wrote: There is no reason why PG could not support packed decimal. Is that not NUMERIC? -- -- Christophe Pettus x...@thebuild.com -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http

Re: [GENERAL] Postgresql Web Hosting

2009-09-29 Thread Christophe Pettus
that you can install exactly what you want (so, no being stuck with PG 8.0, for example). -- -- Christophe Pettus x...@thebuild.com -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] Limiting a user to a single or subset of databases in a cluster?

2009-09-26 Thread Christophe Pettus
Of course, one can create a user that has no useful privileges on a particular database, but is there a way of limiting a user to being able to log into only a single one of, or a subset of, the databases in a cluster? -- -- Christophe Pettus x...@thebuild.com -- Sent via pgsql

Re: [GENERAL] Limiting a user to a single or subset of databases in a cluster?

2009-09-26 Thread Christophe Pettus
On Sep 26, 2009, at 11:29 AM, Christophe Pettus wrote: Of course, one can create a user that has no useful privileges on a particular database, but is there a way of limiting a user to being able to log into only a single one of, or a subset of, the databases in a cluster? Like, say

[GENERAL] vacuum won't even start

2009-09-09 Thread Jean-Christophe Praud
Hi all, I've a problem on a heavy loaded database: vacuums don't work since about a week. All I got is: mybase=# vacuum verbose analyze public.mytable; INFO: vacuuming public.mytable (I stop it after hours) Looking with top and iotop, I see the process takes some cpu and disk io time

Re: [GENERAL] vacuum won't even start

2009-09-09 Thread Jean-Christophe Praud
Alvaro Herrera a écrit : Jean-Christophe Praud wrote: Hi all, I've a problem on a heavy loaded database: vacuums don't work since about a week. All I got is: mybase=# vacuum verbose analyze public.mytable; INFO: vacuuming public.mytable (I stop it after hours) Looking with top and iotop

Re: [GENERAL] vacuum won't even start

2009-09-09 Thread Jean-Christophe Praud
Tom Lane a écrit : Jean-Christophe Praud j...@steek.com writes: I've a problem on a heavy loaded database: vacuums don't work since about a week. All I got is: mybase=# vacuum verbose analyze public.mytable; INFO: vacuuming public.mytable (I stop it after hours) Looking

Re: [GENERAL] vacuum won't even start

2009-09-09 Thread Jean-Christophe Praud
Tom Lane a écrit : Jean-Christophe Praud j...@steek.com writes: Indeed, the tables I tried to vacuum have locks on them. AccessShareLock belonging to queries which seem sleeping. I tried to kill these queries but pg_cancel_backend() has no effect, and the process doesn't get the 15 signal

Re: [GENERAL] $Body$

2009-08-30 Thread Christophe Pettus
the $BODY$ when writing the function? In other words: why to use the $ sign? Regards Bilal -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general -- -- Christophe Pettus x...@thebuild.com

Re: [GENERAL] best practise/pattern for large OR / LIKE searches

2009-08-26 Thread Christophe Pettus
arbitrarily embedded in the text, or are they delimited in some regular way)? If they are words, you might consider using the full text functionality to create an index of them, and searching using that. -- -- Christophe Pettus x...@thebuild.com -- Sent via pgsql-general mailing list (pgsql

Re: [GENERAL] Figuring out relationships between tables.

2009-08-23 Thread Christophe Pettus
On Aug 23, 2009, at 7:47 AM, Andrew Cooper wrote: An employee can only have 1 manager/supervisor but the hierarchy can be varying depths. Traditionally, that's done by having a supervisor field as part of the employee record, with either NULL or a special marker value to indicate no

Re: [GENERAL] Wich the best way to control the logic of a web application?

2009-08-19 Thread Christophe Pettus
, but it wasn't significant enough to be a problem.) Hope this helps! -- -- Christophe Pettus x...@thebuild.com -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] Video from the August 11, 2009 SFPUG meeting available

2009-08-13 Thread Christophe Pettus
Greetings, The video of the August 11, 2009 SFPUG talk, featuring David Fetter's presentation on windowing and common table expressions, is now up: http://thebuild.com/blog/2009/08/13/sfpug-windowing-and-common-table-expressions/ -- -- Christophe Pettus x...@thebuild.com -- Sent via

Re: [GENERAL] mail alert

2009-08-11 Thread Christophe Pettus
solution. You might want to take a look at check_postgres: http://bucardo.org/check_postgres/ -- -- Christophe Pettus x...@thebuild.com -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql

Re: [GENERAL] Monitoring tools for Postgresql

2009-07-29 Thread Christophe Pettus
On Jul 28, 2009, at 11:24 PM, mukeshp wrote: Can anyone suggest me tools for monitoring postgresql server. ? As it happens, there was a talk about that very topic on PG day: Check Please! What Your Postgres Databases Wishes You Would Monitor / Robert Treat / OmniTI

Re: [GENERAL] Video available for PGDay SJC '09

2009-07-28 Thread Christophe Pettus
On Jul 28, 2009, at 7:17 AM, Andreas Wenk wrote: another good approach. I understand the point of view. But this menas to download the files anyway because playing mpeg files in the browser is the same as with mov files - I think. Historically, MOV has been the least-bad container format;

Re: [GENERAL] Video available for PGDay SJC '09

2009-07-28 Thread Christophe Pettus
the way back to IE6. A nice example of fallback code is available at: http://camendesign.com/code/video_for_everybody Now, Joshua Drake has often uploaded these videos to Vimeo, thus giving everyone an in-browser channel as well. Thanks! -- -- Christophe Pettus x...@thebuild.com

Re: [GENERAL] Video available for PGDay SJC '09

2009-07-28 Thread Christophe Pettus
On Jul 28, 2009, at 3:55 PM, Greg Stark wrote: In reality I would be pretty happy with any page that had a link at the bottom to download an mpeg format file with H.264 data in it that mplayer can play. Well, mplayer claims it can play MOV, and the files are H.264, so assuming the mplayer

[GENERAL] Video available for PGDay SJC '09

2009-07-27 Thread Christophe Pettus
/pgday-sjc-09/pgday-sjc-09-lightning.mov Many thanks to Steve Crawford for the audio system and assistance with setup, tear-down, and coordination during the event. -- -- Christophe Pettus x...@thebuild.com -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes

[GENERAL] Building from source vs RPMs

2009-07-27 Thread Christophe Pettus
I'm moving from a long time in BSD-land to using Linux. I've always been in the habit of building PostgreSQL from the source tarballs. On Linux, is there an advantage either way to using the RPMs as opposed to building from source? Thanks! -- -- Christophe Pettus x...@thebuild.com

Re: [GENERAL] 3des key lengths and key management

2009-07-23 Thread Christophe
On Jul 23, 2009, at 12:11 PM, Steve Atkins wrote: They asked me to open up my firewall to them, pointing at a fake server, just so they'd have something to audit, after failing our audit because we only allowed access to the application from inside our firewall. I'm glad it wasn't just

Re: [GENERAL] commercial adaptation of postgres

2009-07-20 Thread Christophe
On Jul 20, 2009, at 6:56 PM, Dennis Gearon wrote: I once talked to a company that made a custome version of Postgres. It split tables up on columns and also by rows, had some other custome features. It was enormously faster from what I gathered. I could of sworn it began with the letter

Re: [GENERAL] search for partial dates

2009-06-11 Thread Christophe
On Jun 11, 2009, at 1:23 PM, James B. Byrne wrote: Given a datetime column, not null, is there a single syntax that permits searching for all dates in a given year, year+month, and year+month+day such that a single parameterised query can handle all three circumstances? Well, of course, in a

[GENERAL] Rails and PostgreSQL now up on media.postgresql.org

2009-06-10 Thread Christophe
Greetings, The video from the June 9, 2009 SFPUG meeting, PostgreSQL as a secret weapon for high-performance Ruby on Rails applications, is now available for viewing or download from the media.postgresql.org server: http://media.postgresql.org/sfpug/sfpug-rails-20090609.mov Thanks, --

Re: [GENERAL] Rails and PostgreSQL now up on media.postgresql.org

2009-06-10 Thread Christophe
On Jun 10, 2009, at 6:27 PM, Chris wrote: Can you list the filesizes on http://media.postgresql.org/sfpug/ please? Josh Berkus handles that page, but I think that's a splendid idea. This particular video file is about 403MB. -- Sent via pgsql-general mailing list

Re: [GENERAL] Bloated Table

2009-05-27 Thread Christophe
On May 27, 2009, at 3:25 PM, Greg Smith wrote: Interesting and an extremely common request. I just added an item to the Vacuum section of the TODO list while you were listing issues and potential solutions here: Provide more information in order to improve user-side estimates of dead

Re: [GENERAL] do postgresql this job for me ? (firebird user)

2009-05-24 Thread Christophe
On May 24, 2009, at 8:58 AM, Craig Ringer wrote: There isn't currently any REINDEX CONCURRENTLY option, but people seem to have a few workarounds that do the job if you really do need to rebuild an index on a live, active table. It's pretty straight-forward to do: CREATE INDEX

Re: [GENERAL] 8.3: timestamp subtraction

2009-05-23 Thread Christophe
On May 23, 2009, at 9:13 AM, Daniel Verite wrote: I don't know why this query returns false: SELECT '20040506 070809.01'::timestamp(6) - '20010203 040506.007000'::timestamp(6) = '1188 day 3 hour 3 minute 3 second 3 millisecond'::interval; If I just subtract the two timestamps, its result is

Re: [GENERAL] 8.3: timestamp subtraction

2009-05-23 Thread Christophe
On May 23, 2009, at 10:44 AM, Havasvölgyi Ottó wrote: Thanks. I tested the standard Win32 distribution of 8.3.6. The same happens on 8.2. But on 8.0 it works. When I don't use milliseconds, then it works. Will 8.4 work fine on Win32 again? If the issue is using floating point timestamps,

[GENERAL] PostgreSQL in the cloud now up on media.postgresql.org

2009-05-15 Thread Christophe
Greetings, The video from the May 12, 2009 SFPUG meeting, BIRT PostgreSQL, is now available for viewing or download from the media.postgresql.org server: http://media.postgresql.org/sfpug/sfpug-birt-20090512.mov Thanks, -- Xof -- Sent via pgsql-general mailing list

Re: [GENERAL] Controlling psql output

2009-05-08 Thread Christophe
On May 8, 2009, at 9:51 AM, Gauthier, Dave wrote: This gets rid of the header and footer OK. But there is still a blank line as the first line in stdout. Also, each record has a preceding space before the column value. Is there a way to do what I want? sed?

Re: [GENERAL] Column oriented pgsql

2009-05-08 Thread Christophe
On May 8, 2009, at 11:25 AM, John R Pierce wrote: you read your tables by column, rather than by row?? SQL queries are inherently row oriented, the fundamental unit of storage is a 'tuple', which is a representation of a row of a table. I believe what is referring to is the disk storage

Re: [GENERAL] XML - PG ?

2009-05-06 Thread Christophe
On May 6, 2009, at 10:47 AM, Gauthier, Dave wrote: Is there a way to read an XML file into a postgres DB? I’m thinking that it will create and relate whatever tables are necessary to reflect whatever’s implied by the XML file structure. There's no built-in functionality that does what

Re: [GENERAL] PostgreSQL Object-Oriented Database?

2009-04-27 Thread Christophe
On Apr 27, 2009, at 7:00 AM, Robert Pepersack wrote: My agency has a contractor that created a PostgreSQL database that he calls object-oriented. I noticed that the contractor has more than one value in a column separated by commas. In the relational world, this obviously violates first

Re: [GENERAL] Yet another drop table vs delete question

2009-04-21 Thread Christophe
On Apr 21, 2009, at 12:28 PM, Peter Eisentraut wrote: Yes, but if you are asking that question, you probably really want to use TRUNCATE. The advantage of DROP TABLE being, of course, that DROP TABLE is transactionally-safe, while TRUNCATE is not. -- Sent via pgsql-general mailing list

Re: [GENERAL] Yet another drop table vs delete question

2009-04-21 Thread Christophe
On Apr 21, 2009, at 1:20 PM, Tom Lane wrote: They're both going to drop data that might conceivably be visible in the snapshot of some concurrent transaction that hasn't yet touched the table (else it would have lock) but might wish to do so later. Unless I'm deeply misunderstanding

Re: [GENERAL] Yet another drop table vs delete question

2009-04-21 Thread Christophe
On Apr 21, 2009, at 1:36 PM, Tom Lane wrote: I was thinking of MVCC semantics, which is a different issue. Indeed so, my error. This is a bit of a drift off-topic, but rereading the docs, I'm now having trouble visualizing the real-world effect of the non-MVCC-safeness of TRUNCATE. A

Re: [GENERAL] Yet another drop table vs delete question

2009-04-21 Thread Christophe
On Apr 21, 2009, at 2:15 PM, Jeff Davis wrote: In Session1, the serializable transaction sees an empty version of bar, even though it had tuples in at the time Session1 got its serializable snapshot. Indeed so, and I understand that part. But since Session1 didn't try to access 'bar', it

[GENERAL] PostgreSQL in the cloud now up on media.postgresql.org

2009-04-13 Thread Christophe
Greetings, The video from the April 8, 2009 SFPUG meeting, PostgreSQL in the Cloud, is now available for viewing or download from the media.postgresql.org server: http://media.postgresql.org/sfpug/sfpug-cloud-20090408.mov Thanks to Josh Berkus for his organizational talents, and Dirk

Re: [GENERAL] PostgreSQL in the cloud now up on media.postgresql.org

2009-04-13 Thread Christophe
On Apr 13, 2009, at 1:59 PM, Ivan Sergio Borgonovo wrote: wget says it is a 1Gb file. Is there anything smaller? Since I have the master right here, I'll be happy to reencode it to a smaller size (250mb is probably the reasonable lower limit before the video quality reaches the point that

Re: [GENERAL] PostgreSQL in the cloud now up on media.postgresql.org

2009-04-13 Thread Christophe
On Apr 13, 2009, at 2:54 PM, Joshua D. Drake wrote: Yes Vimeo can download and I will have it up soon. Thank you! My work here is done. :) -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription:

Re: [GENERAL] Connect without specifying a database?

2009-04-11 Thread Christophe
On Apr 11, 2009, at 10:15 AM, li...@mgreg.com wrote: So, how does needing to connect to a database before querying about existing databases make any sense? Well, you have to connect to the database server, no matter what, in order to check on the existence of a database (unless you are

Re: [GENERAL] unexpected check constraint violation

2009-03-23 Thread Christophe
On Mar 23, 2009, at 1:41 PM, Jeremy Harris wrote: Because equality is not well-defined for real values? That was my first thought, too, but why would two identical real literals evaluate to different bit patterns? -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To

Re: [GENERAL] Accent insensitive search?

2009-03-18 Thread Christophe
What I've done in the past in this situation is to create a separate field with the text normalized to whatever the search form is (all lower case, accents stripped, etc.), and then index and search that from the application. Although I've not tried it, a functional index that did the same

Re: [GENERAL] Accent insensitive search?

2009-03-18 Thread Christophe
On Mar 18, 2009, at 11:24 AM, Alvaro Herrera wrote: Hmm, if to_ascii() doesn't work, that's something worth some research. Maybe the encoding config is broken, for example. The docs say to_ascii() only works with LATIN1, LATIN2, LATIN9, and WIN1250; maybe convert('string', 'UTF-8',

Re: [GENERAL] Re: [pgsql-advocacy] Video from the 2009-03-11 SFPUG talk on Unison, by Reese Hart

2009-03-17 Thread Christophe
On Mar 17, 2009, at 9:57 PM, Joshua D. Drake wrote: It is also on Vimeo: http://www.vimeo.com/3732938 Joshua D. Drake Thanks! - Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] Video from the 2009-03-11 SFPUG talk on Unison, by Reese Hart

2009-03-14 Thread Christophe
Hi, The video is now available for download! You can find it at: http://blog.thebuild.com/sfpug/sfpug-unison-20090311.mov Thanks, -- Christophe -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org

Re: [GENERAL] Maximum transaction rate

2009-03-13 Thread Christophe
On Mar 13, 2009, at 11:59 AM, Joshua D. Drake wrote: Wait, actually a good BBU RAID controller will disable the cache on the drives. So everything that is cached is already on the controller vs. the drives itself. Or am I missing something? Maybe I'm missing something, but a BBU controller

Re: [GENERAL] Streaming PUG meeting: PostgreSQL Genetics!

2009-03-11 Thread Christophe
On Mar 11, 2009, at 5:51 PM, CaT wrote: Will there be a saved version of this available for later viewing? Don't make me choose between steak and beer and postgres. 8( Yes! I'll announce it here when it's available. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To

Re: [GENERAL] pgsql announce now on twitter

2009-03-04 Thread Christophe
On Mar 4, 2009, at 9:54 AM, Joshua D. Drake wrote: Not sure what the complainer is talking about here. pgsql-announce is moderated so spam should be almost nil. I'm not 100% sure what Twitter spam *is*, for that matter. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To

Re: [GENERAL] Running untrusted sql safely?

2009-02-15 Thread Christophe
On Feb 15, 2009, at 2:47 PM, Stuart McGraw wrote: I just hoping for some confirmation that the permissions based approach did not have some holes in it that I am not seeing. Another possibility is to create a set of functions that contain the query operations you would like to allow,

Re: [GENERAL] auto insert data every one minute

2009-01-04 Thread Christophe Chauvet
Hi Why don't use pgAgent http://pgadmin.org/docs/dev/pgagent.html ? Regards, Christophe Chauvet. Tino Wildenhain a écrit : Hi, searchelite wrote: ... i can use pg_sleep..but i have thousands of data to be inserted..is there any better way using pg_sleep? I wonder what is you complete

Re: [GENERAL] How are locks managed in PG?

2008-12-22 Thread Christophe
Playing the straight man, I have to ask: Scalability issues with locks in PG vs Oracle? -- 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] lesslog incorrect resource manager data checksum.

2008-11-20 Thread Jean-Christophe Arnu
I believe the coverage is reasonable. Sorry for the inconvenience and thanks a lot for your help. - Koichi Suzuki 2008/11/18 Jean-Christophe Arnu [EMAIL PROTECTED]: Hi, I'm trying to use lesslog 1.1 (out of NTT rpm available on pgfoundry) on my pg_xlog files out of a 8.3.3

Re: [GENERAL] Question about the WITH RECURSIVE patch

2008-11-20 Thread Christophe
On Nov 20, 2008, at 1:21 PM, Tom Lane wrote: See the fine manual, for instance last para here: http://developer.postgresql.org/pgdocs/postgres/queries-with.html Fine manual indeed... this the best explanation of WITH RECURSIVE I've ever read. Kudos to the documentation writer(s). -- Sent

[GENERAL] lesslog incorrect resource manager data checksum.

2008-11-18 Thread Jean-Christophe Arnu
(a bunch of) for my test purpose are the ones on the remote node, they should be exactly the same as the one on the server. Thanks by advance for any ideao! -- Jean-Christophe Arnu

[GENERAL] pg_lesslog/pg_standby

2008-11-13 Thread Jean-Christophe Arnu
allowing to pre-process WAL file (thus customizing CustomizableNextWALFileReady function?), this might be usefull for other issues or use cases than pg_lesslog but it applies quite good to it :) What are your thoughts for each of these points? Thanks, -- Jean-Christophe Arnu

Re: [GENERAL] Are there plans to add data compression feature to postgresql?

2008-10-30 Thread Christophe
On Oct 30, 2008, at 8:10 AM, Grzegorz Jaśkiewicz wrote: up to 8.3 it was massively slower on raid1 (software raid on linux), starting from 8.3 things got lot lot better (we speak 3x speed improvement here), but it still isn't same as on 'plain' drive. I'm a bit surprised to hear that; what

Re: [GENERAL] Decreasing WAL size effects

2008-10-30 Thread Christophe
On Oct 30, 2008, at 2:54 PM, Gregory Stark wrote: Wouldn't it be just as good to indicate to the archive command the amount of real data in the wal file and have it only bother copying up to that point? Hm! Interesting question: Can the WAL files be truncated, rather than zeroed,

Re: [GENERAL] postgresql and Mac OS X

2008-10-28 Thread Christophe
On Oct 28, 2008, at 4:03 PM, Steve Atkins wrote: Installing from source means I can avoid the fragility of macports or fink, and know that I've built it in much the same way as the postgresql or solaris installation I'd be using for production. +1 It means I can easily pick the contrib

Re: Obfuscated stored procedures (was Re: [GENERAL] Oracle and Postgresql)

2008-09-25 Thread Christophe
On Sep 25, 2008, at 1:05 PM, Casey Allen Shobe wrote: As for the expectation above - could pl/pgsql be made compilable? Without getting into the argument as to the level of security provided, it strikes me that a reasonable approach would be a non- core pluggable language which accepts

Re: [GENERAL] Postgres does not start, gives no error

2008-09-04 Thread Christophe
On Sep 4, 2008, at 11:34 AM, Akhtar Yasmin-B05532 wrote: I am really stuck here. And need to get a way thru all of this. Any suggestions will be really appreciated. Have you confirmed that the user that you are logged in as when you attempt to start Postgres has write access to

Re: [GENERAL] Oracle and Postgresql

2008-08-31 Thread Christophe
On Aug 31, 2008, at 7:44 PM, Guy Rouillier wrote: CTOs/CIOs like to sleep at night. If you buy Oracle, and there's a problem, the conversation with the CEO is that Oracle broke. With PG, even if you have exactly the same level of support, that database you selected broke. The sad

Re: [GENERAL] ERROR: relation . . . does not exist

2008-08-30 Thread Christophe
On Aug 30, 2008, at 6:26 AM, Albretch Mueller wrote: Well, then obviously there is the need for it and you were not successful enough at convincing these developers that they were confusing postgresql with a spreadsheet program The behavior you are looking for is typical of a spreadsheet,

Re: [GENERAL] ERROR: relation . . . does not exist

2008-08-30 Thread Christophe
On Aug 30, 2008, at 10:33 AM, Albretch Mueller wrote: well, yeah! I would totally agree with you, but since I doubt very much COPY FROM CSV is part of the SQL standard to beging with, why not spice it up a little more? I'd guess that coming up with a general algorithm to guess the type

Re: [GENERAL] ERROR: relation . . . does not exist

2008-08-30 Thread Christophe
You have made clear to me why my attempt for a RFE for COPY FROM CVS has found some technical resistance/disagreement, but I still think my idea even if not so popular for concrete and cultural reasons makes at least sense to some people It's a perfectly reasonable problem to want to solve;

Re: [GENERAL] MySQL LAST_INSERT_ID() to Postgres

2008-08-28 Thread Christophe
On Aug 28, 2008, at 3:23 PM, D. Dante Lorenso wrote: I use RETURNING for all my insert and UPDATE statements now. Usually I'll return the primary key for the table, but sometimes I return a column that is created by one of my triggers. It's awesome to be able to do this in one query.

Re: [GENERAL] indexes on functions and create or replace function

2008-08-28 Thread Christophe
On Aug 28, 2008, at 3:21 PM, Matthew Dennis wrote: I have no doubt that someone would complain about it, but I think it's better than the alternative. Determining if changing any function will cause an index to break is not a straight-forward problem. I don't believe that PG right now

Re: [GENERAL] indexes on functions and create or replace function

2008-08-28 Thread Christophe
On Aug 28, 2008, at 5:49 PM, Matthew Dennis wrote: Yes, I can see that would indeed be a problem. Are there future plans to start tracking such dependencies? It seems like it would be a good idea in general. I believe the EXECUTE statement would thwart such plans. -- Sent via

Re: [GENERAL] indexes on functions and create or replace function

2008-08-28 Thread Christophe
On Aug 28, 2008, at 6:10 PM, Matthew Dennis wrote: I'm not sure I follow. Couldn't you track which statements were prepared that called a function and either reprepare (just like reindex, recheck, etc) or in the case of dropping a function, refuse to drop it because something depends on

Re: [GENERAL] indexes on functions and create or replace function

2008-08-28 Thread Christophe
On Aug 28, 2008, at 6:51 PM, Alvaro Herrera wrote: Also, you have to keep in mind that we support pluggable languages. The function's source code is just an opaque string. Oh, ouch, right. I think that this is one of those cases where it's better that we simply advertise: BE AWARE OF

Re: [GENERAL] indexes on functions and create or replace function

2008-08-28 Thread Christophe
On Aug 28, 2008, at 7:04 PM, Matthew Dennis wrote: The plpgsql execute statement, as I understand it, means take this string and execute like a client sent it to you. Of course, the string could come from anywhere. There's no inherent reason that I can think of (except good taste) that you

Re: [GENERAL] indexes on functions and create or replace function

2008-08-28 Thread Christophe
On Aug 28, 2008, at 7:22 PM, Matthew Dennis wrote: Yes, but in the case of pluggable languages, you still load something that constitutes the source. In the case of PL/Java, the jar for example. This would mean that, for example, if you changed any single function (no matter how distant

Re: [GENERAL] Postgre connect on Postgre

2008-08-26 Thread Christophe
On Aug 26, 2008, at 7:10 PM, Anderson dos Santos Donda wrote: How I can connect a postgre database on another postgre database, and manipulate the datas on both database? There is a module in contrib just for such a purpose: http://www.postgresql.org/docs/8.3/interactive/dblink.html

Re: [GENERAL] plpgsql functions

2008-08-15 Thread Christophe
On Aug 15, 2008, at 1:47 PM, Raymond O'Donnell wrote: For functions return SETOF any type, you need to use the following idiom: Or, you can use, RETURN QUERY your query here -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription:

[GENERAL] Running a PL/pgSQL function

2008-08-11 Thread Christophe
I'm startled that I've never done this before, but... I have a PL/ pgSQL function that takes no arguments, returns VOID, and has a bunch of side effects on the database. The correct way of invoking this function is: SELECT my_func(); ... yes? Thanks; it seems to work fine, but

Re: [GENERAL] uuid

2008-08-03 Thread Christophe
On Aug 3, 2008, at 1:18 PM, [EMAIL PROTECTED] wrote: ERROR: function uuid_ns_url() does not exist Remember to install the functions in your database using the SQL file in the contrib/uuid-ossp directory, uuid-ossp.sql. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org)

[GENERAL] PL/pgSQL equivalent to PQtransactionStatus?

2008-07-31 Thread Christophe
My apologies if this is in the docs and I missed it, but is there a PL/pgSQL function equivalent for the pglib function PQtransactionStatus (i.e., a way to find out if we're in an open transaction block, and if that transaction is in an error status)? -- Sent via pgsql-general mailing list

Re: [GENERAL] PL/pgSQL equivalent to PQtransactionStatus?

2008-07-31 Thread Christophe
On Jul 31, 2008, at 11:12 AM, Richard Huxton wrote: A pl/pgsql function *always* executes within a transaction. Indeed so. What I'm looking for is a way of detecting if a transaction block has been opened (i.e., we're within a BEGIN). -- Sent via pgsql-general mailing list

Re: [GENERAL] PL/pgSQL equivalent to PQtransactionStatus?

2008-07-31 Thread Christophe
On Jul 31, 2008, at 11:49 AM, Alvaro Herrera wrote: Why does it matter? I'm attempting to clean out a connection that is in an unknown state (along the lines of what pgpool does when reusing an open connection). Of course, I could just fire an ABORT down, but it seems nicer to avoid

Re: [GENERAL] PL/pgSQL equivalent to PQtransactionStatus?

2008-07-31 Thread Christophe
On Jul 31, 2008, at 11:49 AM, Alvaro Herrera wrote: Why does it matter? Ah, I see, deep confusing on my part regarding PL/pgSQL and tranasctions! Ignore question. :) -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription:

Re: [GENERAL] How do I set up automatic backups?

2008-07-29 Thread Christophe
On Jul 29, 2008, at 1:24 PM, Rob Richardson wrote: I was asked how to automate the procedure, and I couldn't answer. The options are manifold! http://www.postgresql.org/docs/8.3/interactive/backup.html -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make

Re: [GENERAL] Cursor

2008-07-29 Thread Christophe
On Jul 29, 2008, at 2:35 PM, Tom Lane wrote: No, he does need an OPEN. Really? I thought that PG didn't use OPEN: The PostgreSQL server does not implement an OPEN statement for cursors; a cursor is considered to be open when it is declared.

Re: [GENERAL] Cursor

2008-07-29 Thread Christophe
On Jul 29, 2008, at 4:51 PM, Klint Gore wrote: It's different in PL/pgSQL. Ah, yes, sorry, didn't catch that it was a PL/pgSQL function. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription:

Re: [GENERAL] Fetch for Update

2008-07-28 Thread Christophe
On Jul 28, 2008, at 9:16 AM, Bob Pawley wrote: I haven't been able to find much information on Fetch for Update. Does 8.3 support this command?? Postgres doesn't have an explicit FETCH FOR UDPATE. You can either create the cursor with SELECT FOR UPDATE, or UPDATE the row in the cursor

Re: [GENERAL] php + postgresql

2008-07-25 Thread Christophe
On Jul 25, 2008, at 11:20 AM, Andrew Sullivan wrote: On Fri, Jul 25, 2008 at 01:41:50PM -0400, Jonathan Bond-Caron wrote: I'd say the Web is just and always was a hack I have to object to this pretty strongly. He has a point, though. If you were starting out to build a user interface

Re: [GENERAL] rollback

2008-07-09 Thread Christophe
On Jul 9, 2008, at 6:38 AM, Adrian Moisey wrote: I would like to be able to mark a point in my postgres database. After that I want to change a few things and rollback to that point. Does postgres support such a thing? Is it possible for me to do this? This seems to be exactly what

Re: [GENERAL] Default UUID in Postgres

2008-07-09 Thread Christophe
On Jul 9, 2008, at 4:32 PM, Swaminathan Saikumar wrote: Hello, I created a Postgres table with a UUID. I want the UUID to be populated by default. PostgreSQL doesn't have built-in functions for generating UUIDs, but there is a module in contrib that will do so:

Re: [GENERAL] To store and retrive image data in postgresql

2008-07-07 Thread Christophe
On Jul 7, 2008, at 12:22 PM, aravind chandu wrote: I need to store an image in postgresql database and after that i need to retrive the image back.Can you please help me how to do this? Assuming you mean an image as in a binary visual image (like a JPEG), the data type you want

[GENERAL] fitler database list

2008-06-09 Thread Christophe Simonis
Is it a way to filter the database list on the tables containt in the database ? Thanks. -- 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] Mediawiki 1.10 and PG 8.3 upgrade

2008-05-30 Thread Christophe
You'll need to get a particular revision of MediaWiki that is PG 8.3 compatible: http://people.planetpostgresql.org/greg/index.php?/archives/123- MediaWiki-is-Postgres-8.3-compatible.html Once that's done, it works fine (at least for me). -- Sent via pgsql-general mailing list

Re: [GENERAL] rounding problems

2008-05-12 Thread Christophe
Yet another option, of course, is to simply not do any calculations in PostgreSQL, and accept the results from Excel as definitive... which seems to be what is desired, anyway. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription:

Re: [GENERAL] Unloading a table consistently

2008-05-04 Thread Christophe
On May 3, 2008, at 9:29 PM, Patrick TJ McPhee wrote: How about something along the lines of BEGIN; ALTER TABLE log RENAME to log_old; CREATE TABLE log(...); COMMIT; BEGIN; LOCK table log_old; COPY log_old TO 'filename-path'; DROP TABLE log_old; COMMIT; I believe this will keep the writers

[GENERAL] Unloading a table consistently

2008-05-03 Thread Christophe
Hi, I will have a log table which, once a day or so, is copied to a file (for movement to a data warehouse), and the log table emptied. For performance, the log table on the production system has no indexes, and is write-only. (The unload process is the only reader.) To unload it, I

Re: [GENERAL] Unloading a table consistently

2008-05-03 Thread Christophe
On May 3, 2008, at 9:56 AM, Tom Lane wrote: This is a great deal less efficient than TRUNCATE, but it's secure for concurrent insertions, which TRUNCATE is definitely not. Exactly my question; thank you! -- Xof -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make

Re: [GENERAL] Backup setup

2008-04-23 Thread Christophe
For a database that big, you might consider using the WAL archiving strategy and shipping the WAL files offsite: http://www.postgresql.org/docs/8.3/interactive/continuous- archiving.html On Apr 23, 2008, at 8:14 AM, Gabor Siklos wrote: I need to back up our database off-site for disaster

Re: [GENERAL] How to modify ENUM datatypes?

2008-04-22 Thread Christophe
On Apr 22, 2008, at 1:45 PM, D. Dante Lorenso wrote: So, the advice here is don't use ENUM? I think it's more Don't use ENUM for a type that you are planning to extend. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription:

<    1   2   3   >