Re: [GENERAL] coalesce function

2013-06-20 Thread Leif Biberg Kristensen
Torsdag 20. juni 2013 21.45.02 skrev itishree sukla: > Hi All, > > I am using coalesce(firstname,lastname), to get the result if first name is > 'NULL' it will give me lastname or either way. I am having data like > instead of NULL, blank null ( i mean something like '' ) for which > coalesce is

Re: [GENERAL] Storing Special Characters

2013-05-14 Thread Leif Biberg Kristensen
Tirsdag 14. mai 2013 18.05.05 skrev Rebecca Clarke: > Hi there. > > This may be the wrong forum to inquire in, but I'd be grateful if I could > directed in the right direction if that is the case. > > I am currently using Postgresql 9.1. > > I have a table in which I want to store shop names. So

Re: [GENERAL] Money casting too liberal?

2013-03-31 Thread Leif Biberg Kristensen
Søndag 31. mars 2013 18.45.10 skrev ajmcello : > unsubscribe > > On Sun, Mar 31, 2013 at 3:31 AM, Gavan Schneider wrote: > > On 30/3/13 at 11:09 PM, D'Arcy J.M. Cain wrote: > > I am formulating Cain's Law. Something like "If a discussion lasts > > > >> long enough, someone will mention Godwi

Re: [GENERAL] Using composite types within PLPGSQL Function

2013-01-08 Thread Leif Biberg Kristensen
Tirsdag 8. januar 2013 16.10.03 skrev Graeme Hinchliffe : > My example code is : > > CREATE TYPE testtype AS ( > a INTEGER, > b INTEGER > ); > > CREATE OR REPLACE FUNCTION test() RETURNS INTEGER AS $$ > DECLARE > x testtype; > BEGIN > (x).a:=1; > RETURN 1; > END > $$ LANGUAGE plpgsql; > > Thi

Re: [GENERAL] Where is 'createdb'?

2012-11-01 Thread Leif Biberg Kristensen
Torsdag 1. november 2012 16.32.42 skrev Kevin Burton : > This is probably a question for the authors of a book I have been reading > but it may be faster to get an answer here. > > > > I was trying to follow along in a book 'Seven Databases in Seven Weeks' and > chapter 2 deals with PostgreSQL.

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

2012-10-27 Thread Leif Biberg Kristensen
Søndag 28. oktober 2012 01.17.45 skrev Gavin Flower : > Also note that for features that are obviously complicated or advanced, > Postgres tends to a lot better than MySQL. It's like comparing BASIC to C. BASIC has a low threshold, but you will very quickly bump your head against the wall. MySQ

Re: [GENERAL] database corruption questions

2012-10-13 Thread Leif Biberg Kristensen
Lørdag 13. oktober 2012 23.53.03 skrev Heine Ferreira : > Hi > > Are there any best practices for avoiding database > corruption? In my experience, database corruption always comes down to flaky disk drives. Keep your disks new and shiny eg. less than 3 years, and go for some kind of redundanc

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

2012-10-02 Thread Leif Biberg Kristensen
Tirsdag 2. oktober 2012 15.01.08 skrev Willy-Bas Loos : > Hi, > (postgres 9.1) > I was doing something like this in a plpgsql function, but i got a Syntax > Error. > > t_var:=(insert into table1(field2) values ('x') returning field1); > > Is there no support for using RETURNING in insert, update

Re: [GENERAL] problem with recreating database with export

2012-09-27 Thread Leif Biberg Kristensen
Torsdag 27. september 2012 16.55.15 skrev Dennis Gearon : > > To anyone reading this in the future, if you have problems importing a > plain text database export, it is usually impossible to do: > psql -d some_dbase -f the_backup.sql. I don't know why. What works is doing > 'cd ./the_files_direct

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

2012-09-24 Thread Leif Biberg Kristensen
Mandag 24. september 2012 11.06.32 skrev pavithra : > I have a scheduled a sql query as "select sysdate from dual" and i have > given as "Data Export". That's an Oraclism. Have you actually tested the query in psql? postgres=> select sysdate from dual; ERROR: relation "dual" does not exist LINE

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

2012-09-20 Thread Leif Biberg Kristensen
Torsdag 20. september 2012 16.56.16 skrev Alan Millington : > psql". But how am I supposed to remove the byte order mark from a UTF8 > file? I thought that the whole point of the byte order mark was to tell > programs what the file encoding is. Other programs, such as Python, rely > on this. http

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

2012-09-20 Thread Leif Biberg Kristensen
Torsdag 20. september 2012 19.27.22 skrev Alan Millington : > Thank you for the link. I am using Notepad, which inserts the byte order > mark. Following the links a bit further, I gather that the version of > Notepad that I am using may not identify a UTF8 file correctly if the byte > order mark i

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

2012-06-13 Thread Leif Biberg Kristensen
Onsdag 13. juni 2012 15.12.33 skrev Alexander Farber : > Any ideas please on how to handle this situation > in PHP scripts, do I really have to encapsulate > my calls into a pl/PgSQL function? I believe that Misa Simic's idea that you can do it all in a single query without temp tables is corre

Re: [GENERAL] Procedural Languages

2012-05-31 Thread Leif Biberg Kristensen
Torsdag 31. mai 2012 17.07.19 skrev Merlin Moncure : > pl/pgsql is unique in that it has 'first class queries' -- sql is > intermixed freely with procedural code and it uses the same type > system and error handling mechanisms (although the syntax is > different). this directly translates into

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@postgresql.org) T

Re: [GENERAL] what Linux to run

2012-03-03 Thread Leif Biberg Kristensen
Lørdag 3. mars 2012 01.43.29 skrev Gavin Flower : > I think if you are going to select a member of the Debian family, I > would strongly recommend Debian itself. I have the impression that the > Debian community is more serious about quality than Canonical (the > company behind Ubuntu). I haven'

Re: [GENERAL] Philosophical question

2011-12-14 Thread Leif Biberg Kristensen
Onsdag 14. desember 2011 22.21.04 skrev Chris Angelico : > The biggest problem with PHP, imho, is actually that it's so easy to > use. Anyone can get a WYSIWYG editor, save as HTML, and have a web > page... and then all you need to do is rename it to ".php" and put > some special tags in it, and l

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] I/O error on data file, can't run backup

2011-10-05 Thread Leif Biberg Kristensen
On Thursday 6. October 2011 00.17.38 Steve Crawford wrote: > I'm thinking perhaps a funky memory problem - you are having odd crashes > after all. I've been thinking about the memory myself, but it passes memtest86plus with flying colors. Or at least it did the last time I checked which is a few

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
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-general@postgr

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

2011-10-05 Thread Leif Biberg Kristensen
On Wednesday 5. October 2011 20.42.00 Tom Lane wrote: > Postgres can't magically resurrect data that your drive lost, if that's > what you were hoping for. However, you might be in luck, because that > file is probably just an index and not original data. Try this: > > select relname from

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

2011-10-05 Thread Leif Biberg Kristensen
Running postgresql 9.0.5 on balapapa ~ # uname -a Linux balapapa 2.6.39-gentoo-r3 #1 SMP Sun Jul 17 11:22:15 CEST 2011 x86_64 Intel(R) Core(TM) i7 CPU 930 @ 2.80GHz GenuineIntel GNU/Linux I'm trying to run pg_dump on my database, and get an error: pg_dump: SQL command failed pg_dump: Error mes

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

2011-10-02 Thread Leif Biberg Kristensen
On Sunday 2. October 2011 17.54.52 Raymond O'Donnell wrote: > I may have missed it upthread, but if you haven't already would you > consider writing up your solution for the benefit of the archives? I did, in my own first reply to the original message: SELECT * FROM foo WHERE bar LIKE E'%\xe2\x80

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

2011-10-02 Thread Leif Biberg Kristensen
On Sunday 2. October 2011 16.34.27 Cédric Villemain wrote: > you may have miss this one : > http://tapoueh.org/blog/2010/02/23-getting-out-of-sql_ascii-part-2.html That's an, uh, interesting article, but as far as I can see, it doesn't tell anything about how to find a perfectly legal three-byte

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

2011-10-02 Thread Leif Biberg Kristensen
On Sunday 2. October 2011 15.53.50 pasman pasmański wrote: > Its simple to remove strange chars with regex_replace. True, but first you have to know how to represent a «strange char» in Postgresql :P It isn't all that obvious, and it's difficult to search for the solution. I tried a lot of dif

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

2011-10-01 Thread Leif Biberg Kristensen
On Saturday 1. October 2011 21.29.45 Andrew Sullivan wrote: > I see you found it, but note that it's _not_ a spurious UTF-8 > character: it's a right-to-left mark, ans is a perfectly ok UTF-8 code > point. Andrew, thank you for your reply. Yes I know that this is a perfectly legal UTF-8 character

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.

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

2011-09-30 Thread Leif Biberg Kristensen
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.DataError: character 0xe2808e of encoding "UTF8" has no equivalent in "LATIN1" I figure that it should

Re: [GENERAL] max_stack_depth error, need suggestion

2011-08-18 Thread Leif Biberg Kristensen
On Thursday 18. August 2011 12.39.31 AI Rumman wrote: > I am using Postgresql 9.0.1 in Centos 5. > > Yesterday, I got the error inlog: > > 2011-08-16 10:57:34 EDT [3868]: [1-1] user=vcrm,db=vtigercrm504 ERROR: > stack depth limit exceeded > 2011-08-16 10:57:34 EDT [3868]: [2-1] user=vcrm,db=vtige

Re: [GENERAL] Using Postgresql as application server

2011-08-15 Thread Leif Biberg Kristensen
On Monday 15. August 2011 16.36.23 Merlin Moncure wrote: > Postgres is not just a database -- it's a language hosting platform if > you want to use it as such. Now, you can continue to do things as > you've always done (database 'here', code 'here', web server 'here'), > but why discourage people

Re: [GENERAL] announcements regarding tools

2011-07-19 Thread Leif Biberg Kristensen
On Tuesday 19. July 2011 18.44.46 Scott Ribe wrote: > I'm not sure to whom this specifically should be addressed, but something > that's been bugging me for a while: announcements like this morning's > "AnySQL Maestro 11.7 released", where the announcement mentions nothing > about platform support.

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

2011-06-27 Thread Leif Biberg Kristensen
On Sunday 26. June 2011 16.11.06 Vincent Veyron wrote: > Le dimanche 26 juin 2011 à 00:05 -0700, Darren Duncan a écrit : > > Michael Nolan wrote: > > > > Having real BOOLEAN is just one of the reasons I like Postgres the most. > > Would you mind giving an example of where a boolean field would be

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 to your subscr

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

2011-06-24 Thread Leif Biberg Kristensen
On Friday 24. June 2011 03.14.39 Rodrigo E. De León Plicet wrote: > Here: > > http://cglendenningoracle.blogspot.com/2011/06/oracle-vs-postgres-postgresq > l.html > > Any comments? I think he got a point in «Oracle as the second largest software company in the world» which is a killer argument

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

2011-06-10 Thread Leif Biberg Kristensen
On Friday 10. June 2011 09.04.18 Arash pajoohande wrote: > Actually, my word files consists of many exam questions. for each user, a > random subset of questions must selected and displayed. > it seem's that it would be nice if I have each question as an easy to > handle document section (e.g. htm

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] 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.org/m

Re: [GENERAL] 10 missing features

2011-04-26 Thread Leif Biberg Kristensen
On Monday 25 April 2011 10:41:36 Linos wrote: > Hi all, > only want to link this blog post > http://blog.kimiensoftware.com/2011/04/top-10-missing-postgresql-features , > i think he may have any good points. > > > Miguel Angel. Maybe the best point is the one between the lines: That Postgr

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

2011-04-17 Thread Leif Biberg Kristensen
On Sunday 17 April 2011 13:01:45 Robert J.C. Ivens wrote: > Hi, > > I am not sure if there ever was a feature request for using defined column > aliases in the rest of a query. This would make queries with a lot of > logic in those aliased columns a lot smaller and this easier to > write/debug. >

Re: [GENERAL] ..horribly documented, inefficient, user-hostile, impossible to maintain interpreted language..

2011-04-04 Thread Leif Biberg Kristensen
On Monday 04 April 2011 21:20:51 John R Pierce wrote: > On 04/04/11 12:07 PM, Martin Gainty wrote: > > ..horribly documented, inefficient, user-hostile, impossible to > > maintain interpreted language.. > > to whom might you be alluding to > > I only used a few of those adjectives, and prefixed th

Re: [GENERAL] ..horribly documented, inefficient, user-hostile, impossible to maintain interpreted language..

2011-04-04 Thread Leif Biberg Kristensen
On Monday 04 April 2011 21:07:38 Martin Gainty wrote: > ..horribly documented, inefficient, user-hostile, impossible to maintain > interpreted language.. to whom might you be alluding to > ??? Probably something starting with P. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.or

Re: [GENERAL] UUID column as pimrary key?

2011-01-05 Thread Leif Biberg Kristensen
On Wednesday 5. January 2011 16.05.29 Bill Moran wrote: > Beyond that, the namespace size for a UUID is so incomprehensibly huge > that the chance of two randomly generated UUIDs having the same value > is incomprehensibly unlikely ... it is, however, not a 100% guarantee. I can't help thinking

Re: [GENERAL] Restore problem

2010-12-29 Thread Leif Biberg Kristensen
On Wednesday 29. December 2010 13.18.40 Alban Hertroys wrote: > Learning Vim is probably time well-spent, but until you do it's probably not that good a tool for fixing your problem. > > Although Vim is indeed a very powerful editor, it's not particularly easy to use. Unlike your usual editors

Re: [GENERAL] Root user commands

2010-12-22 Thread Leif Biberg Kristensen
On Wednesday 22. December 2010 20.03.23 Bob Pawley wrote: > Hi > > I am attempting to see if my Postgresql installation is running. > > I’ve found this - > [root user only] ./database_service.pl status > > I don’t understand what is meant by root user. > > I also don’t know how “./database_serv

Re: [GENERAL] Copy From suggestion

2010-12-20 Thread Leif Biberg Kristensen
On Monday 20. December 2010 15.24.58 Jorge Godoy wrote: > With OpenOffice.org that 65K limit goes away as well... > > I don't know why it is still like that today for MS Office... It is almost > 2011 and they still think 64K is enough? :-) Maybe there's an uncrippled «Professional» or «Enterpri

Re: [GENERAL] Adding data from mysql to postgresql periodically

2010-11-14 Thread Leif Biberg Kristensen
On Sunday 14. November 2010 14.33.39 franrtorres77 wrote: > > well, I know how to query to mysql but what i dont know is how to then write > that data on the fly to the postgresql I'd also like to say that it's an interesting question, and a lot of people (including me) might want to take a sta

Re: [GENERAL] Adding data from mysql to postgresql periodically

2010-11-14 Thread Leif Biberg Kristensen
On Sunday 14. November 2010 14.33.39 franrtorres77 wrote: > > well, I know how to query to mysql but what i dont know is how to then write > that data on the fly to the postgresql The DBD::Pg package has an excellent documentation: regards, Leif B. Kr

Re: [GENERAL] Adding data from mysql to postgresql periodically

2010-11-14 Thread Leif Biberg Kristensen
On Sunday 14. November 2010 13.44.53 franrtorres77 wrote: > > Hi there > > I need to add periodically some data from a remote mysql database into our > postgresql database. So, does anyone know how to do it having in mind that > it must be runned every minute or so for adding new records to the >

Re: [GENERAL] Full Vacuum/Reindex vs autovacuum

2010-11-08 Thread Leif Biberg Kristensen
On Monday 8. November 2010 20.06.13 Jason Long wrote: > I currently have Postgres 9.0 install after an upgrade. My database is > relatively small, but complex. The dump is about 90MB. > > Every night when there is no activity I do a full vacuum, a reindex, and > then dump a nightly backup. > >

Re: [GENERAL] How do you control IMMUTABLE PG PROC results?

2010-11-04 Thread Leif Biberg Kristensen
On Friday 5. November 2010 01.24.14 Carlo Stonebanks wrote: > We have procs that would benefit from returning IMMUTABLE results. The procs > are dependent on external tables that rarely change, but when they DO > change, it would be great if we could expire the cache that the procs read > from s

Re: [GENERAL] 8.4 Data Not Compatible with 9.0.1 Upgrade?

2010-11-02 Thread Leif Biberg Kristensen
On Tuesday 2. November 2010 22.37.33 Carlos Mennens wrote: > On Tue, Nov 2, 2010 at 10:53 AM, Steve Clark wrote: > > mv /var/lib/postgres/data /var/lib/postgres/data.old > > Before I move or rename '/var/lib/postgres/data', what version of > PostgreSQL should I be at? 8.4 or 9.0? You should be

Re: [GENERAL] Printing command string passed to EXECUTE command in plpgsql (after argument resolution)

2010-10-28 Thread Leif Biberg Kristensen
On Thursday 28. October 2010 16.25.47 Allan Kamau wrote: > I am debugging a plpgsql function which contains a long sql query > consisting of several parameters which is executed using EXECUTE > command. I would like to output this command string including the > actual values of the parameters conta

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] 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] 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] 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] 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

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] 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] 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] 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] 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] 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 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-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-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
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
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/

[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] 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] 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] 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] 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] 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] 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] 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
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] 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] 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] 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