Re: [GENERAL] limit-offset different result sets with same query

2009-05-08 Thread David Fetter
On Fri, May 08, 2009 at 06:40:33PM -0300, Emanuel Calvo Franco wrote: > 2009/5/8 David Fetter : > > On Fri, May 08, 2009 at 06:10:18PM -0300, Emanuel Calvo Franco wrote: > >> Hi all. > >> > >> I'll make this faster. > >> > >> I hace this t

Re: [GENERAL] limit-offset different result sets with same query

2009-05-08 Thread David Fetter
e that actually specifies the order well enough :) Cheers, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter Skype: davidfetter XMPP: david.fet...@gmail.com Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/d

Re: [GENERAL] migrating from MSSQL

2009-05-08 Thread David Fetter
ree software project like PostgreSQL is that you can choose the support option that best fits your needs rather than being tied to one company whose support options may not. Cheers, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter Skype: davidfette

Re: [GENERAL] prepared statements and DBD::Pg

2009-05-08 Thread David Fetter
On Fri, May 08, 2009 at 09:44:56AM +0100, Tim Bunce wrote: > On Thu, May 07, 2009 at 06:08:12PM -0700, David Fetter wrote: > > On Fri, May 08, 2009 at 01:02:04AM +0100, Tim Bunce wrote: > > > On Thu, May 07, 2009 at 06:50:11AM -0700, David Fetter wrote: > > > > On T

Re: [GENERAL] prepared statements and DBD::Pg

2009-05-07 Thread David Fetter
On Fri, May 08, 2009 at 01:02:04AM +0100, Tim Bunce wrote: > On Thu, May 07, 2009 at 06:50:11AM -0700, David Fetter wrote: > > On Thu, May 07, 2009 at 02:31:08PM +0100, Tim Bunce wrote: > > > On Thu, May 07, 2009 at 04:54:06AM +1200, Andrej wrote: > > > > >

Re: [GENERAL] prepared statements and DBD::Pg

2009-05-07 Thread David Fetter
e may no longer > > work. > > Sure seems like a bug, or at best a misfeature, that DBD::Pg doesn't > simply fallback to client-side prepare when a server-side prepare > can't be performed. I believe DBD::mysql does that. It's a safety feature. :) Cheers, David. -

Re: [GENERAL] Yahoo Everest MPP - open source release?

2009-05-06 Thread David Fetter
you want public help, you have come to the right place on this mailing list. If you want help on other terms--say, non-disclosure agreement--there are plenty of companies including mine, <http://www.pgexperts.com/>, that will be happy to work with you. Cheers, David. -- David Fetter http

Re: [GENERAL] PGSQL-to-MYSQL Migration: Error in a 'simple' inner join query

2009-05-04 Thread David Fetter
BY orders.id statement enaught? > Why the costumers.name is needed? It's because PostgreSQL doesn't just assume it knows better than you do and take a guess at what you might have meant. :) > Sorry, i know that this maybe is a basically problem, but i come > from mysql..

Re: [GENERAL] triggers and execute...

2009-04-30 Thread David Fetter
'''||new.logged_in||''', > '||new.uid||', > '''||new.http_user_agent||''', > '''||new.server_addr||''', > ''&

Re: [GENERAL] PostgreSQL versus MySQL for GPS Data

2009-04-21 Thread David Fetter
On Tue, Apr 21, 2009 at 08:15:00PM +0100, Peter Childs wrote: > Hmm Interestingly OSM have just switched from MySQL to PostgreSQL. Can we get somebody from OSM to talk about this on the record? Cheers, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 AIM: dfetter666 Ya

Re: [DOCS] [GENERAL] Postgresql 8.3X supports Arrays of Composite Types?

2009-04-20 Thread David Fetter
're proposing, how do you find all the people who have a common prefix? Answer: Normalize. If you need that answer quickly, you're looking at down time and DDL changes. The questions you ask about the data are impossible to know in advance, so normalized data helps you deal with tha

Re: [GENERAL] Postgresql 8.3X supports Arrays of Composite Types?

2009-04-19 Thread David Fetter
Y KEY(name, cod, num) ); Cheers, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter Skype: davidfetter XMPP: david.fet...@gmail.com Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate -- Sent via pg

Re: [GENERAL] Migration/Upgrade Problems

2009-04-17 Thread David Fetter
ib/adddepend on each of the databases in it * Use 8.3.7's pg_dumpall to dump the now-fixed 7.4.25 database * Load that into 8.3.7, and, most importantly, * Build in and enforce upgrades as part of your maintenance cycle. You never want to have to do *anything* like this again. Cheers, David. --

Re: [GENERAL] need information

2009-04-16 Thread David Fetter
my eyes. That would make it *proprietary*, as no FLOSS license allows such a restriction. > This is getting off topic, sorry. Vaguely. Has that stopped us before? ;) Cheers, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter Skype: davidfet

Re: [GENERAL] [GENEAL] dynamically changing table

2009-03-30 Thread David Fetter
h columns from a lot of different > places? > Will deleting a column result in a lot of empty space that will anoy > me later on? > > Are there any other clever solutions of this problem? > > -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.org) > To m

Re: [GENERAL] Enumerating a row set

2009-03-26 Thread David Fetter
on concrete tables. > > Thanks in advance, > George > > [1] http://docs.python.org/library/functions.html#enumerate > > -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql

Re: [GENERAL] Parallel Query Processing

2009-03-26 Thread David Fetter
Is this snapshot cloning? If so, thanks very much for publishing it! :) If not, I'm really curious as to what it is :) On the subject of snapshot cloning, I can see, at least in broad brush strokes, how this would work for read queries, but I'm curious how (or if) it could work for writes

Re: [GENERAL] text column constraint, newbie question

2009-03-23 Thread David Fetter
attacks? Yes. Much more. Cheers, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter Skype: davidfetter XMPP: david.fet...@gmail.com Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate -- Sent via

Re: [GENERAL] Performance of subselects

2009-03-09 Thread David Fetter
this idea completely wrong? Yes. Fortunately, knowing this, you can adjust your expectations and your development plan. :) Cheers, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter Skype: davidfetter XMPP: david.fet...@gmail.com Remember

Re: [GENERAL] problem with single quote in postgres 8.3.5

2009-03-07 Thread David Fetter
s kind of line, you are inviting an SQL injection as illustrated below: http://xkcd.com/327/ Instead, use pg_prepare() and pg_execute() for this kind of thing. Cheers, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter Skype: davidfetter XMPP: d

Re: [GENERAL] Function that returns Boolean

2009-02-23 Thread David Fetter
g list (pgsql-general@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-general -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter Skype: davidfetter XMPP: david.fet...@gmail.com Remember to vote! Consid

Re: [GENERAL] where to divide application and database

2009-02-20 Thread David Fetter
On Thu, Feb 19, 2009 at 11:43:19PM +, Sam Mason wrote: > I was just reading over a reply from David Fetter from a couple of > days ago; the thread is archived[1] but this question doesn't really > relate to it much. The a question about how to arrange tables and > David m

Re: [GENERAL] Good Delimiter for copy command

2009-02-17 Thread David Fetter
opy test from '2.txt' delimiter ●" > ERROR: COPY delimiter must be a single character > \copy: ERROR: COPY delimiter must be a single character Cheers, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter Skype: davidfetter

Re: [GENERAL] hi all

2009-02-17 Thread David Fetter
alid; dates go from 1BC to 1AD without a zero in the middle. > Shouldn't you just remove the NOT NULL check or maybe '-infinity' would > be better. Either require a created_date and make the default sane--CURRENT_TIMESTAMP, e.g.--or don't require one, but making a nons

Re: [GENERAL] Pet Peeves?

2009-02-03 Thread David Fetter
On Tue, Feb 03, 2009 at 05:48:51PM +, Greg Stark wrote: > On Thu, Jan 29, 2009 at 5:43 PM, David Fetter wrote: > >> > >> > * CTEs not yet integrated into the adjacency lists in pg_catalog, > >> > etc. > >> > >> I'm not sure what you

Re: [GENERAL] Is dropping pg_ts_* harmful?

2009-02-02 Thread David Fetter
f you have a relatively recent 8.2. That should scrub everything :) Cheers, David. > Thanks folks -- > > -- Eric Brown / Director of IT / www.mediweightlossclinics.com -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter Skype: davidfetter

Re: [GENERAL] Pet Peeves?

2009-01-29 Thread David Fetter
On Thu, Jan 29, 2009 at 05:18:19PM +, Gregory Stark wrote: > David Fetter writes: > > > * No built-in ways to get the information psql gets. "See what > > psql is doing" isn't an option when somebody doesn't have psql on > > hand. > > Uhm

Re: [GENERAL] Pet Peeves?

2009-01-29 Thread David Fetter
On Thu, Jan 29, 2009 at 05:18:17PM +, Dave Page wrote: > On Thu, Jan 29, 2009 at 4:57 PM, David Fetter wrote: > > > * Neither of them let you set up Slony (or any other replication > > system) to start with. ^ > pgAdmin does (well, barring instal

Re: [GENERAL] Pet Peeves?

2009-01-29 Thread David Fetter
ey catch ire: * Neither pgAdmin nor phpPgAdmin includes any facilities for extracting ERDs. * Neither of them let you set up Slony (or any other replication system) to start with. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter Skype: davidfet

Re: [GENERAL] What is the best plan to upgrade PostgreSQL from an ancient version?

2009-01-26 Thread David Fetter
gt;> to reinforce the advice to test your applications before you do the >> live migration. You're almost certain to hit some compatibility >> issues. > > +1 +1 from here, too. Cheers, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 AIM: dfette

Re: [GENERAL] Database schema & data synchronizer software for PostgreSQL?

2009-01-21 Thread David Fetter
On Wed, Jan 21, 2009 at 05:18:57AM +0100, Együd Csaba wrote: > >From: David Fetter [mailto:da...@fetter.org] > >On Tue, Jan 20, 2009 at 03:03:33PM +0100, Csaba Együd wrote: > >> Hi, > >> I'd like to ask your suggestions about a reliable admin software > >&

Re: [GENERAL] Database schema & data synchronizer software for PostgreSQL?

2009-01-20 Thread David Fetter
On Tue, Jan 20, 2009 at 09:51:25PM -0500, Robert Treat wrote: > On Tuesday 20 January 2009 10:44:06 David Fetter wrote: > > On Tue, Jan 20, 2009 at 03:03:33PM +0100, Csaba Együd wrote: > > > Hi, > > > I'd like to ask your suggestions about a reliable admin softwar

Re: [GENERAL] Database schema & data synchronizer software for PostgreSQL?

2009-01-20 Thread David Fetter
nd other features. Yes, you should definitely do that and store the scripts to do it in your source code management system along with all the rest of the deploy and upgrade scripts. They can't be generated automatically either. Cheers, David. -- David Fetter http://fetter.org/ Phone: +1 4

Re: [HACKERS] [GENERAL] Question regarding new windowing functions in 8.4devel

2009-01-16 Thread David Fetter
On Fri, Jan 16, 2009 at 12:41:59PM -0500, Tom Lane wrote: > David Fetter writes: > > We don't appear to be able to use the actual thing in the target list > > either. > > Would you translate that into English? Or at least an example without > trivial syntax errors?

Re: [HACKERS] [GENERAL] Question regarding new windowing functions in 8.4devel

2009-01-16 Thread David Fetter
On Fri, Jan 16, 2009 at 12:34:34PM -0500, Tom Lane wrote: > David Fetter writes: > > I tried this: > > > SELECT > > typ, > > ts, > > rank() over w AS foo_rank > > FROM > > foo > > WINDOW w AS (partition b

Re: [HACKERS] Re: [GENERAL] Question regarding new windowing functions in 8.4devel

2009-01-16 Thread David Fetter
On Fri, Jan 16, 2009 at 12:23:16PM -0500, Jaime Casanova wrote: > On Fri, Jan 16, 2009 at 12:07 PM, David Fetter wrote: > >> > >> Now i want only 3 records for every typ: > >> > >> test=# select typ, ts, rank() over (partition by typ order by ts desc ) &g

Re: [GENERAL] Question regarding new windowing functions in 8.4devel

2009-01-16 Thread David Fetter
E" LINE 8: WHERE ^ Possibly the above is not a bug, but I'm pretty sure this is: SELECT typ, ts, rank() over w AS foo_rank FROM foo WINDOW w AS (partition by typ order by ts desc) WHERE typ < 4; ERROR: syntax error at or near "WHERE&qu

Re: [GENERAL] RCA for MemoryContextAlloc: invalid request size(Known Issue)

2009-01-07 Thread David Fetter
luster failed to upgrade to a supported version. Don't Do That Again :) Cheers, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter Skype: davidfetter XMPP: david.fet...@gmail.com Remember to vote! Consider donating to Postgres: http:/

Re: [GENERAL] WITH AS vs subselect was: count (DISTINCT expression [ , ... ] ) and documentation

2008-12-26 Thread David Fetter
On Fri, Dec 26, 2008 at 07:13:48PM -0500, Tom Lane wrote: > Ivan Sergio Borgonovo writes: > >>> David Fetter wrote: > >>>> In 8.4, you'll be able to do: > > >>>> WITH d AS ( > >>>> SELECT DISTINCT c1, c2 FROM table1 > &g

Re: [GENERAL] count (DISTINCT expression [ , ... ] ) and documentation

2008-12-26 Thread David Fetter
On Fri, Dec 26, 2008 at 08:03:30PM +0100, Ivan Sergio Borgonovo wrote: > On Fri, 26 Dec 2008 10:43:25 -0800 > David Fetter wrote: > > > On Fri, Dec 26, 2008 at 03:34:33PM +0100, Ivan Sergio Borgonovo > > wrote: > > > I noticed that starting from 8.2 t

Re: [GENERAL] count (DISTINCT expression [ , ... ] ) and documentation

2008-12-26 Thread David Fetter
) from table1; > > -- > Ivan Sergio Borgonovo > http://www.webthatworks.it > > > -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-general -- David Fetter

Re: [GENERAL] Backup Policy & Disk Space Issues

2008-12-22 Thread David Fetter
recommend any other hardware/software solutions? > > > Regards. > > -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-general -- David Fetter http://fetter.org/ Phon

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

2008-12-21 Thread David Fetter
than PG's? You've been talking about your super-secret test which you allege, quite implausibly, I might add, to have Oracle (8i, even!) blowing PostgreSQL's doors off for weeks now. Put up, or shut up. Regards, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 AIM:

Re: [GENERAL] Need help to dynamically access to colomns in function!

2008-12-17 Thread David Fetter
p until you fix your design, and dynamic querying will only lead you further down this rat-hole. The answer to, "how do I shoot myself in the foot?" is "Don't." Cheers, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter

Re: [GENERAL] Multi-table CHECK constraint

2008-12-10 Thread David Fetter
lk to people who have done bookkeeping applications for PostgreSQL, or possibly even buy one of the proprietary PostgreSQL-based systems for it, as this stuff can be fiendishly tricky to get right. Cheers, David. -- David Fetter <[EMAIL PROTECTED]> http://fetter.org/ Phone: +1 415 235 3778

Re: [GENERAL] SELECT DISTINCT ... ORDER BY problem

2008-12-08 Thread David Fetter
gt; > first/last 'bar' for each distinct 'foo'? > > > > 2. Can I somehow say "Order the results using the value of 'bar' you > > return, regardless of where it came from"? > > You can nest queries: > > SELECT foo,bar > FROM

Re: [GENERAL] cumulative count

2008-12-04 Thread David Fetter
nd *month*, with an additional column > that is a *running total of the count*, as in: In 8.4, you'll have direct SQL support for this using OLAP a.k.a. windowing functions, so don't build too many of these dodgy hacks into your application. Cheers, David. -- David Fetter &

Re: [GENERAL] epqa; postgres performance optimizer support tool; opensource.

2008-11-04 Thread David Fetter
n can be got from http://epqa.sourceforge.net/ > > > Expecting suggestions, feedbacks, clarfications @ [EMAIL PROTECTED] > > Note: This is to propagate the open source which can help for postgres > users. > This is not a spam, or advertisement. > > Regards > SathiyaMoorthy

Re: [GENERAL] excluding tables from VACUUM ANALYZE

2008-10-30 Thread David Fetter
uot; (or "vacuumdb -z") on the > database, how can Why are you doing this in the first place? Autovacuum works just great for modern PostgreSQL versions, and if you're not using one of those, you should be planning your migration, not propping up the old one :) Cheers, David. -

Re: [GENERAL] Schema Upgrade Howto

2008-10-30 Thread David Fetter
gt; > kdiff3 prod.schema devel.schema > > You need to create an upgrade script by looking at the diff. No. Really, no. You need to create the upgrade script by creating upgrade scripts, not by reverse engineering. Cheers, David. -- David Fetter <[EMAIL PROTECTED]> http://fetter.

Re: [GENERAL] Schema Upgrade Howto

2008-10-30 Thread David Fetter
l ways will be possible. But what do you suggest? See above :) Cheers, David. -- David Fetter <[EMAIL PROTECTED]> http://fetter.org/ Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter Skype: davidfetter XMPP: [EMAIL PROTECTED] Remember to vote! Consider donating to Postgres

Re: [GENERAL] Execute Shell script after insert

2008-10-27 Thread David Fetter
kdir $1 This will scale better if you batch it, as in: INSERT INTO clients (name, status) VALUES ('Donda', 'inserted_no_directory'), ('Eonda', 'inserted_no_directory'), ('Fonda', 'inserted_no_directory'), ... Once y

Re: [GENERAL] syncing with a MySQL DB

2008-10-26 Thread David Fetter
s. > > Anybody knows how improve this? > > If I have to push the predicate down, I'll generally write a > set-returning function which takes some of the predicate, limit, and > offset info to build a dynamic sql query against the remote database > using dblink. That's o

Re: [GENERAL] Storing questionnaire data

2008-10-24 Thread David Fetter
shrugging its shoulders, > but I haven't actually tested that solution with many massive > questionnaires for its query performance. > > I pretty much have my answer. Thanks for your input guys. Happy to help :) Cheers, David. -- David Fetter <[EMAIL PROTECTED]> http://fe

Re: [GENERAL] Storing questionnaire data

2008-10-23 Thread David Fetter
be 0, > which seems a bit kludgey to me. Plus because an answer ID can't be > required due to free form text answers, I can't enforce a foreign key. > > Is there a nice elegant solution anyone knows of? > > Thanks > > Thom > > -- > Sent via pgsql-

Re: [GENERAL] How to force PostgreSQL to use multiple cores within one connection?

2008-10-01 Thread David Fetter
most certainly is :) Cheers, David. > -- > Sergey > > P.S. My application and DB can be placed on diferent hosts. -- David Fetter <[EMAIL PROTECTED]> http://fetter.org/ Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter Skype: davidfetter XMPP: [EMAIL PROTECTED] Rememb

Re: [GENERAL] How to force PostgreSQL to use multiple cores within one connection?

2008-10-01 Thread David Fetter
If not, start there :) Cheers, David. -- David Fetter <[EMAIL PROTECTED]> http://fetter.org/ Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter Skype: davidfetter XMPP: [EMAIL PROTECTED] Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donat

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

2008-09-25 Thread David Fetter
they have no binary to examine. > FWIW, I think most people who want to hide code aren't concerned about > IP, they're concerned about clients seeing embarrassingly bad/sloppy > code. But there *are* some very real and legitimate needs for this, > though it's a smal

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

2008-09-24 Thread David Fetter
inputs to it is one of those "known-impossible" problems like the halting problem. Cheers, David. -- David Fetter <[EMAIL PROTECTED]> http://fetter.org/ Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter Skype: davidfetter XMPP: [EMAIL PROTECTED] Remember

Re: [GENERAL] pg_catalog forward compatibility

2008-09-02 Thread David Fetter
u warn people that any DDL they do that's not one of your scripts will break it. Explicitly disclaim any responsibility for such meddling. :) Cheers, David. -- David Fetter <[EMAIL PROTECTED]> http://fetter.org/ Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter Skype: davidf

Re: [GENERAL] Oracle and Postgresql

2008-09-01 Thread David Fetter
On Mon, Sep 01, 2008 at 04:39:09PM +0200, Thomas Kellerer wrote: > David Fetter, 01.09.2008 16:08: >>> because we are making extensive usage of Oracle's windowing >>> functions >> >> http://umitanuki.net/pgsql/wfv04/design.html > > I knew there was wor

Re: [GENERAL] Oracle and Postgresql

2008-09-01 Thread David Fetter
sign.html > (and ability to easily deal with hierarchical data using CONNECT BY). It's even more fun with CTEs. <http://wiki.postgresql.org/wiki/CTEReadme> > The lack of windowing functions is a bit frustrating as I'm > otherwise a big Postgres fan! Those will both b

Re: [GENERAL] Oracle and Postgresql

2008-08-31 Thread David Fetter
blamed Oracle, they know the responsibility is no longer on their shoulders. Cheers, David. -- David Fetter <[EMAIL PROTECTED]> http://fetter.org/ Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter Skype: davidfetter XMPP: [EMAIL PROTECTED] Remember to vote! Consider donating to Postgr

Re: [GENERAL] Oracle and Postgresql

2008-08-31 Thread David Fetter
vantages in negotiations. Cheers, David. -- David Fetter <[EMAIL PROTECTED]> http://fetter.org/ Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter Skype: davidfetter XMPP: [EMAIL PROTECTED] Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate

Re: [GENERAL] Ranking?

2008-08-22 Thread David Fetter
will get into 8.4, so don't put too, too much effort into this. :) Cheers, David. -- David Fetter <[EMAIL PROTECTED]> http://fetter.org/ Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter Skype: davidfetter XMPP: [EMAIL PROTECTED] Remember to vote! Consider donati

Re: [GENERAL] on delete cascade slowing down delete

2008-08-21 Thread David Fetter
to > 100 records) while the main table contain 600-800K records. > > the > explain delete p; > doesn't give any clue. > > Any hint to track down the problem? BEGIN; EXPLAIN ANALYZE DELETE ... ROLLBACK; Lack of indexes on the referencing tables might be an issue, as mig

Re: [GENERAL] different results based solely on existence of index (no, seriously)

2008-08-12 Thread David Fetter
g isn't a bug unless you can reproduce it on the latest minor version, in this case 8.3.3, of the major version, in this case 8.3, that the bug appears in. Cheers, David. -- David Fetter <[EMAIL PROTECTED]> http://fetter.org/ Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter Skype:

Re: [GENERAL] Advice on implementing counters in postgreSQL

2008-08-02 Thread David Fetter
between > them, and they must restart from 1 every year. Here's a backward-compatible way to do this: http://www.varlena.com/GeneralBits/130.php Cheers, David. -- David Fetter <[EMAIL PROTECTED]> http://fetter.org/ Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter Skype: d

Re: [GENERAL] array_accum() and quoted content

2008-07-28 Thread David Fetter
mpany_name You could do something like array_to_string( array_accum(p.publisher_name), '|' -- or any other string guaranteed not to appear in the publisher_name ) Cheers, David. -- David Fetter <[EMAIL PROTECTED]> http://fetter.org/ Phone: +1 415 235 3778 AIM: dfetter

Re: [GENERAL] Referential integrity vulnerability in 8.3.3

2008-07-15 Thread David Fetter
gt; foreign-key code" mean DDL? If it does how could I do this? The code you posted is a clear case of doing things wrong deliberately. In order to prevent this error, you would need to rewrite large parts of Postgres's code which checks referential integrity, and there would still be things t

Re: [GENERAL] Target lists can have at most 1664 entries?

2008-07-05 Thread David Fetter
s broken this way. Fix the application, and if you can't, find another job where they're not being idiots. There are plenty of Postgres-related jobs out there. Cheers, David. -- David Fetter <[EMAIL PROTECTED]> http://fetter.org/ Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!:

Re: [GENERAL] pg_locks "at-a-glance" view

2008-06-19 Thread David Fetter
oned lock.c, but I don't see anything visible to SQL. Cheers, David. -- David Fetter <[EMAIL PROTECTED]> http://fetter.org/ Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter Skype: davidfetter XMPP: [EMAIL PROTECTED] Remember to vote! Consider donating to Postgres: ht

Re: [GENERAL] Short-circuiting FK check for a newly-added field

2008-05-21 Thread David Fetter
he > check is pointless because the newly added field is nothing but NULLs. > > This is version 8.1.mumble. Have you tried making the FK constraint INITIALLY DEFERRED? Cheers, David. -- David Fetter <[EMAIL PROTECTED]> http://fetter.org/ Phone: +1 415 235 3778 AIM: dfetter666 Yahoo

Re: [GENERAL] Making sure \timing is on

2008-05-13 Thread David Fetter
On Tue, May 13, 2008 at 01:53:33PM -0700, David Fetter wrote: > On Tue, May 13, 2008 at 11:36:57AM -0400, Tom Lane wrote: > > David Fetter <[EMAIL PROTECTED]> writes: > > >>> Surely this is merely proof of concept and not a complete patch. > > >> >

Re: [GENERAL] Making sure \timing is on

2008-05-13 Thread David Fetter
On Tue, May 13, 2008 at 11:36:57AM -0400, Tom Lane wrote: > David Fetter <[EMAIL PROTECTED]> writes: > >>> Surely this is merely proof of concept and not a complete patch. > >> > >> Next patch attached :) > > Uh, my point was that the agreement

Re: [GENERAL] Making sure \timing is on

2008-05-13 Thread David Fetter
On Tue, May 13, 2008 at 08:14:51AM -0700, David Fetter wrote: > On Tue, May 13, 2008 at 10:47:40AM -0400, Alvaro Herrera wrote: > > Tom Lane escribió: > > > Alvaro Herrera <[EMAIL PROTECTED]> writes: > > > > David Fetter escribi?: > > > >> Thanks

Re: [GENERAL] Making sure \timing is on

2008-05-13 Thread David Fetter
On Tue, May 13, 2008 at 10:47:40AM -0400, Alvaro Herrera wrote: > Tom Lane escribió: > > Alvaro Herrera <[EMAIL PROTECTED]> writes: > > > David Fetter escribi?: > > >> Thanks for the heads-up :) > > >> > > >> Second patch attached, t

Re: [GENERAL] Making sure \timing is on

2008-05-12 Thread David Fetter
On Mon, May 12, 2008 at 05:30:48PM -0400, Bruce Momjian wrote: > David Fetter wrote: > > On Sun, May 11, 2008 at 11:48:29PM -0400, Tom Lane wrote: > > > "Scott Marlowe" <[EMAIL PROTECTED]> writes: > > > > Is it reasonable behavior to have \timing alo

Re: [GENERAL] Making sure \timing is on

2008-05-12 Thread David Fetter
re this isn't a problem and having to update them. > > The command without an argument should certainly keep the old toggle > behavior, for backwards compatibility. Attached patch does some of the right thing, but doesn't yet handle error cases. How liberal should we be about c

Re: [GENERAL] operator varchar = integer

2008-05-05 Thread David Fetter
On Mon, May 05, 2008 at 05:26:40PM +0200, Daniel Schuchardt wrote: > David Fetter schrieb: >> That technical debt is a risk to your whole project, and you need >> to dedicate resources to paying it down. >> >> <http://en.wikipedia.org/wiki/Technical_debt>

Re: [GENERAL] operator varchar = integer

2008-05-05 Thread David Fetter
he long run. Cheers, David. -- David Fetter <[EMAIL PROTECTED]> http://fetter.org/ Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter Skype: davidfetter XMPP: [EMAIL PROTECTED] Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate -- Sent via

Re: [GENERAL] I need to ecrypt one column to an output file

2008-04-19 Thread David Fetter
t; There are lots of developer related links here, and info to "use the > /contrib pgcrypto", but I'm not a PG developer and I failed to find any > info on HOW TO USE that library function... > > Thanks all, > > Ralph Smith > [EMAIL PROTECTED] > ===

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

2008-03-26 Thread David Fetter
pg_initdb b) Hrm. I'm seeing a pattern here ;) > c) pg_init > d) pg_ctl -d init (replace initdb with pg_ctl new functionality) > e) What is initdb? My start/stop script does it automatically. > > 4) How do you perform VACUUM? > - > > a) vacuum

Re: [GENERAL] array_cat without duplicity

2008-03-19 Thread David Fetter
array_lower($1,1), array_upper($1,1) ) AS i ); $$; SELECT array_undup(array_cat(ARRAY[1,2], ARRAY[2,3])); array_undup ----- {1,2,3} (1 row) Cheers, David. -- David Fetter <[EMAIL PROTECTED]> http://fetter.org/ Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter S

Re: [GENERAL] ER Diagram design tools (Linux)

2008-03-09 Thread David Fetter
On Sat, Mar 08, 2008 at 10:49:02AM -0800, Colin Fox wrote: > David Fetter wrote: > > On Fri, Mar 07, 2008 at 01:22:49PM -0800, Colin Fox wrote: > > > >> I've created a pg_foundry project for this. > >> > >> Assuming the project gets approved, I&#x

Re: [GENERAL] ER Diagram design tools (Linux)

2008-03-08 Thread David Fetter
> Regards > > cf > > > > > > -- > > Sent via pgsql-general mailing list (pgsql-general@postgresql.org > > <mailto:pgsql-general@postgresql.org>) > > To make changes to your subscription: > > http://www.postgresql.o

Re: [GENERAL] ER Diagram design tools (Linux)

2008-03-07 Thread David Fetter
gres-to-xml extractor that someone wrote (I > don't know who - their name is not in the file) and then I convert > the xml to graphviz. Sounds good :) Cheers, David. -- David Fetter <[EMAIL PROTECTED]> http://fetter.org/ Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter Skype:

Re: [GENERAL] [DOCS] Documenting a DB schema

2008-03-05 Thread David Fetter
column a...'); > > (see http://dev.mysql.com/doc/refman/5.0/en/create-table.html) > > However, Postgres doesn't support the "comment" keyword. Actually, it does :) > Is there an alternative? Cheers, David. -- David Fetter <[EMAIL PROTECTED]> http:/

Re: [GENERAL] dbi_link and dbi:ODBC

2008-02-28 Thread David Fetter
00 > > P.S. I translated the above messages from german, so it's not exactly the > same message than the english SQL Server. > > Thanks for your help. :-) > > Regards. > > ---(end of broadcast)--- > TIP 5: don't forget

Re: [GENERAL] dynamic crosstab

2008-02-19 Thread David Fetter
ecently JSON. > It would be really neat if you didn't have to specify the return > type in the query that invoked the crosstab. It would be handy :) Cheers, David. -- David Fetter <[EMAIL PROTECTED]> http://fetter.org/ Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter Skype

Re: [GENERAL] Initdb failed in PostgreSQL 7.3.21

2008-02-18 Thread David Fetter
On Mon, Feb 18, 2008 at 05:45:05PM +0530, Kakoli Sen wrote: > Hi, > I install PostgreSQL 7.3.21 successfully with sudo and could start > the postmaster as sudo. The 7.3 series is no longer supported. Use 8.3 instead. Cheers, David. -- David Fetter <[EMAIL PROTECTED]> http://fe

Re: [GENERAL] [OT] "advanced" database design (long)

2008-02-04 Thread David Fetter
ipstick on the EAV pig does not help. Cheers, David. -- David Fetter <[EMAIL PROTECTED]> http://fetter.org/ Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter Skype: davidfetter XMPP: [EMAIL PROTECTED] Remember to vote! Consider donating to Postgres: http://www.postgresql.org/

Re: R: [GENERAL] how to add array of objects to a record

2008-02-03 Thread David Fetter
lowing the discussion concerning EAV. EAV is just a mistake. Cheers, David. -- David Fetter <[EMAIL PROTECTED]> http://fetter.org/ Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter Skype: davidfetter XMPP: [EMAIL PROTECTED] Remember to vote! Consider dona

Re: [GENERAL] [OT] "advanced" database design (long)

2008-02-02 Thread David Fetter
rish. > weigh higher than you gain (in flexibility) in relational databases. > But it sure has its uses cases. Why, yes. I encourage all my competitors to use it. ;) Cheers, David. -- David Fetter <[EMAIL PROTECTED]> http://fetter.org/ Phone: +1 415 235 3778 AIM: dfetter666 Yah

Re: [GENERAL] OT - pg perl DBI question

2008-01-29 Thread David Fetter
ry* long time. Cheers, David. -- David Fetter <[EMAIL PROTECTED]> http://fetter.org/ Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter Skype: davidfetter XMPP: [EMAIL PROTECTED] Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate

Re: [GENERAL] Replication Using Triggers

2008-01-19 Thread David Fetter
t in MySQL is seriously >> broken. > > I am not arguing that it isn't! :-) I am merely trying to implement > something at least as good (or rather, no more broken) for > PostgreSQL with a minimum of effort. In that case, use one of the existing solutions. They're all w

Re: [GENERAL] Online Oracle to Postgresql data migration

2008-01-15 Thread David Fetter
On Mon, Jan 14, 2008 at 11:42:50AM -0500, Josh Harrison wrote: > Thanks > > On Jan 12, 2008 9:19 AM, David Fetter <[EMAIL PROTECTED]> wrote: > > > On Fri, Jan 11, 2008 at 01:02:01PM -0500, Josh Harrison wrote: > > > Hi > > > We have an Oracle producti

Re: [GENERAL] many to one of many modeling question

2008-01-11 Thread David Fetter
;foo_4' WHEN foo_5_id NOT NULL THEN 'foo_5' END AS "which_foo", COALESCE( foo_1_id, foo_2_id, foo_3_id, foo_4_id, foo_5_id ) AS "id" FROM refs_all_foo; You can then make this VIEW writeable by the us

Re: [GENERAL] XML and Routing

2008-01-08 Thread David Fetter
s is probably to port PGRouting to 8.3 and then standardize on 8.3 as a minimum version. Cheers, David. -- David Fetter <[EMAIL PROTECTED]> http://fetter.org/ Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter Skype: davidfetter XMPP: [EMAIL PROTECTED] Remember to v

Re: [GENERAL] comparing rows

2007-12-11 Thread David Fetter
as. The easiest way to get the associated data is to join on the > original data table where ts1=ts or ts2=ts. > > > -Reece > > -- > Reece Hart, http://harts.net/reece/, GPG:0x25EC91A0 -- David Fetter <[EMAIL PROTECTED]> http://fetter.org/ Phone: +1 415

<    1   2   3   4   5   6   >