Re: [GENERAL] Affected # of Rows After TRIGGER/RULE Return

2008-05-14 Thread Volkan YAZICI
On Wed, 14 May 2008, Gerald Quimpo <[EMAIL PROTECTED]> writes: > Instead of trying to update the row in place, insert the row again, > but with the field you need to mangle (in your example, "plate", > in my example below, "k") already mangled. this only works if > the field you're mangling is

Re: [GENERAL] C function

2008-05-14 Thread Albe Laurenz
Vjy wrote: > I wrote a C function that will connect to oracle and do insert. > > then I created a trigger that calls this C function for any > insets/updates on TABLE A > > when there is a insert in table A , the C function is not called at > all, any reason why ? You will need to provide more i

Re: [GENERAL] Couple of question on functions

2008-05-14 Thread Ivan Sergio Borgonovo
On Tue, 13 May 2008 22:51:00 -0400 Tom Lane <[EMAIL PROTECTED]> wrote: > "Vyacheslav Kalinin" <[EMAIL PROTECTED]> writes: > > Reading the manual recently I came across this: ( > > http://www.postgresql.org/docs/8.3/interactive/xfunc-volatility.html ) > >> Because of the snapshotting behavior of MV

Re: [GENERAL] C function

2008-05-14 Thread Stephane Bortzmeyer
On Tue, May 13, 2008 at 02:18:47PM -0400, Vjy <[EMAIL PROTECTED]> wrote a message of 16 lines which said: > I wrote a C function that will connect to oracle Bad idea. > when there is a insert in table A , the C function is not called at > all, any reason why ? Yes, that's because you use Or

Re: [GENERAL] Affected # of Rows After TRIGGER/RULE Return

2008-05-14 Thread Gerald Quimpo
On Wednesday 14 May 2008 19:10:18 Volkan YAZICI wrote: > On Wed, 14 May 2008, Gerald Quimpo <[EMAIL PROTECTED]> writes: > > Instead of trying to update the row in place, insert the row again, > > but with the field you need to mangle (in your example, "plate", > > in my example below, "k") already

Re: [GENERAL] Affected # of Rows After TRIGGER/RULE Return

2008-05-14 Thread Volkan YAZICI
On Wed, 14 May 2008, Gerald Quimpo <[EMAIL PROTECTED]> writes: > Not really :-). I was just looking at the simplest possible thing that could > work. I've looked at versioned/temporal databases. But you probably > can't go there since it definitely adds a lot of complexity to your app > and quer

Re: [GENERAL] how can i get initdb

2008-05-14 Thread J. Manuel Velasco - UBILIBET
Iep, So thanks to your hint I haven't done the re-encoding, I guess it's the much better. I don't like latin2 anyway, i prefer UTF8 since I thinkis more standard. Thanks a lot. All beings be happy, ·_- manou Martijn van Oosterhout escribió: On Tue, May 13, 2008 at 06:05:48PM +0200, J. Ma

Re: [GENERAL] change encoding

2008-05-14 Thread J. Manuel Velasco - UBILIBET
Hi Martijn, Thank you very much for reply. It has worked perfectly. Have a good life, All beings be happy Martijn van Oosterhout escribió: On Tue, May 13, 2008 at 05:37:27PM +0200, J. Manuel Velasco - UBILIBET wrote: I have the idea to create the database and the role and then

[GENERAL] Underscore "_" in LIKE pattern

2008-05-14 Thread Stefan Schwarzer
Hi there, I would like to get a list of all tables in my schema which begin with "in_". But as the "underscore (_) in pattern stands for (matches) any single character", my query: SELECT * FROM pg_tables WHERE schemaname='public' AND tablename LIKE 'in_%' ORDER BY tablename ASC doesn't

Re: [GENERAL] Underscore "_" in LIKE pattern

2008-05-14 Thread ludwig
Hi Stef,the underscore has to be escaped:SELECT * FROM pg_tables WHERE schemaname='public' AND tablename LIKE 'in\\_%' ORDER BY tablename ASCExcerpt from Manual:To match a literal underscore or percent sign without matching other characters, the respective characterin pattern must be preceded by

Re: [GENERAL] PG -v- MySQL

2008-05-14 Thread cyclix
It surely rocks. We switched from MySql to PostgreSQL about a year ago and have never looked back, we are happy as Larry. A bit more information on our web site. http://www.alerce.com.au Regards, Mario Joshua D. Drake wrote: Scott Marlowe wrote: On Tue, May 13, 2008 at 9:42 AM, Merlin

[GENERAL] ranked subqueries vs distinct question

2008-05-14 Thread Karsten Hilbert
Hi all, let's assume I want to select cities by name fragment: select * from dem.urb where name ilike 'Lei%'; Then, let's assume I know the zip code and want to use that for limiting the range of cities returned: select * from dem.urb where name ilike 'Lei%' and

Re: [GENERAL] ranked subqueries vs distinct question

2008-05-14 Thread mian wang
2008/5/14 Karsten Hilbert <[EMAIL PROTECTED]>: > Hi all, > > let's assume I want to select cities by name fragment: > >select * from dem.urb where name ilike 'Lei%'; > > Then, let's assume I know the zip code and want to use that > for limiting the range of cities returned: > >sele

Re: [GENERAL] ranked subqueries vs distinct question

2008-05-14 Thread David McNett
On May 14, 2008, at 8:15 AM, Karsten Hilbert wrote: Effectively I want known-zip cities first, then fragment-matching cities but without those already in the known-zip list. Can anyone teach me how I need to do this in SQL ? I think you've made things far more complicated than you need. How

Re: [GENERAL] ranked subqueries vs distinct question

2008-05-14 Thread Karsten Hilbert
On Wed, May 14, 2008 at 09:48:20PM +0800, mian wang wrote: > select * from ( >select *, 1 as rank from dem.urb where >name ilike 'Lei%' and >zip = '04317' >union -- avoid distinctness at this level >

Re: [GENERAL] ranked subqueries vs distinct question

2008-05-14 Thread Karsten Hilbert
On Wed, May 14, 2008 at 08:43:31AM -0500, David McNett wrote: >> Effectively I want known-zip cities first, then >> fragment-matching cities but without those already in the >> known-zip list. > > I think you've made things far more complicated than you need. Very likely, yes. > How about an appr

Re: [GENERAL] ranked subqueries vs distinct question

2008-05-14 Thread David McNett
On May 14, 2008, at 9:07 AM, Karsten Hilbert wrote: That doesn't work, unfortunately, because the urb (cities) table doesn't have the zip code. That's stored in a street table which foreign keys into the urb table. The dem.v_zip2data view aggregates streets, cities, states and countries for which

Re: [GENERAL] ranked subqueries vs distinct question

2008-05-14 Thread Decibel!
On May 14, 2008, at 9:07 AM, Karsten Hilbert wrote: That doesn't work, unfortunately, because the urb (cities) table doesn't have the zip code. That's stored in a street table which foreign keys into the urb table. SELECT name, zip, zip='04317' AS zipmatch FROM urb LEFT JOIN streets ON (s

Re: [GENERAL] rounding problems

2008-05-14 Thread Sam Mason
On Tue, May 13, 2008 at 02:36:18PM -0400, Justin wrote: > Double holds 15 places which is the highest value of precision it can > maintain before rounding occurs. > > Is is limit less no, but what is? > > Practically speaking taking a vale 0.000,000,000,000,001 aka > 1 trillionth of anything,

Re: [GENERAL] ranked subqueries vs distinct question

2008-05-14 Thread Karsten Hilbert
On Wed, May 14, 2008 at 09:35:10AM -0500, Decibel! wrote: > Someone should probably teach the gnumed folks about schemas, too... ;) Why ? We use several: dem - demographics stuff clin - clinical stuff gm - gnumed internal stuff i18n - i18n-related stuff au

Re: [GENERAL] ranked subqueries vs distinct question

2008-05-14 Thread Karsten Hilbert
On Wed, May 14, 2008 at 09:28:50AM -0500, David McNett wrote: > I think perhaps you have misunderstood what I was suggesting. Very well possible. > If the > SQL in your original post works, then my suggestion will also work. Indeed, my initial post had a typo. Here is the last (most complex) qu

Re: [GENERAL] rounding problems

2008-05-14 Thread Decibel!
On May 12, 2008, at 10:42 PM, Craig Ringer wrote: Personally I'd be tempted to use a `double precision' (float8) for things like materials consumption. Or you could just use an un-bounded numeric... -- Decibel!, aka Jim C. Nasby, Database Architect [EMAIL PROTECTED] Give your computer some br

Re: [GENERAL] ranked subqueries vs distinct question

2008-05-14 Thread Karsten Hilbert
On Wed, May 14, 2008 at 09:35:10AM -0500, Decibel! wrote: > SELECT name, zip, zip='04317' AS zipmatch > FROM urb LEFT JOIN streets ON (streets.urb_id = urb.urb_id ) > ORDER BY zipmatch DESC, name > ; The view dem.v_zip2data (which I erronously left out in my first post) does just that - i

Re: [GENERAL] rounding problems

2008-05-14 Thread Decibel!
On May 13, 2008, at 1:36 PM, Justin wrote: Is is limit less no, but what is? numeric is limitless, unless you specifically bound it. Or you run out of space... -- Decibel!, aka Jim C. Nasby, Database Architect [EMAIL PROTECTED] Give your computer some brain candy! www.distributed.net Team

Re: [GENERAL] ranked subqueries vs distinct question

2008-05-14 Thread Karsten Hilbert
On Wed, May 14, 2008 at 09:35:10AM -0500, Decibel! wrote: > Someone should probably teach the gnumed folks about schemas, too... ;) Instead of Why? I should have said And what? I am, of course, open to insights on that. Karsten -- GPG key ID E4071346 @ wwwkeys.pgp.net E167 67FD A291 2BEA 73BD

Re: [GENERAL] ranked subqueries vs distinct question

2008-05-14 Thread Stephan Szabo
On Wed, 14 May 2008, Karsten Hilbert wrote: > Modifying to: > > select * from ( > > select distinct on (name) * from ( > > select *, 1 as rank from dem.urb where > name ilike 'Lei%' and > zip = '0

[GENERAL] how to return parts of records from a function

2008-05-14 Thread A B
Hello. I think I need som help on this function I write in plpgsql I want to return CREATE OR REPLACE FUNCTION gList(tid_ TIMESTAMP) RETURNS AS $$ DECLARE rec RECORD; BEGIN FOR rec IN SELECT DISTINCT custid,action,nr FROM ... IF rec.action = ... END I

Re: [GENERAL] ranked subqueries vs distinct question

2008-05-14 Thread David McNett
On May 14, 2008, at 9:55 AM, Karsten Hilbert wrote: On Wed, May 14, 2008 at 09:35:10AM -0500, Decibel! wrote: SELECT name, zip, zip='04317' AS zipmatch FROM urb LEFT JOIN streets ON (streets.urb_id = urb.urb_id ) ORDER BY zipmatch DESC, name ; The view dem.v_zip2data (which I erronously

Re: [GENERAL] Alias in the HAVING clause

2008-05-14 Thread Robert Treat
On Tuesday 13 May 2008 18:43:25 Tom Lane wrote: > "Scott Marlowe" <[EMAIL PROTECTED]> writes: > > On Tue, May 13, 2008 at 3:43 PM, Nathan Thatcher <[EMAIL PROTECTED]> wrote: > >> I am in the middle of switching a bunch of queries over from MySQL to > >> PostgreSQL and have hit a little snag. The f

Re: [GENERAL] ranked subqueries vs distinct question

2008-05-14 Thread Karsten Hilbert
On Wed, May 14, 2008 at 08:21:00AM -0700, Stephan Szabo wrote: > Can't you just do something like order by name, rank as part of the > distinct on subselect to force it to pick the rank 1 row for a given name? > > So, basically > select * from > ( select distinct on ... order by name, rank ) > o

[GENERAL] Re: Strange behaviour - performance decreases after each TRUNCATE

2008-05-14 Thread Ивайло Гелов
> >You don't need to re-index the indexes, you need to vacuum the tables. > >http://www.postgresql.org/docs/current/static/sql-vacuum.html > My first idea was to throw away table BALANCE and work without it. I even created a PL/SQL function for real-time calculation of article balances. But

Re: [GENERAL] rounding problems

2008-05-14 Thread Justin
I have forgotten how much i hate C++ Its not doing what you say it would but it did do other odd ball things. I miss my foxpro :-(. Plus its not holding 15 precision points #include #include int main() { double a = 0.1; //double b = 1000; double c = 1;

Re: [GENERAL] Best approach for large table maintenance

2008-05-14 Thread Decibel!
On Apr 22, 2008, at 12:04 PM, Vanole, Mike wrote: It seems that running vacuum still has value in the above approach because I still see index row versions were removed. That means either part of the import failed (transaction aborted), or you're updating or deleting rows between the load an

Re: [GENERAL] Alias in the HAVING clause

2008-05-14 Thread Tom Lane
Robert Treat <[EMAIL PROTECTED]> writes: > ... but I have to wonder, if we have established f1 by the time > we evaluate the group by, shouldn't we also be able to determine f1 at having > time, and therefore allow alias in having in this instance? The key point is that we only allow output-li

[GENERAL] postgres crash when select a record

2008-05-14 Thread mailtolouis2020-postgres
Hello, I wish some could help me on this. I got a table which has 100500 records, when I try to query this particular record select * from cs_sr_mthly_rtn where mthly_rtn_id = 61609; Postgres crash, and show this errors: server closed the connection unexpectedly  This probably means the server te

Re: [GENERAL] Request for Materialized Views

2008-05-14 Thread Decibel!
On May 5, 2008, at 2:43 AM, [EMAIL PROTECTED] wrote: We are using Postgres in our company successfully since 2001 but now we arrived at the conclusion that we really need "Materialized Views" for our further business. Also we decided that we should try to pay someone from the community for the fe

Re: [GENERAL] rounding problems

2008-05-14 Thread Sam Mason
On Wed, May 14, 2008 at 11:47:52AM -0400, Justin wrote: > I have forgotten how much i hate C++ What we're talking about doesn't have much to do with C++, it's floating point maths in general. > Its not doing what you say it would but it did do other odd ball > things. I miss my foxpro :-(. Wh

Re: [GENERAL] postgres crash when select a record

2008-05-14 Thread Glyn Astill
Looks loke you tried to run your query whilst postgres was recovering from an improper shutdown, try once again when the last thing in the log is LOG: database system is ready - Original Message From: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> To: Postgres Sent: Wednesday, 14 May, 2008

Re: [GENERAL] postgres crash when select a record

2008-05-14 Thread Pavel Stehule
Hello Delete this broken row Regards Pavel Stehule 2008/5/14 <[EMAIL PROTECTED]>: > Hello, > > I wish some could help me on this. > > I got a table which has 100500 records, when I try to query this particular > record > > select * from cs_sr_mthly_rtn where mthly_rtn_id = 61609; > Postgres cra

Re: [GENERAL] postgres crash when select a record

2008-05-14 Thread mailtolouis2020-postgres
No, I didn't run the query when the DB is in recovering. I did that after database system is ready - Original Message From: Glyn Astill <[EMAIL PROTECTED]> To: [EMAIL PROTECTED]; Postgres Sent: Wednesday, May 14, 2008 6:07:23 PM Subject: Re: [GENERAL] postgres crash when select a reco

Re: [GENERAL] postgres crash when select a record

2008-05-14 Thread Glyn Astill
In addition to what Pavel said, perhaps this will help http://archives.postgresql.org/pgsql-admin/2005-03/msg00448.php - Original Message From: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> To: Glyn Astill <[EMAIL PROTECTED]>; Postgres Sent: Wednesday, 14 May, 2008 6:20:10 PM Subject: Re: [G

Re: [GENERAL] rounding problems

2008-05-14 Thread Justin
Sam Mason wrote: On Wed, May 14, 2008 at 11:47:52AM -0400, Justin wrote: I have forgotten how much i hate C++ What we're talking about doesn't have much to do with C++, it's floating point maths in general. Its not doing what you say it would but it did do other odd ball things.

Re: [GENERAL] postgres crash when select a record

2008-05-14 Thread mailtolouis2020-postgres
Hello, Yes, I deleted that record, and now my backup is working fine! Thanks But why this problem came out? Is there anyway to trace it down and how it happen? Or is it a bug of postgres? Regards Louis - Original Message From: Pavel Stehule <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Cc:

[GENERAL] Surprising syntax error

2008-05-14 Thread Marc Munro
The statement: revoke all on view internal.all_objects from public; yields a syntax error. The docs show that the word "view" is not acceptable in this statement which is fine but the surprising thing is that:  revoke all on table internal.all_objects from public; works fine even though al

Re: [GENERAL] rounding problems

2008-05-14 Thread Sam Mason
On Wed, May 14, 2008 at 02:08:47PM -0400, Justin wrote: > Sam Mason wrote: > >What does foxpro use for storing numbers? or is it just that you never > >pushed it hard enough for the abstractions to show through. > > I know i pushed it. Foxpro for the most has only 4 basic data types > Numeri

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

2008-05-14 Thread D. Dante Lorenso
I'd like to find a timestamp function that WILL change within a transaction. This function will return to me a 15 digit BIGINT number in base10: SELECT FLOOR(EXTRACT(EPOCH FROM NOW()) * 10)::bigint; The problem is that NOW() does not change within a transaction and so I keep getting the

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

2008-05-14 Thread Steve Atkins
On May 14, 2008, at 12:56 PM, D. Dante Lorenso wrote: I'd like to find a timestamp function that WILL change within a transaction. This function will return to me a 15 digit BIGINT number in base10: SELECT FLOOR(EXTRACT(EPOCH FROM NOW()) * 10)::bigint; The problem is that NOW() does n

Re: [GENERAL] rounding problems

2008-05-14 Thread Andy Anderson
On Wed, May 14, 2008 at 02:08:47PM -0400, Justin wrote: My problem is we calculate resistance of parts in a Foxpro app that we want to move because we want to bring all the custom apps into one framework and single database. Take this calculation (0.05/3* 1.0025) which is used to calcul

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

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

Re: [GENERAL] rounding problems

2008-05-14 Thread Justin
Sam Mason wrote: On Wed, May 14, 2008 at 02:08:47PM -0400, Justin wrote: Sam Mason wrote: What does foxpro use for storing numbers? or is it just that you never pushed it hard enough for the abstractions to show through. I know i pushed it. Foxpro for the most has only 4 bas

Re: [GENERAL] rounding problems

2008-05-14 Thread Justin
Andy Anderson wrote: On Wed, May 14, 2008 at 02:08:47PM -0400, Justin wrote: My problem is we calculate resistance of parts in a Foxpro app that we want to move because we want to bring all the custom apps into one framework and single database. Take this calculation (0.05/3* 1.0025) whi

Re: [GENERAL] rounding problems

2008-05-14 Thread Andy Anderson
Sam Mason wrote: If you mean FoxPro, I think this is another case of MS screwing up. On May 14, 2008, at 4:08 PM, Justin wrote: Foxpro normally did not suffer form other MS screw ups. That's because MS bought it from a third-party developer. (And so, of course, they couldn't allow that to s

Re: [GENERAL] PG -v- MySQL

2008-05-14 Thread Andy Anderson
On May 13, 2008, at 11:42 AM, Merlin Moncure wrote: Here are some other things we have v. mysql: *) Much better shell I tend to agree based on my limited experience. However, being a GUI-oriented person I haven't noticed management tools comparable to phpMyAdmin (for web) and CocoaMySQL

Re: [GENERAL] PG -v- MySQL

2008-05-14 Thread Fernando
Have you tried Navicat? The light version is free for the Mac (I think). Andy Anderson wrote: On May 13, 2008, at 11:42 AM, Merlin Moncure wrote: Here are some other things we have v. mysql: *) Much better shell I tend to agree based on my limited experience. However, being a GUI-orien

Re: [GENERAL] PG -v- MySQL

2008-05-14 Thread Matthew T. O'Connor
Andy Anderson wrote: However, being a GUI-oriented person I haven't noticed management tools comparable to phpMyAdmin (for web) and CocoaMySQL (for Mac). Perhaps someone can enlighten me? (Yes, I've tried pgAdmin, but it's not quite ... right. I can't say why at the moment, I should probably

Re: [GENERAL] rounding problems

2008-05-14 Thread Justin
Andy Anderson wrote: Sam Mason wrote: If you mean FoxPro, I think this is another case of MS screwing up. On May 14, 2008, at 4:08 PM, Justin wrote: Foxpro normally did not suffer form other MS screw ups. That's because MS bought it from a third-party developer. (And so, of course, they co

[GENERAL] DB page cache/query performance

2008-05-14 Thread George Pavlov
I am on PG 8.1.10 on RedHat Linux. Some page cache/query performance questions: Is there a way to tell whether a query is satisfied from memory cache or from disk. The only way I know of is based on the time the query takes (reported by EXPLAIN ANALYZE) -- comparing the first-time performance (aft

Re: [GENERAL] DB page cache/query performance

2008-05-14 Thread Greg Smith
On Wed, 14 May 2008, George Pavlov wrote: Is there a way to tell whether a query is satisfied from memory cache or from disk. No. You can look at the hit rate statistics for the tables and indexes referenced and see how they change before and after the query, but this just tells you about w

[GENERAL] bug on ALTER TABLE

2008-05-14 Thread Martin Marques
Please, can someone explain how is it posible for ALTER TABLE to add a primary key column to a table without some intruction that would make it a real PK (NOT NULL and UNIQUE). prueba=> CREATE TABLE nopk ( prueba(> textito varchar prueba(> ); CREATE TABLE prueba=> INSERT INTO nopk VALUES ('algo

[GENERAL] convert very large unsigned numbers to base62?

2008-05-14 Thread D. Dante Lorenso
I'd like to convert very large unsigned numbers (ala bigint) to a text string using base62. I created this PL/PERL function to do the trick: CREATE OR REPLACE FUNCTION "public"."ls_crypt_convert_base" (in_value text, in_base integer) RETURNS text AS $body$ my ($value, $

Re: [GENERAL] psql \pset pager

2008-05-14 Thread Bruce Momjian
Steve Crawford wrote: > My fingers sometimes run on "autoappend semicolon" mode and I end up > typing "\pset pager always;" instead of "\pset pager always". No error > is returned, short (but wide) output is not routed to the pager, and I > have to back up and correct the \pset pager command. Af

Re: [GENERAL] bug on ALTER TABLE

2008-05-14 Thread Joey K.
On Wed, May 14, 2008 at 4:35 PM, Martin Marques <[EMAIL PROTECTED]> wrote: > Please, can someone explain how is it posible for ALTER TABLE to add a > primary key column to a table without some intruction that would make it a > real PK (NOT NULL and UNIQUE). > > prueba=> CREATE TABLE nopk ( > prueb

Re: [GENERAL] bug on ALTER TABLE

2008-05-14 Thread Dann Corbit
> -Original Message- > From: [EMAIL PROTECTED] [mailto:pgsql-general- > [EMAIL PROTECTED] On Behalf Of Martin Marques > Sent: Wednesday, May 14, 2008 4:35 PM > To: pgsql-general@postgresql.org > Subject: [GENERAL] bug on ALTER TABLE > > Please, can someone explain how is it posible for AL

Re: [GENERAL] convert very large unsigned numbers to base62?

2008-05-14 Thread Stuart Cooper
> I'd like to convert very large unsigned numbers (ala bigint) to a text > string using base62. I created this PL/PERL function to do the trick: base 62 is cruel and unusual punishment. Introduce two more printing characters to your set a..z, A..Z, 0..9 such as "_" and "!" and do it in base 64 in

Re: [GENERAL] psql \pset pager

2008-05-14 Thread Gregory Stark
"Bruce Momjian" <[EMAIL PROTECTED]> writes: > Steve Crawford wrote: >> My fingers sometimes run on "autoappend semicolon" mode and I end up >> typing "\pset pager always;" instead of "\pset pager always". FWIW I get bitten by this all the time with \set AUTOCOMMIT. >> I didn't find this docum

Re: [GENERAL] convert very large unsigned numbers to base62?

2008-05-14 Thread D. Dante Lorenso
Stuart Cooper wrote: I'd like to convert very large unsigned numbers (ala bigint) to a text string using base62. I created this PL/PERL function to do the trick: base 62 is cruel and unusual punishment. Introduce two more printing characters to your set a..z, A..Z, 0..9 such as "_" and "!" and

Re: [GENERAL] convert very large unsigned numbers to base62?

2008-05-14 Thread Greg Smith
On Wed, 14 May 2008, D. Dante Lorenso wrote: Stuart Cooper wrote: base 62 is cruel and unusual punishment. Introduce two more printing characters to your set a..z, A..Z, 0..9 such as "_" and "!" and do it in base 64 instead. I thought about adding 2 more characters, but I didn't like anythi

[GENERAL] Populating a sparse array piecemeal in plpgsql

2008-05-14 Thread Eliot, Christopher
I have to count up a whole lot of things in a hurry. But in counting them, I have to do a bit of analysis on each. Each goober that I'm counting can be considered to have four characteristics. The first three are binary: it's either male or female, rich or poor, strong or weak. The last charac

Re: [GENERAL] postgres crash when select a record

2008-05-14 Thread Pavel Stehule
Hello 2008/5/14 <[EMAIL PROTECTED]>: > Hello, > > Yes, I deleted that record, and now my backup is working fine! Thanks > > But why this problem came out? Is there anyway to trace it down and how it > happen? Or is it a bug of postgres? > I can't to eliminate PostgreSQL bug, but sometimes this p