Re: [GENERAL] REGEXP_REPLACE woes

2008-06-10 Thread Leif B. Kristensen
On Tuesday 10. June 2008, Leif B. Kristensen wrote: >Hey, I told it not to be greedy, didn't I? Found it. I must make *both* atoms non-greedy: pgslekt=> CREATE OR REPLACE FUNCTION link_expand(TEXT) RETURNS TEXT AS $$ SELECT REGEXP_REPLACE($1,

Re: [GENERAL] REGEXP_REPLACE woes

2008-06-10 Thread Leif B. Kristensen
On Tuesday 10. June 2008, CaT wrote: >On Tue, Jun 10, 2008 at 03:43:02PM +0200, Leif B. Kristensen wrote: >> On Tuesday 10. June 2008, Leif B. Kristensen wrote: >> >Hey, I told it not to be greedy, didn't I? >> >> Found it. I must make *both* atoms non-greedy: &g

Re: [GENERAL] REGEXP_REPLACE woes

2008-06-10 Thread Leif B. Kristensen
bably a KMail bug, or more likely a Qt or KDE library bug. IIRC there was a similar bug in KNode some years ago when i tried to copy and paste some Python code from a news discussion. -- Leif Biberg Kristensen | Registered Linux User #338009 http://solumslekt.org/ | Cruising with Gentoo/KDE My Ja

Re: [GENERAL] REGEXP_REPLACE woes

2008-06-11 Thread Leif B. Kristensen
\d+?)\\]', E'#\\1#'); tmp := SUBSTRING(str, E'#\\d+?#'); p := BTRIM(tmp, '#')::INTEGER; name := get_person_name(p); str := REPLACE(str, tmp, name); END LOOP; RETURN str; END $$ LANGUAGE plpgsql STABLE; I still

Re: [GENERAL] REGEXP_REPLACE woes

2008-06-11 Thread Leif B. Kristensen
On Wednesday 11. June 2008, Leif B. Kristensen wrote: >p := BTRIM(tmp, '#')::INTEGER; >name := get_person_name(p); >str := REPLACE(str, tmp, name); I did some "folding" and replaced the above with str := REPLACE(str, tmp, get_person_name(BTR

Re: [GENERAL] dbsize command

2008-06-23 Thread Leif B. Kristensen
AS $$ SELECT pg_size_pretty(pg_database_size(current_database())); $$ LANGUAGE sql STABLE; pgslekt=> select db_size(); db_size - 63 MB (1 row) -- Leif Biberg Kristensen | Registered Linux User #338009 http://solumslekt.org/ | Cruising with Gentoo/KDE My Jazz Jukebox: http://www.last.fm/use

Re: [GENERAL] Order by parameter inside pgsql function ignored

2009-06-02 Thread Leif B. Kristensen
ER BY sort_key ASC ? If sort_key is the name of a column, you must use EXECUTE and build a dynamic query string like: FOR rec IN EXECUTE 'SELECT * FROM customers.customers_with_mark_deleted c  ORDER BY ' || sort_key || ' ASC' -- Leif Biberg Kristensen | Registere

Re: [GENERAL] Order by parameter inside pgsql function ignored

2009-06-02 Thread Leif B. Kristensen
7; In case you're expecting CamelCased column names, you should also use the quote_ident() function: FOR rec IN EXECUTE 'SELECT * FROM customers_with_mark_deleted ORDER BY ' || quote_ident(sort_key) || ' ASC' LOOP ... -- Leif Biberg Kristensen | Registered Linux User #3

Re: [GENERAL] Plpgsql functions with output parameters

2009-06-04 Thread Leif B. Kristensen
ry to retrieve one of the numbers from inside the record (or > whatever it is) that sum_n_product gave me. Hint 1: SELECT * FROM sum_n_product(2, 3); Hint 2: SELECT * FROM sum_n_product(2, 3) INTO foo; -- Leif Biberg Kristensen | Registered Linux User #338009 Me And My Database: http:/

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

2009-06-06 Thread Leif B. Kristensen
e > start so that I knew what to look for in the manual? > >Thank you for your time. >Dimitry About 15 lines of Perl code should do that. -- Leif Biberg Kristensen | Registered Linux User #338009 Me And My Database: http://solumslekt.org/blog/ -- Sent via pgsql-general mailing

Re: [GENERAL] limit table to one row

2009-06-06 Thread Leif B. Kristensen
've seen committed by people.. That sounds a lot like EAV. -- Leif Biberg Kristensen | Registered Linux User #338009 Me And My Database: http://solumslekt.org/blog/ -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] When to use cascading deletes?

2009-06-11 Thread Leif B. Kristensen
ing. So, if I delete an Event, the Participants as well as the Citations to that event are hosed. But the Persons and the Sources will of course remain in the database. -- Leif Biberg Kristensen | Registered Linux User #338009 Me And My Database: http://solumslekt.org/blog/ -- Sent via pgsql-ge

Re: [GENERAL] search for partial dates

2009-06-11 Thread Leif B. Kristensen
BSTR(TEXT($1),9,2) $$ LANGUAGE sql STABLE; for example. -- Leif Biberg Kristensen | Registered Linux User #338009 Me And My Database: http://solumslekt.org/blog/ -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] postgresql-8.3.7 unexpected connection closures

2009-06-19 Thread Leif B. Kristensen
x since 2003, and work great. Who needs Windows? -- Leif Biberg Kristensen | Registered Linux User #338009 Me And My Database: http://solumslekt.org/blog/ -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] pasting into psql garbles text

2009-06-27 Thread Leif B. Kristensen
#x27;m using the KDE Konsole, and I've not experienced the problem you're describing. However, pasting large functions or multi-line queries tends to mess up the readline history, so the next time I press arrow up, I'll often get garbled lines and lose the prompt. -- Leif Biberg Kris

Re: [GENERAL] PostgreSQL and Poker

2009-07-08 Thread Leif B. Kristensen
uot;. I'm a little surprised that this particular MySQL fanboi actually managed to spell PostgreSQL correctly. -- Leif Biberg Kristensen | Registered Linux User #338009 Me And My Database: http://solumslekt.org/blog/ -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org

Re: [GENERAL] ubuntu packages for 8.4

2009-07-13 Thread Leif B. Kristensen
On Monday 13. July 2009, Jasen Betts wrote: >you should wait. 8.4 is in debian now so should be in ubuntu RSN. One day I'm sure it will even be available in Gentoo. *sigh* -- Leif Biberg Kristensen | Registered Linux User #338009 Me And My Database: http://solumslekt.org/blog/ --

Re: [GENERAL] Update Query doesn't affect all records

2009-08-05 Thread Leif B. Kristensen
On Wednesday 5. August 2009, Sam Mason wrote: >On Wed, Aug 05, 2009 at 11:27:52AM -0600, Scott Marlowe wrote: >> Otherwise we're blind men describing an elephant. > >Interesting analogy, not heard that one before! http://www.noogenesis.com/pineapple/blind_men_elephant.

Re: [GENERAL] Posgresql to MSsql encoding problem

2009-10-09 Thread Leif B. Kristensen
* client... :) > >It's a php script, right? Just issue a pg_query("set client encoding >yadayada;") at the beginning. PHP even has a special function for it: pg_set_client_encoding($db, LATIN1); -- Leif Biberg Kristensen | Registered Linux User #338009 Me And My Databa

[GENERAL] Research and EAV models

2009-10-23 Thread Leif B. Kristensen
postulated entity. That's where the EAV model comes in really handy. -- Leif Biberg Kristensen | Registered Linux User #338009 Me And My Database: http://solumslekt.org/blog/ -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Using column aliasses in the same query

2011-04-17 Thread Leif Biberg Kristensen
fine a view or an SQL function and stash the hairy logic there. regards, Leif -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] 10 missing features

2011-04-26 Thread Leif Biberg Kristensen
reSQL by the Oracle DBA is the icing on the cake. The cake itself (in terms of data integrity, performance, scalability) is obviously regarded as totally edible. regards, Leif -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://ww

Re: [GENERAL] wnat ot edit pg_hba.conf file from command prompt

2011-05-02 Thread Leif Biberg Kristensen
On Monday 02 May 2011 16:28:48 Sim Zacks wrote: > sed for windows - http://gnuwin32.sourceforge.net/packages/sed.htm Whatever happened to edlin? regards, Leif -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.

Re: [GENERAL] Passing parameters into an in-line psql invocation

2011-06-02 Thread Leif Biberg Kristensen
On Thursday 2. June 2011 18.58.23 Gauthier, Dave wrote: > Hi: > > I'd like to pass a parameter into an inline psql call that itself calls an > sql script, something like... > > psql mydb -c "\i thesqlscript foo" > > Where"foo" is the value I want to pass in. > > Just as good would be the abilit

Re: [GENERAL] what is the best way of storing text+image documents in postgresql

2011-06-10 Thread Leif Biberg Kristensen
predefined size and display it in the browser. Click on File -> Print. Sounds like less than a day's work to me. regards, Leif -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Oracle / PostgreSQL comparison...

2011-06-24 Thread Leif Biberg Kristensen
a killer argument from the PHB point of view. They're big because they're big. regards, Leif -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Oracle / PostgreSQL comparison...

2011-06-24 Thread Leif Biberg Kristensen
On Friday 24. June 2011 06.01.31 Greg Smith wrote: > The idea that PostgreSQL is reverse engineered from Oracle is > ridiculous. Maybe he believes that SQL was invented by Oracle? regards, Leif -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes t

Re: [GENERAL] An amusing MySQL weakness--not!

2011-06-27 Thread Leif Biberg Kristensen
my_bool = NULL; It's of course much easier to use integer values, but it sucks not to use a bool when you want a variable that can't be anything but TRUE, FALSE or NULL. It obfuscates the code to use a var that evaluates to an integer, but in reality is a Boolean in disguise. regards

Re: [GENERAL] announcements regarding tools

2011-07-19 Thread Leif Biberg Kristensen
icular, Windows users seems to think that everybody else is using their platform, much as right-handers seem to unconsciously deny the existence of left-handers. The corollary being that if the announcement doesn't explicitly say otherwise, you can assume with about 99% confidence that the tout

Re: [GENERAL] Using Postgresql as application server

2011-08-15 Thread Leif Biberg Kristensen
ions in sql or pl/pgsql that will output text directly in HTML format, mostly because I've found text transformation (particularly regexp_replace) in Postgres to be far superior to the equivalent methods of doing it in PHP. Leif -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] max_stack_depth error, need suggestion

2011-08-18 Thread Leif Biberg Kristensen
> > Could any one please suggest me what the maximum safe value I may set in my > environment? > > My Server RAM is 32 GB. That error message is usually caused by an infinite recursion. regards, Leif -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make c

[GENERAL] How to find freak UTF-8 character?

2011-09-30 Thread Leif Biberg Kristensen
1" I figure that it should be easy to find the offending character in the database by doing a SELECT * FROM foo WHERE bar like '%\0xe2808e%' or something like that, but I can't find the correct syntax, I can't find a relevant section in the manual, and I can't fig

Re: [GENERAL] How to find freak UTF-8 character?

2011-09-30 Thread Leif Biberg Kristensen
On Saturday 1. October 2011 07.55.01 Leif Biberg Kristensen wrote: > I've somehow introduced a spurious UTF-8 character in my database. When I > try to export to an application that requires LATIN1 encoding, my export > script bombs out with this message: > > psycopg2.

Re: [GENERAL] How to find freak UTF-8 character?

2011-10-01 Thread Leif Biberg Kristensen
he problematic text and re-entered it by hand. Problem solved. But thank you for the idea, I think that I will strip out at least any ‎ entities from text entered into the database. By the way, is there a setting in psql that will output unprintable characters as question marks or something? reg

Re: [GENERAL] How to find freak UTF-8 character?

2011-10-02 Thread Leif Biberg Kristensen
ried a lot of different search terms in Google, and none of them turned up anything near what I needed. regards, Leif -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] How to find freak UTF-8 character?

2011-10-02 Thread Leif Biberg Kristensen
legal three-byte UTF-8 character that doesn't have a counterpart in LATIN1, given that all I know about it is its hexadecimal value. I know how to do it now, and I consider the problem solved. Hopefully, this thread may help others who stumbles upon the same issue. regards, Leif -- S

Re: [GENERAL] How to find freak UTF-8 character?

2011-10-02 Thread Leif Biberg Kristensen
bar LIKE E'%\xe2\x80\x8e%'; The trick is obviously to escape each byte in the sequence. Maybe I'll write a blog post about it. It appears to be weakly documented, or at least very hard to find. Or maybe it's just me being dense. regards, Leif. -- Sent via pgsql-general mailin

[GENERAL] I/O error on data file, can't run backup

2011-10-05 Thread Leif Biberg Kristensen
roblem. The database is still working perfectly. The backup script overwrote my previous backup with a 40 byte file (yes silly me I know that's bloody stupid - I'm gonna fix that) and now I haven't got a recent backup anymore. Is this fixable? regards, Leif -- Sent

Re: [GENERAL] I/O error on data file, can't run backup

2011-10-05 Thread Leif Biberg Kristensen
at's the only > file your drive has lost. Tom, this is what I get: postgres@balapapa ~ $ psql pgslekt psql (9.0.5) Type "help" for help. pgslekt=# select relname from pg_class where relfilenode = 11658; relname - pg_opfamily (1 row) regards, Leif -- Sent

Re: [GENERAL] I/O error on data file, can't run backup

2011-10-05 Thread Leif Biberg Kristensen
I seemingly fixed the problem by stopping postgres and doing: balapapa 612249 # mv 11658 11658.old balapapa 612249 # mv 11658.old 11658 And the backup magically works. I'm gonna move the data to another disk right now. regards, Leif -- Sent via pgsql-general mailing list (pgsql-ge

Re: [GENERAL] I/O error on data file, can't run backup

2011-10-05 Thread Leif Biberg Kristensen
On Wednesday 5. October 2011 22.41.49 Tom Lane wrote: > Leif Biberg Kristensen writes: > > I'm gonna move the data to another disk right now. > > Good plan. Couple of things I forgot to mention, in case it matters: The disk is a 1 TB Seagate Barracuda S-ATA, and it has bee

Re: [GENERAL] I/O error on data file, can't run backup

2011-10-05 Thread Leif Biberg Kristensen
d that injecting `date +%u` into the backup file name at an appropriate place will number it by weekday, which is great for keeping daily backups for a week. regards, Leif. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://ww

Re: [GENERAL] I/O error on data file, can't run backup

2011-10-05 Thread Leif Biberg Kristensen
On Thursday 6. October 2011 07.07.11 Craig Ringer wrote: > On 10/06/2011 03:06 AM, Leif Biberg Kristensen wrote: > > I seemingly fixed the problem by stopping postgres and doing: > > > > balapapa 612249 # mv 11658 11658.old > > balapapa 612249 # mv 11658.old 11

Re: [GENERAL] Procedural Languages

2012-05-31 Thread Leif Biberg Kristensen
arly awkward. That may of course be an example of the "If all you've got is a hammer, all problems look like nails" syndrome. But I've never felt a need for installing another pl language. regards, Leif -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To ma

Re: [GENERAL] Trying to execute several queries involving temp tables in a PHP script

2012-06-13 Thread Leif Biberg Kristensen
temp tables is correct. But anyway, it's always a good idea to encapsulate multiple interdependent queries in a single pl/pgsql function. I tend to keep my PHP code as simple as possible, and do most of the work inside the database. regards, Leif http://code.google.com/p/yggdrasil-genealogy/

Re: [GENERAL] Using psql -f to load a UTF8 file

2012-09-20 Thread Leif Biberg Kristensen
-*- encoding: utf-8 -*- See http://docs.python.org/release/2.5.1/ref/encodings.html which also mentions the BOM method as an alternative. regards, Leif -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Using psql -f to load a UTF8 file

2012-09-20 Thread Leif Biberg Kristensen
te Order Mark" somewhere in the configuration, and it may be on by default. regards, Leif -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Need to run a job in PgAdmin-III

2012-09-24 Thread Leif Biberg Kristensen
R: relation "dual" does not exist LINE 1: select sysdate from dual; ^ postgres=> Maybe this is what you want? postgres=> select current_date; date ---- 2012-09-24 (1 row) postgres=> regards, Leif -- Sent via pgsql-general mailin

Re: [GENERAL] problem with recreating database with export

2012-09-27 Thread Leif Biberg Kristensen
sh script, which I have been using since version 7.4, and which is working perfectly: dropdb $DB createdb --encoding=UNICODE $DB psql -U postgres -d $DB -f $INFILE > restore.log 2>&1 Note that I'm running this as a regular postgres user, whose only privilege is to cre

Re: [GENERAL] insert ... returning in plpgsql

2012-10-02 Thread Leif Biberg Kristensen
port for using RETURNING in insert, update, delete queries > to fill a variable in plpgsql? Try insert into table1(field2) values ('x') returning field1 into t_var regards, Leif -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] database corruption questions

2012-10-13 Thread Leif Biberg Kristensen
some kind of redundancy in a RAID configuration. regards, Leif -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Great site for comparing databases (or anything else)

2012-10-27 Thread Leif Biberg Kristensen
st the wall. MySQL, the BASIC of db engines? regards, Leif -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Where is 'createdb'?

2012-11-01 Thread Leif Biberg Kristensen
ed to issue this command (at a > Linux command prompt) I get 'createdb command not found'. Are the authors > out of date? What is the current command? leif@balapapa ~ $ which createdb /usr/bin/createdb regards, Leif -- Sent via pgsql-general mailing list (pgsql-general@postgresql.o

[GENERAL] GeSHi module for Postgresql?

2010-05-03 Thread Leif Biberg Kristensen
h, I wonder if there' s a compiled list somewhere of just the PostgreSQL keywords and function names. That would be of great help. regards, -- Leif Biberg Kristensen http://solumslekt.org/blog/ -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make cha

Re: [GENERAL] GeSHi module for Postgresql?

2010-05-03 Thread Leif Biberg Kristensen
On Monday 3. May 2010 22.49.21 Leif Biberg Kristensen wrote: > GeSHi <http://qbnz.com/highlighter/images/geshi.png> is a system for Sorry about that link. It's of course <http://qbnz.com/highlighter/index.php>. *blush* -- Leif Biberg Kristensen http://solumslekt.org/blog/

Re: [GENERAL] GeSHi module for Postgresql?

2010-05-03 Thread Leif Biberg Kristensen
On Monday 3. May 2010 23.05.54 Richard Broersma wrote: > On Mon, May 3, 2010 at 1:49 PM, Leif Biberg Kristensen > wrote: > > I > > wonder if there' s a compiled list somewhere of just the PostgreSQL keywords > > and function names. That would be of great help.

Re: [GENERAL] GeSHi module for Postgresql?

2010-05-03 Thread Leif Biberg Kristensen
for a spin. You can see the first test at my blog under the title «Regular expression fun in PostgreSQL». I don't want to post the direct link here. As soon as I've got some real progress, I'll send you an updated file. regards, -- Leif Biberg Kristensen http://solumslekt.org/blog/

Re: [GENERAL] GeSHi module for Postgresql?

2010-05-03 Thread Leif Biberg Kristensen
word' column. I'll separate the data types from the rest of the keywords, though. Now I only need a list of the built-in functions. There doesn't seem to be a pg_get functions()? regards, -- Leif Biberg Kristensen http://solumslekt.org/blog/ -- Sent via pgsql-general mailing list (pg

Re: [GENERAL] GeSHi module for Postgresql?

2010-05-04 Thread Leif Biberg Kristensen
On Tuesday 4. May 2010 08.20.56 Yeb Havinga wrote: > Leif Biberg Kristensen wrote: > > Now I only need a list of the built-in functions. There doesn't seem to be a > > pg_get functions()? > > > Try psql -E postgres > (-E shows all queries psql does on the cat

Re: [GENERAL] GeSHi module for Postgresql?

2010-05-04 Thread Leif Biberg Kristensen
On Tuesday 4. May 2010 16.31.20 Tom Lane wrote: > Leif Biberg Kristensen writes: > > Now I only need a list of the built-in functions. > > There's an awful lot of them, many of which aren't really intended to be > called by users anyway. Can't you just do &q

Re: [GENERAL] GeSHi module for Postgresql?

2010-05-04 Thread Leif Biberg Kristensen
On Tuesday 4. May 2010 16.31.20 Tom Lane wrote: > Leif Biberg Kristensen writes: > > Now I only need a list of the built-in functions. > > There's an awful lot of them, many of which aren't really intended to be > called by users anyway. Can't you just do &q

Re: [GENERAL] GeSHi module for Postgresql?

2010-05-04 Thread Leif Biberg Kristensen
On Tuesday 4. May 2010 18.05.02 Tom Lane wrote: > Leif Biberg Kristensen writes: > > Another point: I'm uncertain how to define a «user» in this context. Someone > > who wants to highlight plpgsql code snippets is most likely to be some kind of > > developer. >

Re: [GENERAL] Resetting serial type after "delete from table"

2010-05-08 Thread Leif Biberg Kristensen
nes of script, so I > don't do the work, but is there an easier way? http://www.postgresql.org/docs/current/static/datatype-numeric.html#DATATYPE- SERIAL http://www.postgresql.org/docs/current/static/functions-sequence.html regards, -- Leif Biberg Kristensen http://solumslekt.org/blog/ -- Sent v

Re: [GENERAL] Fwd: Google Alert - postgresql 8.4

2010-05-17 Thread Leif Biberg Kristensen
nstallation packages and source code are available online. 8.4.4, 8.3.11, 8.2.17, ... > > Erk... yeah, that does appear to be premature. The site doesn't > reflect that announcement. I'm on Gentoo Linux, and am compiling PostgreSQL 8.4.4 from portage (~x86) as I'm wr

Re: [GENERAL] uppdate from postgersql 8.3.7 to 8.4.4

2010-05-25 Thread Leif Biberg Kristensen
At least there's a plain text fallback. Messages in HTML only are totally unreadable in a plaintext MUA, and should IMO be bounced from the list. regards, -- Leif Biberg Kristensen http://solumslekt.org/blog/ -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make ch

Re: [GENERAL] Cognitive dissonance

2010-06-10 Thread Leif Biberg Kristensen
nclude plain-text docs. Wouldn't it suffice to make it downloadable, like the pdf doc? regards, -- Leif Biberg Kristensen http://solumslekt.org/blog/ -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] MESSAGE ERROR

2010-07-17 Thread Leif Biberg Kristensen
g(64) NOT NULL > > ); > > ERROR: syntax error at or near "window" > > LINE 2: window character varying(64) NOT NULL "window" is a reserved word in PostgreSQL since version 8.3, I believe. regards, -- Leif Biberg Kristensen http://solumslekt.org/blog

[GENERAL] alter table set tablespace

2010-07-27 Thread Leif Gunnar Erlandsen
question is the largest one approximately 90GB. Thanks Leif Gunnar Erlandsen -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] MySQL versus Postgres

2010-08-12 Thread Leif Biberg Kristensen
allations some manual tuning obviously is needed, and I guess that applies whatever the name of system is. That is of course one of the major reasons why such installations need qualified DBAs. But for the long-tail segment where most of us belong, this isn't a problem. regards, -- L

Re: [GENERAL] Front End Application (OFF-TOPIC)

2010-09-24 Thread Leif Biberg Kristensen
d of question > but I figured with everyone on the list using this in so many > different varieties, I would find something. > > Thanks for your support! With PHP, it's very easy to build a Web interface to a PostgreSQL database. Even I have managed that :D regards, Leif Biberg Kri

Re: [GENERAL] Trade Study on Oracle vs. PostgreSQL

2010-09-24 Thread Leif Biberg Kristensen
DBMSes. That being said, the PostgreSQL mail lists is an excellent and totally free support channel. Speaking for myself, I've never needed any support outside the mail lists. And Tom is of course a great big part of that. regards, Leif Biberg Kristensen -- Sent via pgsql-general mailing

Re: [GENERAL] Trade Study on Oracle vs. PostgreSQL

2010-09-24 Thread Leif Biberg Kristensen
red cool was Freenix based, I left the world of proprietary software and never looked back. This is my world. Thanks to every one of you who makes this possible. regards, Leif Biberg Kristensen -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subs

Re: [GENERAL] select command doesnot work

2008-07-08 Thread Leif B. Kristensen
when it's too big to show in a single page. As I'm using Linux myself, I can't give you any specific advice, but it appears that the command "more" for some reason is not found in the path of your system. That's a little strange, as "more" has been part of

Re: [GENERAL] select command doesnot work

2008-07-08 Thread Leif B. Kristensen
ing it itself? It uses "less" on Linux. -- Leif Biberg Kristensen | Registered Linux User #338009 Me And My Database: http://solumslekt.org/blog/ My Jazz Jukebox: http://www.last.fm/user/leifbk/ -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your

Re: [GENERAL] User-Defined Variables

2008-07-10 Thread Leif B. Kristensen
R AS $$ SELECT concept_id FROM concept_name where name = 'MRO' LIMIT 1; $$ LANGUAGE sql STABLE; hth, -- Leif Biberg Kristensen | Registered Linux User #338009 Me And My Database: http://solumslekt.org/blog/ My Jazz Jukebox: http://www.last.fm/user/leifbk/ -- Sent via pgsql-

Re: [GENERAL] php + postgresql

2008-07-24 Thread Leif B. Kristensen
nded for running in a private environment, and there are no security features whatsoever. -- Leif Biberg Kristensen | Registered Linux User #338009 Me And My Database: http://solumslekt.org/blog/ My Jazz Jukebox: http://www.last.fm/user/leifbk/ -- Sent via pgsql-general mailing

Re: [GENERAL] php + postgresql

2008-07-25 Thread Leif B. Kristensen
end to keep using that. It surely does the job. -- Leif Biberg Kristensen | Registered Linux User #338009 Me And My Database: http://solumslekt.org/blog/ My Jazz Jukebox: http://www.last.fm/user/leifbk/ -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make c

Re: [GENERAL] Strange Postgresql behavior solved

2008-07-25 Thread Leif B. Kristensen
had narrowed it down to failing only >when accessing the last three fields of that 118th record, the first >40 fields were fine. That sounds a lot like the "game mode" router bug: http://www.azureuswiki.com/index.php/Torrents_stop_at_99_percent -- Leif Biberg Kristensen | Register

Re: [GENERAL] How to change log file language?

2008-09-19 Thread Leif B. Kristensen
distracting, hard to figure out, or even downright silly, and you can't do efficient searches on Google in problem situations. -- Leif Biberg Kristensen | Registered Linux User #338009 Me And My Database: http://solumslekt.org/blog/ -- Sent via pgsql-general mailing list (pgsql-general@po

Re: [GENERAL] Import German Number Format

2008-10-03 Thread Leif B. Kristensen
> >When I try to import this data Postgres crashes, so I think I have to >change a parameter with SET? Does anybody know which parameter I have >to change? s/(\d{2}),(\d{2}),(\d{4})/$1.$2.$3/g -- Leif Biberg Kristensen | Registered Linux User #338009 Me And My Database: http://solum

Re: [GENERAL] Rules and conditions

2009-12-09 Thread Leif Biberg Kristensen
On Wednesday 9. December 2009 09.06.12 Guillaume Lelarge wrote: > Le mercredi 9 décembre 2009 à 01:52:03, George Silva a écrit : > > [...] > > I can't seem to understand why a simples if is not working on the > > creation of rules. > > > > I tried both ways (am i missing something?): > > > > Sur

Re: [GENERAL] Gentoo, 8,2 ---> 8.4, and /var/run/postgresql in mode 770

2010-01-09 Thread Leif Biberg Kristensen
t; way of handling this? In Gentoo, you must add the database owner (probably your own username) to the group Postgres. This was changed with 8.3, and if you had read the message from emerge, you should have noticed. And, yes, I fumbled a lot with this myself. regards, -- Leif Biberg Kristensen h

Re: [GENERAL] How to get DATE in server locale format

2010-01-11 Thread Leif Biberg Kristensen
ql.org/docs/current/static/datatype-datetime.html#datatype- datetime-output2-table pgslekt=> SELECT CURRENT_DATE::TEXT; text 2010-01-11 (1 row) pgslekt=> set datestyle to german; SET pgslekt=> SELECT CURRENT_DATE::TEXT; text 11.01.2010 (1 row) regar

Re: [GENERAL] Configuration Optimisation

2010-01-14 Thread Leif Biberg Kristensen
B (sort of) scaling factor: 5 query mode: simple number of clients: 1 duration: 120 s number of transactions actually processed: 29990 tps = 249.694058 (including connections establishing) tps = 249.700935 (excluding connections establishing) regards, -- Leif Biberg Kristensen http;//solumsle

Re: [GENERAL] Configuration Optimisation

2010-01-14 Thread Leif Biberg Kristensen
ee my reply above. My 250 tps seems in line with the 700 tps on a modern system that the OP gets on his Windows setup. To me it seems like something is broken on his Ubuntu setup. regards, -- Leif Biberg Kristensen http://solumslekt.org/ -- Sent via pgsql-general mailing list (pgsql-genera

Re: [GENERAL] Configuration Optimisation

2010-01-14 Thread Leif Biberg Kristensen
On Thursday 14. January 2010 16.55.07 Howard Cole wrote: > Leif Biberg Kristensen wrote: > > On Thursday 14. January 2010 16.02.12 Andy Colson wrote: > > > > See my reply above. My 250 tps seems in line with the 700 tps on a modern > > system that the OP gets on

Re: [GENERAL] Self-referential records

2010-01-24 Thread Leif Biberg Kristensen
e first record can't be inserted because I don't yet know the parent_id. I've got a similar structure. I just declared the root node with both id and parent_id=0. regards, -- Leif Biberg Kristensen http://solumslekt.org/ -- Sent via pgsql-general mailing list (pgsql-general@pos

Re: [GENERAL] Self-referential records

2010-01-24 Thread Leif Biberg Kristensen
structure, and will never be. It's the programmer's responsibility to ensure that circular references can't occur. regards, -- Leif Biberg Kristensen http://solumslekt.org/ -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscripti

Re: [GENERAL] insert into test_b (select * from test_a) with different column order

2010-03-29 Thread Leif Biberg Kristensen
ny specific order. So, the answer to your question is to specify the columns explicitly in your query, as insert into test_b (select col_b, col_a from test_a); regards, -- Leif Biberg Kristensen http://solumslekt.org/ -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Advice on webbased database reporting

2010-04-02 Thread Leif Biberg Kristensen
ould be able to select > the layout on certain columns (like stepped, or outlined). > > I don't mind running a whole CMS on our Apache server as long as it allows > me to make reports and is free to use. > > Has anyone any suggestions? PHP works great with Postgres

Re: [GENERAL] Fuzzy string matching of product names

2010-04-05 Thread Leif Biberg Kristensen
d really help with some kind of fuzzy search. Just in case anyone should suggest it: Both Soundex and Metaphone are useless for Norwegian 18th century names. regards, -- Leif Biberg Kristensen http://solumslekt.org/ -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make cha

Re: [GENERAL] Philosophical question

2011-12-14 Thread Leif Biberg Kristensen
has great database > support (including Postgres-specific features, some of which are quite > handy). I'd like to look at this Pike. I don't think that my Web host supports it, but it might still be a fun experience. regards, Leif The Yggdrasil project: http://code.google.com/p

Re: [GENERAL] what Linux to run

2012-03-03 Thread Leif Biberg Kristensen
.debian.org/debian unstable main contrib non-free Then I did an apt-get update and apt-get install postgresql-9.1 postgresql-client-9.1 Finally I commented out the added line of /etc/apt/sources.list. This seems a rather roundabout way, is there a better one? regards, Leif -- Sent via pgsql-

Re: [GENERAL] what Linux to run

2012-03-03 Thread Leif Biberg Kristensen
Lørdag 3. mars 2012 12.34.27 skrev Raymond O'Donnell : > You can get Postgres 9.1 from backports.debian.org: > > deb http://backports.debian.org/debian-backports squeeze-backports main Ah, sweet, thank you! regards, Leif -- Sent via pgsql-general mailing list (pgsql-general@

Re: [GENERAL] PGSQL and Javascript

2009-01-30 Thread Leif B. Kristensen
ipt code call a server-side script through an XMLHttpRequest() object. >Fahrbahn ist ein graues Band >weisse Streifen, grüner Rand I like your sig. -- Leif Biberg Kristensen | Registered Linux User #338009 Me And My Database: http://solumslekt.org/blog/ -- Sent via pgsql-general mailin

Re: [GENERAL] Difference between Windows pgsql and Linux pgsql?

2009-02-11 Thread Leif B. Kristensen
stuff. I have published it "as is" for people who know their way around a Linux / Apache / PostgreSQL / PHP stack. For exactly that reason, I have not written out detailed instructions for how to set it up. If you can't get it up and running without specific instructions, then you sho

Re: [GENERAL] Difference between Windows pgsql and Linux pgsql?

2009-02-11 Thread Leif B. Kristensen
On Wednesday 11. February 2009, Leif B. Kristensen wrote: FYI, I have included the following paragraph in the README.txt: You're welcome to ask questions about the project provided that they follow the general guidelines in the article "How To Ask Questions The Smart Way" <ht

Re: [GENERAL] PostgreSQL versus MySQL for GPS Data

2009-03-23 Thread Leif B. Kristensen
ers. This kind of supports my suspicion that people who use MySQL either haven't heard of PostgreSQL or are too dumb to understand the difference. -- Leif Biberg Kristensen | Registered Linux User #338009 Me And My Database: http://solumslekt.org/blog/ -- Sent via pgsql-general mail

Re: [HACKERS] [GENERAL] string_to_array with empty input

2009-04-01 Thread Leif B. Kristensen
t;not sure at the moment what other cases exist where non-null input >generates null output. Somehow this reminds me of the old "division by zero" problem. IMO, the proper way to handle this kind of anomaly would be to test if the length of the string is non-zero before submi

Re: [GENERAL] Posgres Adding braces at beginning and end of text (html) content

2009-04-02 Thread Leif B. Kristensen
lekt=> select * from test; i | t ---+ 1 | Hei hei (1 row) Perhaps it's a middleware problem? -- Leif Biberg Kristensen | Registered Linux User #338009 Me And My Database: http://solumslekt.org/blog/ -- Sent via pgsql-general mailing list (pgsql-general@postgres

<    1   2   3   >