Re: [GENERAL] Anonymous stored procedures

2006-08-29 Thread David Fetter
On Tue, Aug 29, 2006 at 11:02:12AM -0500, Ron Johnson wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, Does PostgreSQL support them? Not yet. Cheers, D -- David Fetter [EMAIL PROTECTED] http://fetter.org/ phone: +1 415 235 3778AIM: dfetter666

Re: [GENERAL] counting days

2006-08-29 Thread David Fetter
*/ ) RETURNS SETOF date LANGUAGE sql AS $$ SELECT $1 + s.i FROM generate_series( 0, $2 - $1 ) AS s(i) WHERE extract( DOW FROM $1 + s.i ) NOT IN ( 0, /* Sunday */ 6 /* Saturday */ ); $$; -- David Fetter [EMAIL PROTECTED] http://fetter.org

Re: [GENERAL] [PATCHES] New variable server_version_num

2006-08-27 Thread David Fetter
On Sat, Jul 29, 2006 at 09:14:16PM -0400, Greg Sabino Mullane wrote: Today on IRC David Fetter and some others were discussing version numbers and we realized that although libpq now provides the version of Postgres as a number, this is still a wheel that is being reinvented by apps many times

[GENERAL] Jasper Reports

2006-08-11 Thread David Fetter
Folks, I'm looking for user experiences with Jasper Reports with PostgreSQL so I can give $client the low-down on this system, especially in comparison to Business Objects. Please let me know if you're using it or have assessed it in some systematic way. Cheers, D -- David Fetter [EMAIL

[GENERAL] SELinux + CREATE TABLESPACE = ?

2006-08-02 Thread David Fetter
this is a SELinux problem. How do I set the policy to allow for this, or if that's not possible, how do I disable SELinux? Thanks in advance :) Cheers, D -- David Fetter [EMAIL PROTECTED] http://fetter.org/ phone: +1 415 235 3778AIM: dfetter666 Skype: davidfetter

Re: [GENERAL] SELinux + CREATE TABLESPACE = ?

2006-08-02 Thread David Fetter
On Wed, Aug 02, 2006 at 04:47:36PM -0700, David Fetter wrote: Folks, This may have come up before, but I didn't see a specific answer in the archives. When I try to do: CREATE TABLESPACE foo LOCATION '/path/to/foo/which/is/not/under/$PGDATA'; I get: ERROR: could not set

Re: [GENERAL] getting function argument names from psql?

2006-07-13 Thread David Fetter
with their types. Shall I dig up that code this weekend? Cheers, D -- David Fetter [EMAIL PROTECTED] http://fetter.org/ phone: +1 415 235 3778AIM: dfetter666 Skype: davidfetter Remember to vote! ---(end of broadcast

Re: [GENERAL] getting function argument names from psql?

2006-07-13 Thread David Fetter
On Thu, Jul 13, 2006 at 09:22:56AM -0400, Merlin Moncure wrote: On 7/13/06, David Fetter [EMAIL PROTECTED] wrote: On Wed, Jul 12, 2006 at 11:37:04PM -0400, Tom Lane wrote: Back when, I submitted a psql patch to get the input names along with their types. Shall I dig up that code this weekend

Re: [GENERAL] getting function argument names from psql?

2006-07-13 Thread David Fetter
On Thu, Jul 13, 2006 at 03:39:34PM +0200, Peter Eisentraut wrote: Am Donnerstag, 13. Juli 2006 15:16 schrieb David Fetter: Back when, I submitted a psql patch to get the input names along with their types. Shall I dig up that code this weekend? Seems reasonable, as long as it doesn't make

Re: [GENERAL] Timestamp vs timestamptz

2006-07-13 Thread David Fetter
, Not this week, but who knows about next week? shall i use timestamptz anyway? Yes. Timestamptz is the one. :) Cheers, D -- David Fetter [EMAIL PROTECTED] http://fetter.org/ phone: +1 415 235 3778AIM: dfetter666 Skype: davidfetter Remember to vote

Re: [GENERAL] doesn't recognize !=- (not equal to a negative value)

2006-07-12 Thread David Fetter
-- David Fetter [EMAIL PROTECTED] http://fetter.org/ phone: +1 415 235 3778AIM: dfetter666 Skype: davidfetter Remember to vote! ---(end of broadcast)--- TIP 4: Have you searched our list archives

Re: [GENERAL] [BUGS] BUG #2517: Trouble with cx_Oracle and Plpython

2006-07-06 Thread David Fetter
the connect identifier specified This means you need to fix your connect identifier for Oracle so that it works both locally and remotely. It's a bug in your script, not in PostgreSQL, so I'm moving this to -general :) Cheers, D -- David Fetter [EMAIL PROTECTED] http://fetter.org/ phone: +1 415

Re: [GENERAL] Dynamic technical graphics generation inside plperl query?

2006-07-01 Thread David Fetter
to go. I don't know whether the more file-like lo interface can be used this way, but it's seldom worth the trouble anyhow. Cheers, D -- David Fetter [EMAIL PROTECTED] http://fetter.org/ phone: +1 415 235 3778AIM: dfetter666 Skype: davidfetter Remember

Re: [GENERAL] Notes on converting from MySQL 5.0.x to PostgreSQL

2006-06-30 Thread David Fetter
of the major headaches of a Slony-I setup. I also noticed that pgAdmin 1.6-to-be has at least some of those hooks. Any ETA on that? Cheers, D -- David Fetter [EMAIL PROTECTED] http://fetter.org/ phone: +1 415 235 3778AIM: dfetter666 Skype: davidfetter

Re: [GENERAL] Notes on converting from MySQL 5.0.x to PostgreSQL

2006-06-30 Thread David Fetter
at it crosseyed. I have not had to use it for production purposes, but I can tell you that the mysql replication regression tests fail ... irreproducibly of course ... almost one time in two in Red Hat's build environment. Are those tests, or at least descriptions of them, available? Cheers, D -- David

Re: [GENERAL] Notes on converting from MySQL 5.0.x to PostgreSQL

2006-06-30 Thread David Fetter
On Fri, Jun 30, 2006 at 01:41:53PM -0400, Tom Lane wrote: David Fetter [EMAIL PROTECTED] writes: On Fri, Jun 30, 2006 at 11:39:04AM -0400, Tom Lane wrote: It might be worth pointing out that mysql's replication falls over if you so much as look at it crosseyed. I have not had to use

Re: [GENERAL] Null and Void() - Or, Abandon All Hope Ye Who allow NULLs?

2006-06-28 Thread David Fetter
a revelation about How Databases Should Be®. This way, you can help explain gently that their new insight is neither new nor insightful, and that there are some good papers http://www.cs.toronto.edu/~libkin/publ.html to read. Cheers, D -- David Fetter [EMAIL PROTECTED] http://fetter.org/ phone

Re: [GENERAL] Null and Void() - Or, Abandon All Hope Ye Who allow NULLs?

2006-06-28 Thread David Fetter
Stephenson, The Big U The insistence on no nulls, anywhere, any time, for any reason, seems--from a practical vantage--unreasonable. You're right. It is :) Cheers, D -- David Fetter [EMAIL PROTECTED] http://fetter.org/ phone: +1 415 235 3778AIM: dfetter666

Re: [GENERAL] empty text fields

2006-06-28 Thread David Fetter
the empty strings with NULLs. Cheers, D -- David Fetter [EMAIL PROTECTED] http://fetter.org/ phone: +1 415 235 3778AIM: dfetter666 Skype: davidfetter Remember to vote! ---(end of broadcast)--- TIP 1: if posting

Re: [GENERAL] unique attributes in profile management system

2006-06-27 Thread David Fetter
: http://www.dbazine.com/ofinterest/oi-articles/celko22. It has a name. You need to fix it :) Cheers, D -- David Fetter [EMAIL PROTECTED] http://fetter.org/ phone: +1 415 235 3778AIM: dfetter666 Skype: davidfetter Remember to vote

Re: [GENERAL] PL/Perl questions...

2006-06-16 Thread David Fetter
from a perl function in this manner based on a DBI query? See above :) Cheers, D -- David Fetter [EMAIL PROTECTED] http://fetter.org/ phone: +1 415 235 3778AIM: dfetter666 Skype: davidfetter Remember to vote! ---(end of broadcast

Re: [GENERAL] Fabian Pascal and RDBMS deficiencies in fully implementing

2006-06-13 Thread David Fetter
to move away from it. Despite Date's many whines over the decades, his still-vaporware Relational Model doesn't even vaguely approximate that criterion. Cheers, D -- David Fetter [EMAIL PROTECTED] http://fetter.org/ phone: +1 415 235 3778AIM: dfetter666 Skype

Re: [GENERAL] Fabian Pascal and RDBMS deficiencies in fully implementing

2006-06-13 Thread David Fetter
On Tue, Jun 13, 2006 at 12:51:57PM -0400, Merlin Moncure wrote: On 6/13/06, David Fetter [EMAIL PROTECTED] wrote: SQL was a quick and dirty hack (Systems R and R* needed some way to interface with data) with multiple deficiencies recognized and documented right within the very first paper

Re: [GENERAL] Fabian Pascal and RDBMS deficiencies in fully

2006-06-11 Thread David Fetter
... Alphora. I don't think it meets the definition of market traction (and it overlays on top of sql), but it's pretty neat. It may be neat, but it's not Date's Relational Model because it allows NULLs. Cheers, D -- David Fetter [EMAIL PROTECTED] http://fetter.org/ phone: +1 415 235 3778

Re: [GENERAL] Fabian Pascal and RDBMS deficiencies in fully implementing

2006-06-09 Thread David Fetter
://en.wikipedia.org/wiki/Relational_algebra, and as a direct consequence, you can't do this simple but interesting thing with it. What say we just stop right there and call Date's Relational Model what it is: a silly edifice built atop wrong premises. Cheers, D -- David Fetter [EMAIL PROTECTED] http://fetter.org

Re: [GENERAL] Fabian Pascal and RDBMS deficiencies in fully implementing the relational model

2006-06-09 Thread David Fetter
that I don't know the birthdate, which is rummage through all my records trying to find the birthdate. Cheers, D -- David Fetter [EMAIL PROTECTED] http://fetter.org/ phone: +1 415 235 3778AIM: dfetter666 Skype: davidfetter Remember to vote

Re: [GENERAL] Fabian Pascal and RDBMS deficiencies in fully

2006-06-09 Thread David Fetter
the theory, not reality, is wrong. What's with the insults? Cool off or something... I sent you private mail in response to your private email. You decided to send it to a public list, moonbat. And you still haven't actually used any logic. You've just alleged that you have. Cheers, D -- David

Re: [GENERAL] Fabian Pascal and RDBMS deficiencies in fully

2006-06-09 Thread David Fetter
On Fri, Jun 09, 2006 at 03:18:54PM -0400, Robert Treat wrote: On Friday 09 June 2006 12:39, David Fetter wrote: On Fri, Jun 09, 2006 at 12:29:59PM -0400, A.M. wrote: Yes, and all SQL products worth their salt include some languages to provide iteration and other processing that SQL

Re: [GENERAL] Fabian Pascal and RDBMS deficiencies in fully implementing the relational model

2006-06-08 Thread David Fetter
theory with repetition of elements allowed. This in turn makes aggregates easy and natural to implement. [2] A boolean value can take the values true, false and unknown. [3] http://en.wikipedia.org/wiki/Phlogiston -- David Fetter [EMAIL PROTECTED] http://fetter.org/ phone: +1 415 235 3778

Re: [GENERAL] Fabian Pascal and RDBMS deficiencies in fully implementing the relational model

2006-06-08 Thread David Fetter
On Thu, Jun 08, 2006 at 05:22:46PM -0500, Scott Marlowe wrote: On Thu, 2006-06-08 at 17:14, David Fetter wrote: Pascal, Date, and Darwen have been alleging for years, with increasing shrillness, that DBMSs should be based on set theory and 2-value logic. I say alleging because they have

Re: [GENERAL] Fabian Pascal and RDBMS deficiencies in fully implementing the relational model

2006-06-08 Thread David Fetter
On Thu, Jun 08, 2006 at 06:09:21PM -0700, Trent Shipley wrote: On Thursday 2006-06-08 15:14, David Fetter wrote: On Thu, Jun 08, 2006 at 05:21:07AM -0700, [EMAIL PROTECTED] wrote: on bag theory[1] and 3-value logic[2]. Until they come up with a testable system, or Hell freezes over

Re: [GENERAL] What are the characteristics of a good user-defined data type?

2006-06-07 Thread David Fetter
a real need for. You might some day. One of PostgreSQL's Killer Features(TM) is its radical extensibility. Cheers, D -- David Fetter [EMAIL PROTECTED] http://fetter.org/ phone: +1 415 235 3778AIM: dfetter666 Skype: davidfetter Remember to vote

Re: [GENERAL] 7.3.3, Fedora Core 5, test geometry and test horology

2006-06-05 Thread David Fetter
that 7.3.3 will work with FC5. If you're going with something in the (as you point out, Jurassic) 7.3.x series, you need to make sure that 7.3.15 is running, as all previous versions have known security and/or data loss bugs. Cheers, D -- David Fetter [EMAIL PROTECTED] http://fetter.org/ phone: +1

Re: [GENERAL] Syntax question

2006-05-26 Thread David Fetter
that the only difference between Q1 and Q2 above is the word LEFT. HTH :) Cheers, D -- David Fetter [EMAIL PROTECTED] http://fetter.org/ phone: +1 415 235 3778AIM: dfetter666 Skype: davidfetter Remember to vote! ---(end of broadcast

Re: [GENERAL] No stddev() for interval?

2006-05-20 Thread David Fetter
something that was never implemented? That's because variance of foo is measured in foo^2 units. What is the square of an interval? Cheers, D -- David Fetter [EMAIL PROTECTED] http://fetter.org/ phone: +1 415 235 3778AIM: dfetter666 Skype: davidfetter Remember

Re: [GENERAL] Announce: GPL Framework centered on Postgres

2006-05-16 Thread David Fetter
. If that's your goal, consider the BSDL or similar. There are lots of outfits where people are forbidden flat-out to get GPL code. Cheers, D -- David Fetter [EMAIL PROTECTED] http://fetter.org/ phone: +1 415 235 3778AIM: dfetter666 Skype: davidfetter Remember to vote

Re: [GENERAL] GUI Interface

2006-05-12 Thread David Fetter
:) Cheers, D [1] Where doesn't work depends both on the particular user and on the problem at hand. [2] Anybody who first touched a computer when they were an adult, e.g. -- David Fetter [EMAIL PROTECTED] http://fetter.org/ phone: +1 415 235 3778AIM: dfetter666

Re: [GENERAL] exporting quoted CSV data from a query

2006-05-08 Thread David Fetter
-- David Fetter [EMAIL PROTECTED] http://fetter.org/ phone: +1 415 235 3778AIM: dfetter666 Skype: davidfetter Remember to vote! ---(end of broadcast)--- TIP 5: don't forget to increase your free space map

Re: [GENERAL] insert into a view?

2006-05-03 Thread David Fetter
(NEW.num, NEW.foo, NEW.bar); ); HTH :) Cheers, D -- David Fetter [EMAIL PROTECTED] http://fetter.org/ phone: +1 415 235 3778AIM: dfetter666 Skype: davidfetter Remember to vote! ---(end of broadcast)--- TIP 4

Re: [GENERAL] Replicating PostgreSQL DB to lightweight system

2006-05-02 Thread David Fetter
also consider DBI-Link, but I'm pretty sure that's not a fit for this case. Appreciate any advice. Thanks. In future, please post in plain text, as many of us have trouble reading HTML ;) Cheers, D -- David Fetter [EMAIL PROTECTED] http://fetter.org/ phone: +1 415 235 3778AIM

Re: [GENERAL] Checking for Foreign Keys constraining a record?

2006-04-28 Thread David Fetter
ON (f.foo_id = b.foo_id) LEFT JOIN quux q ON (f.foo_id = q.foo_id) ; Of course, this only reflects the state of the DB at the time the query is issued, so you'll have to be prepared to catch errors from ON DELETE RESTRICT anyhow. HTH :) Cheers, D -- David Fetter [EMAIL PROTECTED] http://fetter.org

Re: [GENERAL] How to use viewsrules to dynamically choose which table to update

2006-03-31 Thread David Fetter
://www.postgresql.org/docs/current/static/ddl-partitioning.html Cheers, D -- David Fetter [EMAIL PROTECTED] http://fetter.org/ phone: +1 415 235 3778AIM: dfetter666 Skype: davidfetter Remember to vote! ---(end of broadcast)--- TIP

Re: [GENERAL] Data model question regarding usage of arrays.

2006-03-27 Thread David Fetter
a cookbook db right now) -- David Fetter [EMAIL PROTECTED] http://fetter.org/ phone: +1 415 235 3778AIM: dfetter666 Skype: davidfetter Remember to vote! ---(end of broadcast)--- TIP 5: don't forget to increase your

Re: [GENERAL] COPY command documentation

2006-03-23 Thread David Fetter
whole job is to monitor those comments and make patches. I'd like to make a Modest Proposal™: Let's take down the interactive documents and, in their place, put up a request that doc patches be sent to -docs. What say? Cheers, D -- David Fetter [EMAIL PROTECTED] http://fetter.org/ phone: +1

Re: [DOCS] [GENERAL] COPY command documentation

2006-03-23 Thread David Fetter
. I'm voicing a rejection for 'em again on the same grounds. Until we have a person whose paid, full-time job is web-comment rassling, this is a non-starter. Cheers, D -- David Fetter [EMAIL PROTECTED] http://fetter.org/ phone: +1 415 235 3778AIM: dfetter666

Re: [GENERAL] xml output

2006-03-22 Thread David Fetter
-- David Fetter [EMAIL PROTECTED] http://fetter.org/ phone: +1 415 235 3778AIM: dfetter666 Skype: davidfetter Remember to vote! ---(end of broadcast)--- TIP 4: Have you searched our list archives

Re: [GENERAL] ALTER TABLE -- how to add ON DELETE CASCADE?

2006-03-08 Thread David Fetter
it again. I was only thinking of modifying the minimum necessary. Yeah, unfortunately there's no support for modifying constraints. Well, except in the sense of dropping and re-creating them inside a transaction :) Cheers, D (transactional DDL is fantastic :) -- David Fetter [EMAIL PROTECTED

Re: [GENERAL] Oracle purchases Sleepycat - is this the other shoe

2006-02-16 Thread David Fetter
to get data back out when you put it in, it isn't. Cheers, D -- David Fetter [EMAIL PROTECTED] http://fetter.org/ phone: +1 415 235 3778 Remember to vote! ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] Eliminating seconds fractions from timestamps?

2006-02-14 Thread David Fetter
On Tue, Feb 14, 2006 at 02:43:05PM -0800, CSN wrote: I have a bunch of timestamps like: 2005-11-20 20:45:48.281653-07 How can I change it so they never get saved with seconds fractions? You could set the fields to be of type TIMESTAMP(0) WITH TIME ZONE. Cheers, D -- David Fetter [EMAIL

[GENERAL] Each foo must have a bar

2006-02-11 Thread David Fetter
) WHERE bar.foo_id IS NULL; IF childless_foo_count 0 THEN RAISE EXCEPTION 'Each foo must have at least one bar.'; END IF; RETURN NULL; END; $$; CREATE TRIGGER foo_after AFTER INSERT OR UPDATE ON foo FOR EACH STATEMENT EXECUTE PROCEDURE foo_trg(); -- David Fetter

Re: [GENERAL] Insert more than one t-uple in a single sql

2006-02-09 Thread David Fetter
to change in order to implement this? There appear to be things in src/backend/parser and src/bin/psql that bear on this. Would libpq and ecpg need to change? Cheers, D -- David Fetter [EMAIL PROTECTED] http://fetter.org/ phone: +1 415 235 3778 Remember to vote! ---(end

Re: [GENERAL] PostgreSQL Top 10 Wishlist

2006-01-18 Thread David Fetter
? Cheers, D -- David Fetter [EMAIL PROTECTED] http://fetter.org/ phone: +1 415 235 3778 Remember to vote! ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org

Re: [GENERAL] [BUGS] Execution of stored procedures

2006-01-18 Thread David Fetter
it belongs) -- David Fetter [EMAIL PROTECTED] http://fetter.org/ phone: +1 415 235 3778 Remember to vote! ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] PostgreSQL Top 10 Wishlist

2006-01-17 Thread David Fetter
never belongs in production code in the 1st place? unless...is it possible to safely modify the |attnum field of ||pg_attribute? I know we should never directly modify system tables but..| You're right. No 'but' involved :) Cheers, D -- David Fetter [EMAIL PROTECTED] http://fetter.org/ phone

Re: [GENERAL] PostgreSQL Top 10 Wishlist

2006-01-13 Thread David Fetter
is *much* harder to do right if you're storing phone numbers from more than one country. Cheers, D -- David Fetter [EMAIL PROTECTED] http://fetter.org/ phone: +1 415 235 3778 Remember to vote! ---(end of broadcast)--- TIP 9: In versions below 8.0

Re: [GENERAL] importing an Oracle database into Postgres

2005-12-28 Thread David Fetter
, D -- David Fetter [EMAIL PROTECTED] http://fetter.org/ phone: +1 415 235 3778 Remember to vote! ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] Newbie Question: FAQ for database optimization?

2005-12-22 Thread David Fetter
://archves.postresql.org/ for a lot of this. For things you don't find there, you can either post here or go to irc://irc.freenode.net/postgresql, where there are friendly, helpful people, and occasionally Yours Truly. Cheers, D -- David Fetter [EMAIL PROTECTED] http://fetter.org/ phone: +1 415 235 3778

Re: [GENERAL] Sorting array field

2005-12-22 Thread David Fetter
( SELECT t.my_array[s.i] FROM generate_series( array_lower(my_array,1), /* usually 1 */ array_upper(my_array,1) ) AS s(i) ORDER BY t.my_array[s.i] ) AS sorted_array FROM my_table t ORDER BY sorted_array DESC; HTH :) Cheers, D -- David Fetter [EMAIL

Re: [GENERAL] Function returning SETOF

2005-12-01 Thread David Fetter
of broadcast)--- TIP 2: Don't 'kill -9' the postmaster -- David Fetter [EMAIL PROTECTED] http://fetter.org/ phone: +1 415 235 3778 Remember to vote! ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ

Re: [GENERAL] number of dimensions of a multi-dimensional array

2005-12-01 Thread David Fetter
, string_to_array( array_dims(array[[1,2],[3,4]]) ,'][') AS pieces, array_upper( string_to_array( array_dims(array[[1,2],[3,4]]) ,']['), 1) AS number of dimensions ; Cheers, D -- David Fetter [EMAIL PROTECTED] http://fetter.org/ phone: +1 415 235 3778 Remember to vote! ---(end

Re: [GENERAL] Rule appears not to fire on insert w/ except

2005-11-21 Thread David Fetter
EXCEPT SELECT a,b,c FROM baz); HTH :) Cheers, D -- David Fetter [EMAIL PROTECTED] http://fetter.org/ phone: +1 510 893 6100 mobile: +1 415 235 3778 Remember to vote! ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] Moving from MySQL to PostgreSQL with Ruby on Rails.

2005-11-17 Thread David Fetter
not belong. Pick one database back-end and stick with it. It's ever so much easier to deal with. OK, that's my $.02 :) Cheers, D -- David Fetter [EMAIL PROTECTED] http://fetter.org/ phone: +1 510 893 6100 mobile: +1 415 235 3778 Remember to vote! ---(end of broadcast

Re: [GENERAL] Aggregates, group, and order by

2005-11-07 Thread David Fetter
] I can't think of a way to push the aggregate with the order by into a subquery that still produces the proper grouping (by bar_id). Any hints or suggestions? HTH :) Cheers, D -- David Fetter [EMAIL PROTECTED] http://fetter.org/ phone: +1 510 893 6100 mobile: +1 415 235 3778 Remember

Re: [GENERAL] Looping through arrays

2005-11-03 Thread David Fetter
? You can do it in SQL, at least in 8.0 and later :) INSERT INTO bar(blurf) SELECT (string_to_array('AA-BB-CC-DD','-'))[s.i] AS foo FROM generate_series( array_lower(string_to_array('AA-BB-CC-DD','-'),1), array_upper(string_to_array('AA-BB-CC-DD','-'),1) ) AS s(i); Cheers, D -- David

Re: [GENERAL] Data Dictionary generator?

2005-11-02 Thread David Fetter
, or in psql \d by itself gets you everything :) Cheers, D -- David Fetter [EMAIL PROTECTED] http://fetter.org/ phone: +1 510 893 6100 mobile: +1 415 235 3778 Remember to vote! ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] insert multiple rows

2005-10-31 Thread David Fetter
, David. -- David Fetter [EMAIL PROTECTED] http://fetter.org/ phone: +1 510 893 6100 mobile: +1 415 235 3778 Remember to vote! ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org

Re: [GENERAL] mysql replace in postgreSQL?

2005-10-30 Thread David Fetter
. HTH :) Cheers, D -- David Fetter [EMAIL PROTECTED] http://fetter.org/ phone: +1 510 893 6100 mobile: +1 415 235 3778 Remember to vote! ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate

Re: [GENERAL] mysql replace in postgreSQL?

2005-10-30 Thread David Fetter
On Sun, Oct 30, 2005 at 03:52:23PM +0100, Tino Wildenhain wrote: Am Sonntag, den 30.10.2005, 06:29 -0800 schrieb David Fetter: On Fri, Oct 28, 2005 at 09:57:03PM -0400, blackwater dev wrote: In MySQL, I can use the replace statement which either updates the data there or inserts

Re: [GENERAL] mysql replace in postgreSQL?

2005-10-30 Thread David Fetter
On Sun, Oct 30, 2005 at 11:47:41PM +0800, Lincoln Yeoh wrote: At 06:29 AM 10/30/2005 -0800, David Fetter wrote: On Fri, Oct 28, 2005 at 09:57:03PM -0400, blackwater dev wrote: In MySQL, I can use the replace statement which either updates the data there or inserts

Re: [GENERAL] looking for alternative to MySQL's GROUP_CONCAT function

2005-10-21 Thread David Fetter
-array.html to get a nice, flexible system. You can make a static one if you like. One thing about this approach is that you then have to exclude NULLs from your search because PostgreSQL arrays can't yet hold NULLs. Cheers, D -- David Fetter [EMAIL PROTECTED] http://fetter.org/ phone: +1 510

Re: [GENERAL] doc typo sql-reindex.html psql vs. postgres

2005-10-20 Thread David Fetter
by reading the documentation entirely but it is not very helpful if your production database went wrong and you are quite a bit in a hurry. That's a great idea. Please post a doc patch with some of the troubleshooting tips you have in mind :) Cheers, D -- David Fetter [EMAIL PROTECTED] http

Re: [GENERAL] PostgreSQL 8.1 vs. MySQL 5.0?

2005-10-13 Thread David Fetter
relies on pg 8.1 features of PL/Perl. Further improvements...well, you're right. I'll need a generic way to get predicates at run time from one place and push them to an opaque place, in my case, a set-returning function, at run time. Cheers, D -- David Fetter [EMAIL PROTECTED] http://fetter.org

Re: [GENERAL] more than one row returned by a subquery used as an expression

2005-10-13 Thread David Fetter
gotcha? Nope. Thinko on your end. Just make sure your inner query is guaranteed to return exactly one row, and you'll be good. :) Cheers, D -- David Fetter [EMAIL PROTECTED] http://fetter.org/ phone: +1 510 893 6100 mobile: +1 415 235 3778 Remember to vote! ---(end

Re: [GENERAL] Oracle buys Innobase

2005-10-10 Thread David Fetter
be, but somebody would have sue, and then they would have to win against Oracle. I don't think that MySQL AB has the resources to fight such a legal action, even assuming they'd win it. Cheers, D -- David Fetter [EMAIL PROTECTED] http://fetter.org/ phone: +1 510 893 6100 mobile: +1 415 235 3778

Re: [GENERAL] Oracle buys Innobase

2005-10-10 Thread David Fetter
On Mon, Oct 10, 2005 at 11:29:24AM -0700, Dann Corbit wrote: Consider what happened to Stak verse MS. Stak won the court case but still went out of business. My point exactly ;) Cheers, D -Original Message- From: David Fetter [mailto:[EMAIL PROTECTED] Sent: Monday, October 10

Re: [GENERAL] INSERT OR UPDATE?

2005-10-09 Thread David Fetter
example below, while a little more complicated to write and use, handles this. http://developer.postgresql.org/docs/postgres/plpgsql-control-structures.html#PLPGSQL-ERROR-TRAPPING SQL:2003 standard MERGE should fix all this. Cheers, D -- David Fetter [EMAIL PROTECTED] http://fetter.org/ phone

Re: [GENERAL] Dump all except some tables?

2005-10-08 Thread David Fetter
On Fri, Oct 07, 2005 at 08:21:31PM -0500, Jim C. Nasby wrote: On Fri, Oct 07, 2005 at 02:07:47AM -0700, David Fetter wrote: On Fri, Oct 07, 2005 at 11:47:26AM +0300, WireSpot wrote: But... will the resulting dump be consistent as far as foreign keys are concerned? Or will the current -t

Re: [GENERAL] Dump all except some tables?

2005-10-07 Thread David Fetter
On Fri, Oct 07, 2005 at 11:47:26AM +0300, WireSpot wrote: On 10/7/05, David Fetter [EMAIL PROTECTED] wrote: Here's my thoughts on a summary: [-t [table | glob]]...# 0 or more -t options [-T [table | glob]]...# 0 or more -T options [--include-tables-from-file f

Re: [GENERAL] PostgreSQL 8.1 vs. MySQL 5.0?

2005-10-07 Thread David Fetter
investment in not being wrong on an important matter is too big. Cheers, D -- David Fetter [EMAIL PROTECTED] http://fetter.org/ phone: +1 510 893 6100 mobile: +1 415 235 3778 Remember to vote! ---(end of broadcast)--- TIP 5: don't forget

Re: [GENERAL] PostgreSQL 8.1 vs. MySQL 5.0?

2005-10-07 Thread David Fetter
port your product to PostgreSQL and only offer it on platforms that allow you to run PostgreSQL natively. Cheers, D -- David Fetter [EMAIL PROTECTED] http://fetter.org/ phone: +1 510 893 6100 mobile: +1 415 235 3778 Remember to vote! ---(end of broadcast

Re: [GENERAL] Dump all except some tables?

2005-10-06 Thread David Fetter
into consideration. I only get one table in the dump. Right. That's on the TODO list but not done yet :-(. There have been several patches against pg_dump to do both multiple-table inclusion and multiple-table exclusion. These may get into 8.2, as they missed 8.1. Cheers, D -- David Fetter

Re: [GENERAL] PostgreSQL Gotchas

2005-10-06 Thread David Fetter
vs. SQL standard's making that AS optional there) Third, there are real gotchas, but those are generally reported as bugs on pgsql-bugs and acted upon as such. Cheers, D -- David Fetter [EMAIL PROTECTED] http://fetter.org/ phone: +1 510 893 6100 mobile: +1 415 235 3778 Remember to vote

Re: [GENERAL] PostgreSQL Gotchas

2005-10-06 Thread David Fetter
On Thu, Oct 06, 2005 at 05:29:14PM -0500, Jim C. Nasby wrote: On Thu, Oct 06, 2005 at 12:29:51PM -0700, David Fetter wrote: * Problems that will be fixed in the next version of PostgreSQL. This means that problems get on developers' radar and get fixed. I suppose by some extremely un

Re: [GENERAL] Dump all except some tables?

2005-10-06 Thread David Fetter
-from-file f] [--exclude-tables-from-file f] where globs get expanded just the way they are in psql, and the exclude is evaluated after the include to remove any tables where they might conflict. I don't think regex matching is needed or good. Does this make sense? Cheers, D -- David Fetter [EMAIL

Re: [GENERAL] PostgreSQL 8.1 vs. MySQL 5.0?

2005-10-06 Thread David Fetter
London, Foo McBar said, ' ... ' One way to keep the FUD to a minimum is to hold the FUDster personally responsible for it. Cheers, D -- David Fetter [EMAIL PROTECTED] http://fetter.org/ phone: +1 510 893 6100 mobile: +1 415 235 3778 Remember to vote! ---(end of broadcast

Re: [GENERAL] Multiple database queries

2005-10-02 Thread David Fetter
, for example, your customer table to several different databases. The replicated tables are read-only on the slaves, but that shouldn't present insurmountable problems. HTH :) Cheers, D -- David Fetter [EMAIL PROTECTED] http://fetter.org/ phone: +1 510 893 6100 mobile: +1 415 235 3778 Remember

Re: [GENERAL] pl/pgsql function debugging

2005-09-29 Thread David Fetter
://sqlmanager.net/en/products/postgresql/manager Cheers, D -- David Fetter [EMAIL PROTECTED] http://fetter.org/ phone: +1 510 893 6100 mobile: +1 415 235 3778 Remember to vote! ---(end of broadcast)--- TIP 5: don't forget to increase your free space

Re: [GENERAL] Fetching column names for a table

2005-09-21 Thread David Fetter
:) Cheers, D -- David Fetter [EMAIL PROTECTED] http://fetter.org/ phone: +1 510 893 6100 mobile: +1 415 235 3778 Remember to vote! ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs

Re: [GENERAL] [pgsql-advocacy] YAPC::Israel looking for Perl/Database speakers

2005-09-21 Thread David Fetter
if someone could present something on Pl/perl there. I'll even volunteer to help write it. :) I'd be delighted to give a talk on DBI-Link, of which PL/PerlU is the essential component :) Cheers, D -- David Fetter [EMAIL PROTECTED] http://fetter.org/ phone: +1 510 893 6100 mobile: +1 415 235 3778

Re: [GENERAL] Create a pg table from CSV with header rows

2005-09-16 Thread David Fetter
have to guess or perhaps make them all text. I've attached a sample implementation of Michael's suggestion. I've attached what I hope is a slightly improved one :) Cheers, D -- David Fetter [EMAIL PROTECTED] http://fetter.org/ phone: +1 510 893 6100 mobile: +1 415 235 3778 Remember to vote

Re: [GENERAL] Howto create a plperlu function as user (not superuser)??

2005-09-15 Thread David Fetter
://www.postgresql.org/docs/current/static/sql-listen.html Cheers, D -- David Fetter [EMAIL PROTECTED] http://fetter.org/ phone: +1 510 893 6100 mobile: +1 415 235 3778 Remember to vote! ---(end of broadcast)--- TIP 6: explain analyze is your

Re: [GENERAL] concatenate text

2005-09-04 Thread David Fetter
a custom aggregate like array_accum() http://www.postgresql.org/docs/current/static/xaggr.html combined with the array_to_string() like this: SELECT array_to_string(array_accum(email), ', ') AS emails FROM person_email; Hope this helps :) Cheers, D -- David Fetter [EMAIL PROTECTED] http

Re: [GENERAL] Help with a subselect inside a view

2005-08-25 Thread David Fetter
there.) This sounds like a case for PostgreSQL's nifty DISTINCT ON functionality. http://www.postgresql.org/docs/current/static/sql-select.html#SQL-DISTINCT HTH :) Cheers, D -- David Fetter [EMAIL PROTECTED] http://fetter.org/ phone: +1 510 893 6100 mobile: +1 415 235 3778 Remember to vote

Re: [GENERAL] [OT?] ETL tools

2005-08-24 Thread David Fetter
/ Cheers, D -- David Fetter [EMAIL PROTECTED] http://fetter.org/ phone: +1 510 893 6100 mobile: +1 415 235 3778 Remember to vote! ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org

Re: [GENERAL] Postgresql Books: Which one ?

2005-08-15 Thread David Fetter
this one, so I don't know. HTH :) Cheers, D -- David Fetter [EMAIL PROTECTED] http://fetter.org/ phone: +1 510 893 6100 mobile: +1 415 235 3778 Remember to vote! ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your

Re: [GENERAL] user-defined types and inheritance

2005-08-12 Thread David Fetter
the super-table? No. Cheers, D -- David Fetter [EMAIL PROTECTED] http://fetter.org/ phone: +1 510 893 6100 mobile: +1 415 235 3778 Remember to vote! ---(end of broadcast)--- TIP 4: Have you searched our list archives? http

Re: [GENERAL] Exceptions in PL/Perl?

2005-08-11 Thread David Fetter
On Thu, Aug 11, 2005 at 10:15:11AM -0400, Jeff Boes wrote: How does one raise an exception from a PL/Perl function? Specifically, this is a trigger function. Is it as simple as die msg? elog(ERROR, $errmsg) works. Cheers, D -- David Fetter [EMAIL PROTECTED] http://fetter.org/ phone: +1 510

Re: [GENERAL] What's up with EnterpriseDB?

2005-08-10 Thread David Fetter
anonymous PL/SQL blocks. I'm hoping we can talk them into helping us do in-line anonymous PL/Foo based on what they've done for this. :) Cheers, D -- David Fetter [EMAIL PROTECTED] http://fetter.org/ phone: +1 510 893 6100 mobile: +1 415 235 3778 Remember to vote! ---(end

Re: [GENERAL] [pgsql-advocacy] MySQL to PostgreSQL, was ENUM type

2005-07-28 Thread David Fetter
thing does? Yikes! Another unintended use. :P Anybody interested in contributing to this? Cheers, D (who is ashamed about how long it's been since his last commit) -- David Fetter [EMAIL PROTECTED] http://fetter.org/ phone: +1 510 893 6100 mobile: +1 415 235 3778 Remember to vote

Re: [GENERAL] How to optimize select count(*)..group by?

2005-07-28 Thread David Fetter
pretty much stuck with either writing triggers that modify a cache table or having your performance the way it is now. Cheers, D -- David Fetter [EMAIL PROTECTED] http://fetter.org/ phone: +1 510 893 6100 mobile: +1 415 235 3778 Remember to vote! ---(end of broadcast

<    1   2   3   4   5   6   >