[GENERAL] Invalid statement name (null) in line ## - what am I doing wrong ?

2009-06-18 Thread leif
f Linux. I have also tried the very newest version 8.4rc1, but with same result, the error above. Please help, 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] Invalid statement name (null) in line ## - what am I doing wrong ?

2009-06-18 Thread leif
cally generated based on many things. Leif - "Martin Gainty" wrote: > can we see the original statement ? > > can you combine the 2 statements to produce the necessary cursor > OPEN curs1 FOR EXECUTE 'SELECT * FROM ' || quote_ident($1); > http

Re: [GENERAL] Invalid statement name (null) in line ## - what am I doing wrong ?

2009-06-19 Thread leif
Are all this documented somewhere ? Once again, thank you for pointing out the problem. Leif - "Albe Laurenz" wrote: > l...@crysberg.dk wrote: > >I have a problem when upgrading from 8.2.4 to 8.3/8.4 using ecpg > with a prepare statement: > > >

Re: [GENERAL] Invalid statement name (null) in line ## - what am I doing wrong ?

2009-06-19 Thread leif
Hi again, Will do. Thanks again, Leif - "Albe Laurenz" wrote: > leif wrote: > >Thank you for precise answer. And yes, I have (at least) 2 > > connections, all named. So I am even not using the 'default' > > connection prepared state

[GENERAL] Bug in ecpg lib ?

2009-06-24 Thread leif
systems configured and compiled Postgres with this configure line: ./configure --prefix=/usr/local/Packages/pgsql-8.3.5 --with-openssl --enable-thread-safety Please help, 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] Bug in ecpg lib ?

2009-06-26 Thread leif
gured out where in my own code yet either. Leif - "Albe Laurenz" wrote: > l...@crysberg.dk wrote: > >I'm using PostgreSQL in a server project that uses many > > forks and many threads in each forked process. > > > >Almost everytime I do a

Re: [GENERAL] Bug in ecpg lib ?

2009-07-01 Thread leif
-ldl And this is the output from running the program: leif$ LD_LIBRARY_PATH=/usr/local/Packages/gcc-4.4.0/lib/ ./crashex Couldn't open somen...@localhost:5432 2+2=0. *** glibc detected *** /home/leif/tmp/crashex: free(): invalid pointer: 0x081f3958 *** === Backtrace: = /lib32

Re: [GENERAL] Bug in ecpg lib ?

2009-07-08 Thread leif
is the way real daemon program was designed. Once again, thank you, Leif - "Albe Laurenz" wrote: > I wrote: > > What I notice about your program is that you connect to the > database > > in the main thread, then start a new thread and use the connection

Re: [GENERAL] Bug in ecpg lib ?

2009-07-09 Thread leif
ror. I'm pleased that it wasn't an ecpg bug, and I know now not to use mudflap for tracking my problem. Thanks for your big effort on this, Leif - "Albe Laurenz" wrote: > l...@crysberg.dk wrote: > > I have been trying to figure this thing out m

[GENERAL] ECPG Deallocate PREPARE statement - bug ?

2009-07-23 Thread leif
I noticed that it had generated an apparently correct ECPG_deallocate() call. Manually compiling this and linking the program turned out to be able to run on both the 8.3.5 and the 8.4.0 system without problems. Is this a bug in ecpg or am I doing something wrong ? Please advise, Leif -

[GENERAL] Connection name on ECPGdeallocate ?

2009-08-20 Thread leif
DEALLOCATE PREPARE statement. Is that a planned future feature ? At least for Postgresql-8.3.5, Postgresql-8.4.0 Leif -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] Delete trigger

2015-09-18 Thread Leif Jensen
actual doing the delete. Unfortunately this is not possible to do FOR EACH STATEMENT, and FOR EACH ROW would not give me the chance to check for NOT NULL. Any ideas ? Leif -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http

Re: [GENERAL] Delete trigger

2015-09-18 Thread Leif Jensen
Hi Charles, If I do "DELETE FROM devicegroup WHERE group=1" I do not want to delete anything. I only want to delete if I do "DELETE FROM devicegroup WHERE groupid=x AND ctrlid=y AND userid=z". I don't wanna let anyone delete more than 1 row at a time. Leif

Re: [GENERAL] Delete trigger

2015-09-18 Thread Leif Jensen
the DELETE statement. Leif - Original Message ----- > Leif Jensen wrote: > >If I do "DELETE FROM devicegroup WHERE group=1" I do not want to delete > >anything. I only want to > > delete if I do "DELETE FROM devicegroup WHERE groupid=x AND ctrlid=y A

Re: [GENERAL] Delete trigger

2015-09-18 Thread Leif Jensen
Hi Ioana and David. Thank you. Yes, I can see the problem. I will look into your suggestions. Leif - Original Message - > On Friday, September 18, 2015, Leif Jensen wrote: > > >Hello Laurenz, > > > >Thank you for you suggestion. I really wa

[GENERAL] Help on explain analyze

2010-11-26 Thread Leif Jensen
-> Seq Scan on task_info ti (cost=0.00..11.29 rows=429 width=12) (actual time=0.020..0.302 rows=429 loops=1) and tried various indexes on the two table 'task' and 'task_info' to help avoid the sequential scans, but

[GENERAL] Update rule on a view - what am I doing wrong

2013-01-18 Thread Leif Jensen
statement is executed, I get a 'duplicate key violation' on a record that has never been there. I am using PostgreSQL version 9.1.7 (running on Linux/Ubuntu 12.04). What am I doing wrong ? Please help, Leif DROP VIEW hcont; DROP TABLE icont; CREATE TABLE icont ( cid INTEGER,

Re: [GENERAL] Update rule on a view - what am I doing wrong

2013-01-22 Thread Leif Jensen
ecord for the parameter type. Could you please expand a little on your example ? Leif - "Jasen Betts" wrote: > On 2013-01-18, Leif Jensen wrote: > > >I have been fighting a problem with an update rule on a view. I > > have a view that combines two tables wh

Re: [GENERAL] Update rule on a view - what am I doing wrong

2013-01-22 Thread Leif Jensen
Hi Marc, Thanks a lot. That works fine. The names 'NEW' and 'OLD' works fine. Leif - "Marc Schablewski" wrote: > Hi Leif, > > Am 22.01.2013 14:34, schrieb Leif Jensen: > > > CREATE update_rule_func( old record, new record ) AS ..

[GENERAL] Rules on views - Changes from 8.4 to 9.1 ?

2013-01-28 Thread Leif Jensen
' and insert for 'on insert'). Have something basic things changed on the rule system and if so, where do I find information about it ? Please help, Leif -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http:

[GENERAL] ECPG SET CONNECTION

2013-05-31 Thread Leif Jensen
ble-thread-safety option. What should I believe ? Leif -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] Multithread problem: Error in transaction processing

2008-03-10 Thread Leif Jensen
either committed or rolled back. I have also made sure that there is no cross-thread use of connection, especially looking at the test output. Any ideas ? Leif -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org

Re: [GENERAL] Please Help! Was: Multithread problem: Error in transaction processing

2008-03-14 Thread Leif Jensen
on per thread.) As a workaround we close the database and reopen it when we get this error. Is this a normal/bug situation ? Any suggestions will be most welcome, Leif - Original Message - From: "Leif Jensen" <[EMAIL PROTECTED]> To: "Leif Jensen" <[EMA

[GENERAL] Server process crash - Segmentation fault

2014-05-06 Thread Leif Jensen
L from the postgres log and run it through psql and get the result I expect, so I don't see how it can be data related. Please help, Leif . . . 22864 2014-05-06 15:37:35.350 CEST LOG: statement: close execcurs 22864 2014-05-06 15:37:35.350 CEST LOG: statement: deallocate "ApplDBConn_

Re: [GENERAL] Server process crash - Segmentation fault

2014-05-06 Thread Leif Jensen
e use of the ApplDBConn_22854_f6adeb70_query, which has been used many many times before the log shown (167 in all to be exact ;-) ). Leif - Original Message - > On 05/06/2014 07:08 AM, Leif Jensen wrote: > > Hello. > > > > I was running PostgreSQL 9.1.4 w

Re: [GENERAL] Server process crash - Segmentation fault

2014-05-07 Thread Leif Jensen
Could it be related to the OFFSET part of the statement ? I have another query on the same table without OFFSET, which seems to work fine. Leif - Original Message - > Leif Jensen writes: > >Here is a gdb dump of the backtrace at the server process crash. > >

Re: [GENERAL] Server process crash - Segmentation fault

2014-05-08 Thread Leif Jensen
Hi Tom, I already compiled postgreSQL myself and now using 9.3.4, so I would very much like a patch. Where can I find that ? Leif - Original Message - > Leif Jensen writes: > >Could it be related to the OFFSET part of the statement ? I have > >another qu

Re: [GENERAL] Server process crash - Segmentation fault

2014-05-08 Thread Leif Jensen
Hello Tom, Adrian Thank you for your help and the patch. Things works nicely for me now :-). Leif - Original Message - > Adrian Klaver writes: > > On 05/08/2014 07:19 AM, Tom Lane wrote: > >> 9.3 patch is here: > >> http://git.postgresql.org

[GENERAL] ECPG selecting into char arrays

2011-05-19 Thread Leif Jensen
t to write more than the space allowed (why else have the array size and type size included as parameters in the ECPG generated output call to ECPGdo(...) ?). Is this a new "feature" ? With that note in mind, how do I select from a table field of type 'text' ? Leif --

[GENERAL] Postgres 8.3.5 - ECPG and the use of descriptors and cursors in multi-threaded programs

2011-05-23 Thread Leif Jensen
ary function, hence this question. Please help, 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] Postgres 8.3.5 - ECPG and the use of descriptors and cursors in multi-threaded programs

2011-05-25 Thread Leif Jensen
atement()' which of course doesn't find any because of the mismatch of name and connection, hence the error message. Is it really not possible to use 2 separate connection within 1 thread at the same time ? or is it an error in the ecpg library ? Please help, Leif - "

Re: [GENERAL] Postgres 8.3.5 - ECPG and the use of descriptors and cursors in multi-threaded programs

2011-05-30 Thread Leif Jensen
d connection for the ALLOCATE DESCRIPTOR statement even though it allows it ? Please help, Leif - "Bosco Rama" wrote: > Leif Jensen wrote: > > > > Is it really not possible to use 2 separate connection within 1 > thread > > at the same time ? or

Re: [GENERAL] Postgres 8.3.5 - ECPG and the use of descriptors and cursors in multi-threaded programs

2011-05-30 Thread Leif Jensen
PS.: That goes for the AT clause on the GET DESCRIPTOR statement too. The connection name is not included in the ECPGget_desc() call. - "Leif Jensen" wrote: > Hello Bosco, > >Thank you for your comment. Yes, it would be nice to get some more > comments on the al

[GENERAL] Process- or SessionID with ECPG

2010-07-01 Thread Leif Jensen
quot; ECPG?) or some other way to interrogate the ECPG system ? My program is multi-threaded. Leif -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] Open Source references

2010-07-09 Thread Leif Jensen
ed that kind of problems ? Leif -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] ECPG & threads

2010-08-23 Thread Leif Jensen
connection specific and whether this will change or not. Leif DB access module: . Db_Open( char *conn ) { EXEC SQL EXEC SQL BEGIN DECLARE SECTION; const char *dbname = _dbname; const char *dbuser = _dbuser; const char *_thisDbConn = conn; EXEC SQL

[GENERAL] Slave server: FATAL: incorrect checksum in control file

2009-01-16 Thread Leif Jensen
tl), I get the error 'FATAL: incorrect checksum in control file'. Both servers are running PostgreSQL-8.3.5, configured with exactly the same options (just prefix and ssl). Any ideas ? Greetings, Leif -- Sent via pgsql-general mailing list (pgsql-general@postgresq

Re: [GENERAL] Slave server: FATAL: incorrect checksum in control file

2009-01-16 Thread Leif Jensen
Sql on my 64bit (linux) box ? Leif - "Tom Lane" wrote: > Leif Jensen writes: > >So far I don't get any errors, but when I start postgres on the > slave (I'm using pg_ctl), I get the error 'FATAL: incorrect checksum > in control file'. > &g

Re: [GENERAL] Slave server: FATAL: incorrect checksum in control file

2009-01-16 Thread Leif Jensen
That is almost too simple ;-) Thanks for the suggestion, Leif - "Christopher Browne" wrote: > On Fri, Jan 16, 2009 at 9:18 PM, Leif Jensen > wrote: > > You are perfectly right, master is 32bit and slave is 64bit. I > didn't even consider tha

[GENERAL] Newbie question on RULEs .. or .. bug ?

2005-05-17 Thread Leif Jensen
SRC | 2WWE (5 rows) projtaskdb=# I tried to put an 'explain' in front of the update within the update rule, but got a syntax error. Why is that ? Please help, Leif SET SESSION AUTHORIZATION 'dba'; CREATE TABLE ganntinfo ( id integer NOT NULL,

Re: [GENERAL] Newbie question on RULEs .. or .. bug ?

2005-05-18 Thread Leif Jensen
eal table ? 2) If I need to use rules to do update/insert on tasks, how can I make it 'transparent' as in the above example (the update that does nothing) ? Greetings, Leif On Tue, 17 May 2005, Tom Lane wrote: > Leif Jensen <[EMAIL PROTECTED]> writes: > > CREATE R

[GENERAL] Recursive stored procedure in C.

2005-07-14 Thread Leif Jensen
?? (This 'if' was mainly to try to figure out what was going on, since I should not do an SPI_finish() at all until the very end.) Is such recursivity at all possible ? What are the pitfalls ? Any good examples out there? Any suggestions at all will be much appreciated, Lei

Re: [GENERAL] Recursive stored procedure in C.

2005-07-14 Thread Leif Jensen
Oops, I forgot to say that I have tried PostgreSQL 7.4.1, 7.4.6, and 7.4.7 all with the same result. I'm running this on a Linux (Slackware 10.0), kernel 2.6.10y. Leif On Thu, 14 Jul 2005, Leif Jensen wrote: > > Hi all, > >I am trying to make a stored procedure

Re: [GENERAL] Recursive stored procedure in C.

2005-07-14 Thread Leif Jensen
Hi Tom, Thank you for the suggestions. I didn't know anything about SPI_push and SPI_pop and I will walk through my code and stuff them in. Am I looking at some wrong documentation ? I never saw anything about those ? Do you know any good examples doing such things ? Leif On Th

Re: [GENERAL] Recursive stored procedure in C.

2005-07-14 Thread Leif Jensen
Hi again, Thanks. No changes on this 7.x.x -> 8.x.x ? .. and just to be sure: SPI_exec does the SPI_push/SPI_pop thing too ? Leif On Thu, 14 Jul 2005, Tom Lane wrote: > Leif Jensen <[EMAIL PROTECTED]> writes: > > Thank you for the suggestions. I didn

[GENERAL] Mambo/Joomla (CMS) on PostgreSQL ?

2005-11-17 Thread Leif Jensen
dards are much more of a concern. Any comments are very welcome. It could be some rather small thing that will "tip the cup". Greetings, Leif ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq

[GENERAL] Mambo (CMS) & PostgreSQL

2005-11-20 Thread Leif Jensen
Hi all, Anyone using the CMS called Mambo with PostgreSQL ? Leif ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your

Re: [GENERAL] Mambo (CMS) & PostgreSQL

2005-11-20 Thread Leif Jensen
Hi Peter, Good to hear, and now the real question(s): What version of Mambo (and PostgreSQL) are you using and did you have to make many patches? How about 'standard' plugins (as well as 3rd party plugins), will they work without problems ? Thank you for you patience, Lei

[GENERAL] ftp download won't work

2006-02-06 Thread Leif Jensen
. I have also tried bittorrent, but I'm very new to that (never done that before) and couldn't make it work either. Is there any chance of finding somewhere to do an http download ? Greetings, Leif, a happy PostgreSQL'er ---(e

Re: [GENERAL] Advantages of PostgreSQL over MySQL 5.0

2006-03-25 Thread Leif Jensen
ed on MySql. I would love to make it use PostgreSQL instead (to ease maintenance, backup, administration, etc.) Does anyone know where to get help/info on this ? Thanks for a good product and a good discusion, Leif On Wed, 22 Mar 2006, Jimbo1 wrote: > Hello there, > > I'm a freelan

Re: [GENERAL] Best open source tool for database design / ERDs?

2006-06-01 Thread Leif Jensen
Hi, tedia2sql will do the job: http://tedia2sql.tigris.org Greetings, Leif On Thu, 1 Jun 2006 [EMAIL PROTECTED] wrote: > Anyone know if DIA will generate CREATE TABLE statements from an ER > diagram? > > I'd like to have a program where I can create my db design,

[GENERAL] cascading replication and replication_slots

2015-06-23 Thread Leif Gunnar Erlandsen
Is it possible to use a replication_slot for a downstream-server when setting up cascading replication on 9.4 Leif G. Vennlig hilsen/ Best regards -- LEIF GUNNAR ERLANDSEN Senior Database Consultant BASEFARM | Nydalen Allé 37a | 0484 Oslo | Norway Phone: +47 4000 4100 | Mobile: +47

Re: [GENERAL] cascading replication and replication_slots

2015-06-23 Thread Leif Gunnar Erlandsen
>Fra: Michael Paquier >Sendt: 23. juni 2015 13:32 >On Tue, Jun 23, 2015 at 8:18 PM, Leif Gunnar Erlandsen > wrote: >> Is it possible to use a replication_slot for a downstream-server when >> setting up cascading replication on 9.4 >Yes. Just be careful that r

[GENERAL] cascading replication and replication slots.

2015-06-23 Thread Leif Gunnar Erlandsen
Is it possible to use a replication_slot for a downstream-server when setting up cascading replication on 9.4 Leif G.

Re: [GENERAL] Stored Procedures and Functions

2007-06-02 Thread Leif B. Kristensen
he difference between a Stored Procedure > and a function. Pascal has functions and procedures. C has only functions. That doesn't say anything about the relative usability of each language. Those are just names. -- Leif Biberg Kristensen | Registered Linux User #338009 http://solumslekt.

Re: [GENERAL] Transactional DDL

2007-06-02 Thread Leif B. Kristensen
l convention? > >Did I miss something? What does "stored procedures" have to do with > "Transactional DDL"? I believe that he posted this in reply to the "Stored procedures and functions" thread. It kind of fits in there. -- Leif Biberg Kristensen | Re

Re: [GENERAL] psql : Error: Cannot stat /pgdata/8.2/main

2007-06-13 Thread Leif B. Kristensen
avior of Debian's wrapper >patches, and a complaint directed there is the next step for you. FWIW, 'Cannot stat' is usually coming from the cp command, and indicates that it can't find the source file. -- Leif Biberg Kristensen | Registered Linux User #338009 http://solumslekt

Re: [GENERAL] PHP sucks!! - was: persistent db connections in PHP

2007-06-16 Thread Leif B. Kristensen
S's are good for. The Java droids and the Ruby fanbois, for instance, seem to prefer fetching single values from the db, and then do the entire logic in their own software. >It doesn't. However, many average joes who find PHP accessible and >therefore usable, do suck rocks. Th

Re: [GENERAL] Linux distro

2007-08-01 Thread Leif B. Kristensen
in 2002 ran Debian Woody. I kept it running until it died from old age a couple of years ago. Later I fell in love with Gentoo. But if I'd have to run a server with maximum stability and uptime, I think that I'd still prefer Debian. -- Leif Biberg Kristensen | Registered Linux User #3380

Re: [GENERAL] how do i get num of recs inserted/deleted/updated in plpgsql

2007-08-01 Thread Leif B. Kristensen
ith LAST_OID to fetch the OID of the last INSERT statement, if it had an OID. If the table did not have OIDS, it returns 0. Contributors: Vilson farias vilson.farias at digitro.com.br, Darren Ferguson darren at crystalballinc.com, Dennis Gearon gearond at cvc.net 8<- -- Leif Bi

[GENERAL] Modified FIFO queue and insert rule

2007-08-08 Thread Leif B. Kristensen
D id <> NEW.id) OR id NOT IN (SELECT id FROM recent_places ORDER BY id DESC LIMIT 10); When I try to use the commented clause above, no records are written to the table at all! Why? -- Leif Biberg Kristensen | Registered Linux User #338009 http://solumslekt.org/ | Cruising with G

Re: [GENERAL] Modified FIFO queue and insert rule

2007-08-08 Thread Leif B. Kristensen
On Wednesday 8. August 2007 15:12, Alban Hertroys wrote: >Leif B. Kristensen wrote: >> CREATE RULE placelimit AS >> ON INSERT TO recent_places DO ALSO >> DELETE FROM recent_places >> WHERE >> -- this clause doesn't work >> -- (

Re: [GENERAL] Modified FIFO queue and insert rule

2007-08-09 Thread Leif B. Kristensen
verything is already wrapped up in a transaction anyway, there's no real problem with this. But I'd still like to understand how to do it 'properly' inside the DB. -- Leif Biberg Kristensen | Registered Linux User #338009 http://solumslekt.org/ | Cruising with Gentoo/

Re: [GENERAL] Customizing psql console to show execution times

2007-08-15 Thread Leif B. Kristensen
gslekt=> \timing Timing is off. pgslekt=> -- Leif Biberg Kristensen | Registered Linux User #338009 http://solumslekt.org/ | Cruising with Gentoo/KDE My Jazz Jukebox: http://www.last.fm/user/leifbk/ ---(end of broadcast)--- TIP 3: Have you ch

Re: [GENERAL] pg_dump on local Windows, pg_restore on Linux?

2007-08-15 Thread Leif B. Kristensen
here's nothing you can do about it in a live database. IMO that's a little awkward, and is what finally made me change the global from ISO-8859-1 to UTF-8 on my three Gentoo Linux machines. -- Leif Biberg Kristensen | Registered Linux User #338009 http://solum

Re: [GENERAL] pg_dump on local Windows, pg_restore on Linux?

2007-08-15 Thread Leif B. Kristensen
TION="nb_NO.UTF.8" To update the environment settings globally, the Gentoo method is to issue the command "env-update && source /etc/profile" from root. But you should really Read The Fine Manual about this. If you for instance have filenames with non-ASCII charact

Re: [GENERAL] any way for ORDER BY x to imply NULLS FIRST in 8.3?

2007-11-09 Thread Leif B. Kristensen
t. Which mainly goes to show that ORM is broken by design :-) -- Leif Biberg Kristensen | Registered Linux User #338009 http://solumslekt.org/ | Cruising with Gentoo/KDE My Jazz Jukebox: http://www.last.fm/user/leifbk/ ---(end of broadcast)--- TIP

Re: top posting (was: [GENERAL] Hijack!)

2007-12-11 Thread Leif B. Kristensen
that a well-formed inline posting is more likely to attract intelligent replies. I don't think that I'm the only one who tends to skip top posting replies on mailing lists. -- Leif Biberg Kristensen | Registered Linux User #338009 http://solumslekt.org/ | Cruising with Gentoo/KDE My J

Re: [GENERAL] Hijack!

2007-12-12 Thread Leif B. Kristensen
m >> with Perl 5's subroutines is that they're not crufty enough, so the >> cruft leaks out into user-defined code instead, by the Conservation >> of Cruft Principle." (Larry Wall, Apocalypse 6) >> >> ---(end of >> broadcast)--- TI

Re: [GENERAL] constraints in table

2008-01-23 Thread Leif B. Kristensen
2/static/app-psql.html As for a starter, try to write "\d tablename" from the psql prompt. -- Leif Biberg Kristensen | Registered Linux User #338009 http://solumslekt.org/ | Cruising with Gentoo/KDE My Jazz Jukebox: http://www.last.fm/user/leifbk/ --

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

2010-10-28 Thread Leif Biberg Kristensen
27;abc' and so on. If I understand you correctly, you can assign the SQL string to a variable x, and then do a RAISE NOTICE 'Query is: %', x regards, Leif B. Kristensen -- 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] 8.4 Data Not Compatible with 9.0.1 Upgrade?

2010-11-02 Thread Leif Biberg Kristensen
amed /8.3, /8.4, /9.0, and so on, and then a new /data directory under each one. That way, you can safely remove the old data when you've confirmed that the new version actually works. regards, Leif B. Kristensen -- 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 do you control IMMUTABLE PG PROC results?

2010-11-04 Thread Leif Biberg Kristensen
ify the database and is guaranteed to return the same results given the same arguments forever.» regards, Leif B. Kristensen -- 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] Full Vacuum/Reindex vs autovacuum

2010-11-08 Thread Leif Biberg Kristensen
comes bloated for some reason, I just do a dump/drop/reload cycle. It's done in a few seconds. regards, Leif B. 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] Adding data from mysql to postgresql periodically

2010-11-14 Thread Leif Biberg Kristensen
new records to the > postresql? It should be trivial to write a Perl script that pulls the data from MySQL, inserts them into PostgreSQL, and then goes to sleep for 60 seconds. regards, Leif B. Kristensen -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes

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: <http://search.cpan.org/dist/DBD-Pg/Pg.pm>

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

2010-11-14 Thread Leif Biberg Kristensen
ight want to take a stab at the solution. If you can tell what the data looks like coming from MySQL, and the corresponding table structure in PostgreSQL, you may well get a much more detailed reply. regards, Leif B. Kristensen -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org)

Re: [GENERAL] Copy From suggestion

2010-12-20 Thread Leif Biberg Kristensen
pled «Professional» or «Enterprise» version costing an arm and a leg? ;) regards, Leif B. Kristensen -- 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] Root user commands

2010-12-22 Thread Leif Biberg Kristensen
l user isn't allowed to do, like modifying system files. The 'database_service.pl' is a Perl script. Perl is a fairly default installation on *nix systems, there also exist builds for Windows. I used the Komodo flavor way back when. regards, Leif -- Sent via pgsql-general mailing li

Re: [GENERAL] Restore problem

2010-12-29 Thread Leif Biberg Kristensen
avorite editor was EditPlus (http://www.editplus.com/). It isn't free, but well worth the 35 bucks. As a rather casual coder, I'm very satisfied with the simple editor Kwrite in KDE. It's a sheer delight compared to Notepad. regards, Leif -- Sent via pgsql-general mailing list

Re: [GENERAL] UUID column as pimrary key?

2011-01-05 Thread Leif Biberg Kristensen
help thinking of the «Birthday Paradox»: http://en.wikipedia.org/wiki/Birthday_problem 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] ..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] ..horribly documented, inefficient, user-hostile, impossible to maintain interpreted language..

2011-04-04 Thread Leif Biberg Kristensen
Documentation here: <http://solumslekt.org/blog/?p=23> 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 composite types within PLPGSQL Function

2013-01-08 Thread Leif Biberg Kristensen
solumslekt.org/blog/?p=91 for an example of composite types and functions. 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] Can't Drop Role

2013-03-08 Thread Leif Gunnar Erlandsen
You should alter owner of the functions. Try "alter function function_name owner to new_owner; 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] Money casting too liberal?

2013-03-31 Thread Leif Biberg Kristensen
Law: As an online discussion grows longer, the probability of someone trying to unsubscribe by posting a reply to the discussion approaches one. 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] Storing Special Characters

2013-05-14 Thread Leif Biberg Kristensen
rough pg_query in PHP, I get: > > PHP Warning: pg_query(): Query failed: ERROR: invalid byte sequence for > encoding "UTF8": 0xa3 It's possibly a client encoding problem. See the PHP documentation on http://php.net/manual/en/function.pg-set-client-encoding.php regard

Re: [GENERAL] Slow query and using wrong index, how to fix? Probably naive question..

2013-05-22 Thread Leif Gunnar Erlandsen
om history where (lookup = 'phone' and lookupid = '672') union select history.id, history.created, creator, contact, history.type, lookup, lookupid, value from history where creator = '790' Leif Gunnar Erlandsen

Re: [GENERAL] coalesce function

2013-06-20 Thread Leif Biberg Kristensen
27;' ) for which > coalesce is not working, is there any workaround or other function > available in postgresql, please do let me know. CASE WHEN firstname NOT IN (NULL, '') THEN firstname ELSE lastname END; regards, Leif -- Sent via pgsql-general mailing list (pg

Re: [GENERAL] a newbie question on table design

2008-02-15 Thread Leif B. Kristensen
y rows(40 times of the former one) and waste a lot > space. > >Which one is better, or there are some other smart ways ? > >I have another question. Since the data I need to save is huge, is it >appropriate that I save the data value in compressed format ? That sounds a lot like p

Re: [GENERAL] Unicode comment on Postgres vs Sql Server

2008-03-02 Thread Leif B. Kristensen
in ASCII, it's exactly the same thing. It's one byte per character unless the character number is above 127. -- Leif Biberg Kristensen | Registered Linux User #338009 http://solumslekt.org/ | Cruising with Gentoo/KDE My Jazz Jukebox: http://www.last.fm/user/leifbk/

Re: [GENERAL] postgre vs MySQL

2008-03-14 Thread Leif B. Kristensen
will consider the DBMS as a dumb storage engine. With that attitude, combined with the fact that most ORM frameworks are written mainly for MySQL, it's no wonder that PostgreSQL doesn't make many inroads here. -- Leif Biberg Kristensen | Registered Linux User #338009 http://solumslekt.or

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

2008-03-26 Thread Leif B. Kristensen
gt;"apt-get install". > >Anyone else like this approach? I'll second that. It would be much easier on the brain, as you might issue a "pg --help" if you don't remember the exact syntax or even the name of each command. -- Leif Biberg Kristensen | Registered Li

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

2008-03-27 Thread Leif B. Kristensen
apitals for db stuff, small letters for user stuff. -- Leif Biberg Kristensen | Registered Linux User #338009 http://solumslekt.org/ | Cruising with Gentoo/KDE My Jazz Jukebox: http://www.last.fm/user/leifbk/ -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make chan

Re: [GENERAL] PL/pgSQL Documentation, biblio, etc

2008-03-28 Thread Leif B. Kristensen
ther useful: http://www.onlamp.com/pub/a/onlamp/2006/05/11/postgresql-plpgsql.html hth, hand. -- Leif Biberg Kristensen | Registered Linux User #338009 http://solumslekt.org/ | Cruising with Gentoo/KDE My Jazz Jukebox: http://www.last.fm/user/leifbk/ -- Sent via pgsql-general mailing list (pgsql-general@

Re: [GENERAL] simple update queries take a long time - postgres 8.3.1

2008-04-03 Thread Leif B. Kristensen
On Wednesday 2. April 2008, Tomasz Ostrowski wrote: >Go for it. Even 64 (I like round numbers) would not be too much. Geek test: Do you find the above statement odd? Yes: 0, No: +10. (Sorry for being massively off-topic :-)) -- Leif Biberg Kristensen | Registered Linux User #338009 h

Re: [GENERAL] writing a function without installing a language

2008-05-17 Thread Leif B. Kristensen
sandbox=> create function foo(text,text,text) returns text as $$ sandbox$> select $1 || ', ' || $2 || ', and ' || $3 sandbox$> $$ language sql stable; CREATE FUNCTION sandbox=> select foo('x','y','z'); foo - x,

[GENERAL] REGEXP_REPLACE woes

2008-06-10 Thread Leif B. Kristensen
[=1242|John Smith] (1 row) What am I doing wrong? PostgreSQL 8.2.7 on i686-pc-linux-gnu BTW. -- Leif Biberg Kristensen | Registered Linux User #338009 http://solumslekt.org/ | Cruising with Gentoo/KDE My Jazz Jukebox: http://www.last.fm/user/leifbk/ -- S

Re: [GENERAL] REGEXP_REPLACE woes

2008-06-10 Thread Leif B. Kristensen
.+?)\\]', E'\\2'); regexp_replace --- John Smith (1 row) >Caution: this method doesn't do HTML entity escaping so if your >input isn't trustworthy then you could end up with HTML that's

Re: [GENERAL] REGEXP_REPLACE woes

2008-06-10 Thread Leif B. Kristensen
e Doe]'); link_expand --- John Smith] and [p=456|Jane Doe (1 row) Hey, I told it not to be greedy, didn't I? -- Leif Biberg Kristensen | Registered Linux User #338009 http://solumslekt.org/ | Cruising with Gentoo/KDE My Jazz Jukebox: http://www.last.fm

  1   2   3   >