[GENERAL] Retrieve the record ID
Hi all. I'm new to this list and, first of all, I'm a new user of PostgreSQL. The version I'm using is 8.2.3 and I've the necessity to retrieve, using an application, the ID of a modified (INSERT, UPDATE, DELETE) record of a triggered table. I wasn't able to find out a way to obtain the required ID. The only information available outside of the DBMS and usable by my app (subscribed for a significant event) are the table name and the server process id. The application is running on Windows XP and the server is installed on Windows Server 2003. Any one knows a way to notify my app with the ID of the modified record? Any idea is appreciated. Thanks in advance. Luca _ Watch all 9 Live Earth concerts live on MSN. http://liveearth.uk.msn.com ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq
Re: [GENERAL] Retrieve the record ID
Yes, I've used RAISE NOTICE, but I'm unable to catch it in my code. I've used PQsetNoticeProcessor to set my callback function but doesn't seem to work. In My application I'm unable to catch the notice launched by the trigger. Wich function I have to use in my application in order to catch the notice event? Luca. From: Kenneth Downs <[EMAIL PROTECTED]> To: Luca Ciciriello <[EMAIL PROTECTED]> CC: pgsql-general@postgresql.org Subject: Re: [GENERAL] Retrieve the record ID Date: Fri, 20 Jul 2007 08:49:33 -0400 We have a system that sends back information by using the RAISE NOTICE. I've taken two lines out of it and put them here to illustrate the idea. You may have to play with it to get it right: NotifyList = 'The OID is: ' || CAST(new.oid as varchar(10)) || ';'; RAISE NOTICE '%',NotifyList; Luca Ciciriello wrote: Hi all. I'm new to this list and, first of all, I'm a new user of PostgreSQL. The version I'm using is 8.2.3 and I've the necessity to retrieve, using an application, the ID of a modified (INSERT, UPDATE, DELETE) record of a triggered table. I wasn't able to find out a way to obtain the required ID. The only information available outside of the DBMS and usable by my app (subscribed for a significant event) are the table name and the server process id. The application is running on Windows XP and the server is installed on Windows Server 2003. Any one knows a way to notify my app with the ID of the modified record? Any idea is appreciated. Thanks in advance. Luca _ Watch all 9 Live Earth concerts live on MSN. http://liveearth.uk.msn.com ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq -- Kenneth Downs Secure Data Software, Inc. www.secdat.comwww.andromeda-project.org 631-689-7200 Fax: 631-689-0527 cell: 631-379-0010 _ The next generation of Hotmail is here! http://www.newhotmail.co.uk/ ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match
[GENERAL] PQntuples return type
Hi All. My question is simple: can the function PQntuples returns a negative integer? I've found in the PostgreSQL manual the following definition: Returns the number of rows (tuples) in the query result. int PQntuples(const PGresult *res); So, my doubt is: if the return type is int instead of unsigned int, is this function testable for negative return values? Thanks in advance. Luca _ The next generation of Hotmail is here! http://www.newhotmail.co.uk ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq
[GENERAL] Installation problem
Hi. I\'m trying to install PostgreSQL 8.2.3 on WindowsXP SP2 Media Center (2005 edition). I\'m administrator on this machine, but at the end of the installation process it fails reporting the following error: \"Unable to start the service. You must have Administrator rights\". Then the installation ends. I\'ve already converted the file system from FAT32 to NTSC (solving another PostgreSQL problem). Any ideas to solve this problem? Thanks in advance. Luca -- Email.it, the professional e-mail, gratis per te: http://www.email.it/f Sponsor: Conto Arancio: 4,50% sino a marzo 2008 Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=6742&d=20070808
[GENERAL] PostgreSQL and cluster
Hi. Anybody know if is possible to install PostgreSQL in cluster mode on a cluster formed by two windows server 2003 cluster? Luca -- Email.it, the professional e-mail, gratis per te: http://www.email.it/f Sponsor: Vivi i MONDIALI di ATLETICA di TOKYO da protagonista. Compra on line i prodotti ufficiali della Nazionale Italiana FIDAL. Vestiti di azzurro Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=6907&d=20070808
Re: [GENERAL] PostgreSQL and cluster
Thanks, setting it up as generic service make the clustering procedure to work fine, but I'm still unable to relocate the data directory. We have copied the DATA directory in the right path, but which variables I must change? I've changed the variable about the path (now I'm not in the office and don't remember the name) in the file PostgreSQL.conf, but nothing is changed. Luca - Original Message Da: Magnus Hagander <[EMAIL PROTECTED]> To: Cc: pgsql-general@postgresql.org Oggetto: Re: [GENERAL] PostgreSQL and cluster Data: 08/08/07 15:41 > > > > On Wed, Aug 08, 2007 at 01:03:54PM +0200, [EMAIL PROTECTED] wrote: > > Hi. > > Anybody know if is possible to install PostgreSQL in cluster mode on a > > cluster formed by two windows server 2003 cluster? > > Yes. Set it up as a generic service, and make sure you store the data > directory (and any other tablespaces) on disks that the service depends on. > > //Magnus > > ---(end of broadcast)--- > TIP 2: Don't 'kill -9' the postmaster > > > -- Email.it, the professional e-mail, gratis per te: http://www.email.it/f Sponsor: Non perderti nella giungla di facili promesse, Logos ti da credito sempre! Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=6559&d=20070808 ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings
[GENERAL] Installation problems
Hi all. I post it again, not sure to have posted it correctly the last time. My problem is about installing PostgreSQL 8.2.3 on WIndows XP Mediacenter. At the end of the installation, I get the following error: "unable to start the service. Administrator right required". Obviously I'm Administrator on my machine (I've cecked it). My question is. "Exists a particolar version of PostgreSQL to download for Windows XP Mediacenter?" Any Idea is appreciated. Thanks in advance. Luca. -- Email.it, the professional e-mail, gratis per te: http://www.email.it/f Sponsor: Viaggi, voli, soggiorni...cattura l'offerta e parti con Mondolastminute Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=6850&d=20070820 ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org/
Re: [GENERAL] Installation problems
No. Because after the error I've got, the installation rools back and also the service "PostgreSQL Database Server 8.2" is uninstalled. Thanks anyway. Luca. - Original Message Da: Andrei Kovalevski <[EMAIL PROTECTED]> To: Cc: pgsql-general@postgresql.org Oggetto: Re: [GENERAL] Installation problems Data: 20/08/07 13:46 > > > > Hi! > > [EMAIL PROTECTED] wrote: > > Hi all. > > I post it again, not sure to have posted it correctly the last time. > > > > My problem is about installing PostgreSQL 8.2.3 on WIndows XP Mediacenter. > > At the end of the installation, I get the following error: "unable to start > > the service. Administrator right required". > > > Did you try to start the service manually from Start -> Administrative > Tools -> Services -> PostgreSQL Database Server 8.2? > > > Obviously I'm Administrator on my machine (I've cecked it). > > My question is. "Exists a particolar version of PostgreSQL to download for > > Windows XP Mediacenter?" > > > > Any Idea is appreciated. > > > > Thanks in advance. > > > > Luca. > > -- > > Email.it, the professional e-mail, gratis per te: http://www.email.it/f > > > > Sponsor: > > Viaggi, voli, soggiorni...cattura l'offerta e parti con Mondolastminute > > Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=6850&d=20070820 > > > > > > > > ---(end of broadcast)--- > > TIP 4: Have you searched our list archives? > > > >http://archives.postgresql.org/ > > > > > ---(end of broadcast)--- > TIP 4: Have you searched our list archives? > >http://archives.postgresql.org/ > > > -- Email.it, the professional e-mail, gratis per te: http://www.email.it/f Sponsor: Basilea 2: impara come calcolare il rating della tua azienda con questo pratico videocorso Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=6930&d=20070820 ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq
[GENERAL] PostgreSQL and Crystal Report
Hi All. I\'ve the necessity to use Crystal Report in my C++ project to report (in PDF) some PostgreSQL table. Any idea how to implement this functionality in my C++ project, or where I can find some useful CR documentation? All the Crystal Report documentation I found is about VisualBasic or C# API. Thanks in advance. Luca. -- Email.it, the professional e-mail, gratis per te: http://www.email.it/f Sponsor: Prestiti da 1.500 a 30.000 Euro. Clicca qui per un preventivo immediato, richiedi subito limporto e la rata che desideri, con Prometeo basta un clic! Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=6918&d=20070905
[GENERAL] using libpq.lib in Microsoft C++ (managed)
Hi All. I've the necessity to call some functions of libpq.lib from my code. The problem is that my code is Managed C++ (as defined by Microsoft VisualStudio 2005). Managed C++ has a very special memory management and I don't know if using libpq.lib (an old C library) is a safe procedure. I've Already had problems using libpq.lib in a multi-threaded standard C++ and so I'm quite doubtful that all will work fine in Managed C++. Has some one had experience concerning my doubts? Thanks in advance. Luca -- Email.it, the professional e-mail, gratis per te: http://www.email.it/f Sponsor: In REGALO un GIOCO! Scegli GPBikes 3D,Bubble Boom, Rock City Empire Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=6732&d=20071024
[GENERAL] BEGIN strange behaviour
Hi All. I've sperimented a strange behaviour using the command BEGIN and COMMIT in a multi-threaded Linux environment. In one of the two thread I use I've got the following message after PQexec(myconn, "BEGIN;"); WARNING: there is already a transaction in progress And after the command PQexec(myconn, "COMMIT;"); (always in the same thread) I've got the message WARNING: there is no transaction in progress. After these warnings the elaboration is freezing when the next PQexec is encoutered. I have the same behaviour even if the second thread is operating on a different table than the first thread. The same commands (inside the same code) runs fine in Windows and in MacOS X. Any Idea? Thanks in advance. Luca. -- Email.it, the professional e-mail, gratis per te: http://www.email.it/f Sponsor: Prova 1bitmore Newsletter il servizio per creare newsletter in modo semplice e veloce, senza bisogno di conoscenze di grafica o di programmazione. Gratis per 30 giorni! Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=7243&d=20071122 ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org/
Re: [GENERAL] BEGIN strange behaviour
Yes, there is a different connection for each thread :-( Luca. - Original Message Da: Martijn van Oosterhout <[EMAIL PROTECTED]> To: Cc: pgsql-general@postgresql.org, [EMAIL PROTECTED] Oggetto: Re: [GENERAL] BEGIN strange behaviour Data: 22/11/07 15:25 > > On Thu, Nov 22, 2007 at 02:10:49PM +0100, [EMAIL PROTECTED] wrote: > > Hi All. > > I've sperimented a strange behaviour using the command BEGIN and COMMIT in a > > multi-threaded Linux environment. > > In one of the two thread I use I've got the following message after > > PQexec(myconn, "BEGIN;"); > > You do have different database connections for each thread, right? > Otherwise that's why it's not working... > > Have a nice day, > -- > Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > > Those who make peaceful revolution impossible will make violent revolution inevitable. > > -- John F Kennedy > > > > -- Email.it, the professional e-mail, gratis per te: http://www.email.it/f Sponsor: In REGALO 'All the Good Thing' di NELLY FURTADO Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=6616&d=20071122 ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly
[GENERAL] limits
Hi All. My question is simple and plain: Are there some limit in the number of database operations between a BEGIN statement and a COMMIT statement? Thanks in advance. Luca -- Email.it, the professional e-mail, gratis per te: http://www.email.it/f Sponsor: Un look da modella in pochi secondi, consigliato da Hunter Tylo Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=7111&d=20071204 ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster
[GENERAL] Orthodox use of PQtransactionStatus
Hi All. Does somebody know where (some internet sites or sample code) I can achieve a good understanding in the use of the status PQTRANS_IDLE, PQTRANS_ACTIVE, PQTRANS_INTRANS, PQTRANS_INERROR, PQTRANS_UNKNOWN using the lib function PQtransactionStatus? I need to use this flags in order to discipline some BEGIN-COMMIT blocks in a multithreading Windows/Linux environment. Each thread uses a separate db connection and shouldn't have any interaction with the other threads, but I still have messages as "WARNING: There is already a transaction in progress" and "WARNING: There is no transaction in progress". A further information is that the DB operation involved in each thread is a store in a table. This table is the same for each thread. Thanks in advance. Luca. -- Email.it, the professional e-mail, gratis per te: http://www.email.it/f Sponsor: PARTI CON TODOMONDO: occasioni speciali a prezzi straordinari, fino al 50% di sconto su voli e viaggi! Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=7277&d=20071206 ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org/
[GENERAL] POSIX and libpq
Hi list. Does someone know if there is some kind of incompatibility between POSIX (glibc 2.4) and libpq (postgres 8.2) on Linux RedHat 5.0? Thanks in advance Luca -- Email.it, the professional e-mail, gratis per te: http://www.email.it/f Sponsor: In REGALO 'All the Good Thing' di NELLY FURTADO Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=6617&d=20071211 ---(end of broadcast)--- TIP 6: explain analyze is your friend
Re: [GENERAL] POSIX and libpq
Sorry, my information was not complete. The Linux version is Linux AS 5.0 Enterprise Luca - Original Message Da: Richard Huxton <[EMAIL PROTECTED]> To: Cc: pgsql-general@postgresql.org Oggetto: Re: [GENERAL] POSIX and libpq Data: 11/12/07 19:36 > > > > [EMAIL PROTECTED] wrote: > > Hi list. > > > > Does someone know if there is some kind of incompatibility between POSIX > > (glibc 2.4) and libpq (postgres 8.2) on Linux RedHat 5.0? > > Do you really mean RedHat 5.0 - the one released in 1997? > > -- >Richard Huxton >Archonet Ltd > > ---(end of broadcast)--- > TIP 9: In versions below 8.0, the planner will ignore your desire to >choose an index scan if your joining column's datatypes do not >match > > > -- Email.it, the professional e-mail, gratis per te: http://www.email.it/f Sponsor: Fai squillare la PANTERA ROSA sul tuo cellulare: e' in REGALO Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=6613&d=20071211 ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq
Re: [GENERAL] POSIX and libpq
I've a multithread application running on Linux. In each thread i've a loop performing a single INSERT operation on the DB. Sometimes (not always), two of the three thread die apparently without any reason. The strange thing is that if I remove the store operation from the threads, all runs fine. Viceversa, if I run the INSERT loops out of the threads all runs the DB operation are executed without any problems. On Linux I'm super user and I create the three thread using the posix function pthread_create. The same code, on windows, doesn't present any problem (in windows I use CreateThread function). That is all. Luca - Original Message Da: Richard Huxton <[EMAIL PROTECTED]> To: Cc: pgsql-general@postgresql.org Oggetto: Re: [GENERAL] POSIX and libpq Data: 11/12/07 21:31 > > > > [EMAIL PROTECTED] wrote: > >>> Does someone know if there is some kind of incompatibility between > > POSIX > >>> (glibc 2.4) and libpq (postgres 8.2) on Linux RedHat 5.0? > >> Do you really mean RedHat 5.0 - the one released in 1997? > > > Sorry, my information was not complete. > > The Linux version is Linux AS 5.0 Enterprise > > Seems unlikely that it wouldn't compile on RH's latest enterprise system. > > What problems are you encountering? > > -- >Richard Huxton >Archonet Ltd > > ---(end of broadcast)--- > TIP 9: In versions below 8.0, the planner will ignore your desire to >choose an index scan if your joining column's datatypes do not >match > > > -- Email.it, the professional e-mail, gratis per te: http://www.email.it/f Sponsor: Fiorucci Pin-Up Collection: scopri le nuove fragranze e...vinci 1000 Euro di shopping in limousine! Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=7262&d=20071212 ---(end of broadcast)--- TIP 6: explain analyze is your friend
Re: [GENERAL] hyperthreading and pqlib
The Postgres version is 8.2.4 and seems that the operating system is not affected by this application freezing. Thanks.Luca.- Original Message Da: "Bruce Momjian" <[EMAIL PROTECTED]> To: Cc: pgsql-general@postgresql.orgOggetto: Re: [GENERAL] hyperthreading and pqlib Data: 08/02/08 18:14 [EMAIL PROTECTED] wrote: > Hi all. > Has someone encountered a problem using pqlib in a multi-threading > application (POSIX or Win32) when the Intel Hyperthreading is enabled? > Disabling the hyperthreading option from the bios of the computer all works > fine, otherwise the threaded application does freeze randomically after a > while (This behaviour is common to Linux and WIndows version of the > multi-threaded application).Any idea?Thanks in advance.Luca. What version of Postgres? Does the application freeze or the operating system? We have not heard similar reports. We don't actually recommend hyperthreading usually. -- Bruce Momjian <[EMAIL PROTECTED]>http://momjian.us EnterpriseDB http://postgres.enterprisedb.com + If your life is a hard drive, Christ can be your backup. + -- Email.it, the professional e-mail, gratis per te: http://www.email.it/f Sponsor: A San Valentino HIT damore e teneri Sfondi per il tuo cell. Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=7548&d=20080208
[GENERAL] hyperthreading and pqlib
Hi all. Has someone encountered a problem using pqlib in a multi-threading application (POSIX or Win32) when the Intel Hyperthreading is enabled? Disabling the hyperthreading option from the bios of the computer all works fine, otherwise the threaded application does freeze randomically after a while (This behaviour is common to Linux and WIndows version of the multi-threaded application).Any idea?Thanks in advance.Luca. -- Email.it, the professional e-mail, gratis per te: http://www.email.it/f Sponsor: Quanti possono essere i tuoi potenziali clienti? Scoprilo subito con il servizio di Email Marketing di Email.it Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=7484&d=20080208
[GENERAL] selective backup and restore
Hi All. Is it possible in postgreSQL 8.2.4, using pg_dump.exe, make a backup/restore conditioned to the key of some tables (respectingexisting constraints)? I'm using Windows Xp and Windows Server 2003.Thanks in advance.Luca. -- Email.it, the professional e-mail, gratis per te: http://www.email.it/f Sponsor: Polizze per vacanze e settimane bianche. Acquista online! Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=7598&d=20080221
[GENERAL]
Hi All. Anyone knows if rebuilding the postgresql sources with the flag --without-tcl --without-perl in ./configure filecan prevent the correct use of the triggers wrote in plpgsql language? Wich behaviour I've to expect in postgres using these flags?Thanks in advance.Luca -- Email.it, the professional e-mail, gratis per te: http://www.email.it/f Sponsor: Polizze per vacanze e settimane bianche. Acquista online! Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=7598&d=20080222
[GENERAL] configure build flags
Hi All. Anyone knows if rebuilding the postgresql sources with the flag --without-tcl --without-perl in ./configure filecan prevent the correct use of the triggers wrote in plpgsql language? Wich behaviour I've to expect in postgres using these flags?Thanks in advance.LucaEmail.it, the professional e-mail, gratis per te: clicca qui Sponsor:Polizze per vacanze e settimane bianche. Acquista online! Clicca qui -- Email.it, the professional e-mail, gratis per te: http://www.email.it/f Sponsor: RILASSATINAVIGA CON NOI SU UN MARE DI OFFERTE E NOVITA'!!! www.grandinettisport.com Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=7509&d=20080222
[GENERAL] LOCK TABLE HELP
Hi All. I'm using for the first time the postgres lock utilities, but brobably I'm doing something of not legal.My action are:void *Execute(void *pParam){ string tableLock = "BEGIN WORK;"; tableLock.append(" LOCK TABLE "); tableLock.append(actorTable); tableLock.append(" IN ACCESS EXCLUSIVE MODE;"); res = PQexec(connection, tableLock.c_str()); pObj->ReturnNotification(static_cast(notify->relname),connection); . . CleanUpBeforeStop(void *pParam);}void CleanUpBeforeStop(void *pParam){ . . res = PQexec(pPti->conn, "COMMIT WORK;");}Well, the function Execute is the detached procedure of a thread. In here I execute the LOCK command on the table "actorTable". Then, in the method ReturnNotification I read the locked table. At last, calling the function CleanUpBeforeStop, I execute the COMMIT command.Well, all this doesn't work (the connection is the always the same in all methods and functions). Have I to Lock the table, perform some operation on this table, and unlock the table all in the same function scope? Any Idea?Thanks in advance.Luca -- Email.it, the professional e-mail, gratis per te: http://www.email.it/f Sponsor: Una BMW Z4 Roadster a 10? Prova gratis su Bidplaza.it! Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=7673&d=20080314
Re: [GENERAL] LOCK TABLE HELP
Sorry for the bad text format. Below the right (I hope...) text: Hi All.I'm using for the first time the postgres lock utilities, but brobably I'm doing something of not legal.My action are:void *Execute(void *pParam){ string tableLock = "BEGIN WORK;"; tableLock.append(" LOCK TABLE "); tableLock.append(actorTable); tableLock.append(" IN ACCESS EXCLUSIVE MODE;"); res = PQexec(connection, tableLock.c_str()); pObj->ReturnNotification(static_cast(notify->relname),connection); . . CleanUpBeforeStop(void *pParam);}void CleanUpBeforeStop(void *pParam){ . . res = PQexec(pPti->conn, "COMMIT WORK;");}Well, the function Execute is the detached procedure of a thread. In here I execute the LOCK command on the table "actorTable". Then, in the method ReturnNotification I read the locked table. At last, calling the function CleanUpBeforeStop, I execute the COMMIT command.Well, all this doesn't work (the connection is the always the same in all methods and functions). Have I to Lock the table, perform some operation on this table, and unlock the table all in the same function scope? Any Idea?Thanks in advance.Luca- Original Message Da: "Richard Huxton" <[EMAIL PROTECTED]>To: Cc: [EMAIL PROTECTED]: Re: [GENERAL] LOCK TABLE HELPData: 14/03/08 16:[EMAIL PROTECTED] wrote:> Hi All.> > I'm using for the first time the postgres lock utilities, but brobably> I'm doing something of not legal.My action are:void *Execute(void> *pParam){ > string tableLock = "BEGIN> WORK;"; tableLock.append("> LOCK TABLE "); Could you repost your message without all the   stuff? There's probably a "plain text" option in your email package you need to turn on.-- Richard HuxtonArchonet Ltd-- Sent via pgsql-general mailing list (pgsql-general@postgresql.org)To make changes to your subscription:http://www.postgresql.org/mailpref/pgsql-general -- Email.it, the professional e-mail, gratis per te: http://www.email.it/f Sponsor: Scopri le tue passioni con Leonardo.it! Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=7615&d=20080314
Re: [GENERAL] LOCK TABLE HELP
Sorry for delay in my answer. The problem is that with the lock instructions my app remain in a freeze state. It resembling a MUTEX deadlock.Anyway, as soon as possible I'll test yuor idea to use a separate PQexec. Thanks.Luca. - Original Message Da: "Alvaro Herrera" <[EMAIL PROTECTED]> To: "Richard Huxton" <[EMAIL PROTECTED]> Cc: pgsql-general@postgresql.orgOggetto: Re: [GENERAL] LOCK TABLE HELP Data: 14/03/08 17:51 > [EMAIL PROTECTED] wrote: > My action are: > > void *Execute(void *pParam) > { > > > > & nbsp; string tableLock = "BEGIN WORK;"; > tableLock.append(" LOCK TABLE "); > tableLock.append(actorTable); > tableLock.append(" IN ACCESS EXCLUSIVE MODE;"); > res = PQexec(connection, tableLock.c_str()); > Well, all this doesn't work (the connection is th e always the same in > all methods and functions). Have I to Lock the table, perform some > operation on this table, and unlock the table all in the same function > scope? What do you mean it doesn't work? How exactly it fails? If anything, I'd suggest to send the LOCK TABLE in a separate PQexec() call from BEGIN WORK. -- Alvaro Herrera http://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general -- Email.it, the professional e-mail, gratis per te: http://www.email.it/f Sponsor: Scopri le tue passioni con Leonardo.it! Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=7615&d=20080317
[GENERAL] defining a variable
Hi All. I need to create a sql script and launch it from pgadmin. In this script some sql statements (INSERT) have to depend from the result of previous statements (SELECT). Is there a way to define a variable in SQL and set its value with the result of a SELECT query? Using the psql console I've used the command set var 'val'; and this statement works fine. Usising the same command from pgadmin an error is reported. Im using postgres 8.2 on WindowsXp environment. Thanks in advance. Luca. -- Email.it, the professional e-mail, gratis per te: http://www.email.it/f Sponsor: VOGLIA DI VACANZE ? A Riccione i Family Hotels sono gli alberghi specializzati per le vacanze dei bambini Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=7983&d=20080612 -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general
[GENERAL] masking the code
I've wrote a PLPGSQL stored procedure for a DB I've to delivery to my customer. The problem is that I want to hide the code of the stored procedure. I don't want that my customer is able to read the code of the my sp. Do exist a way to mask the code of the store procedure shipped with my DB? Thanks in advance. Luca. -- Caselle da 1GB, trasmetti allegati fino a 3GB e in piu' IMAP, POP3 e SMTP autenticato? GRATIS solo con Email.it: http://www.email.it/f Sponsor: GRATIS: 250 Biglietti da Visita + 1 elegante Porta biglietti metallico! Spese di spedizione escluse. Offerta limitata, fai in fretta! Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=8956&d=20090626 -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general
[GENERAL] unable to (re-)install
I All. I've installed postgres 8.2 on my Windows XP. All Ok. Then I've removed this installation from the control panel. Then I've tryed to reinstal the same version of postgres but the first time I've received the error: "the user postgres already exiists", then after the change of the user name I've received the error: "Internal account lookup failure: Non è stato effettuato alcun mapping tra i nomi di account e ID di protexione" (My system is italian, in english this message should be: "No mapping has been performed between account names and protection ID"). Any idea of what I'm doing wrong? Luca. -- Caselle da 1GB, trasmetti allegati fino a 3GB e in piu' IMAP, POP3 e SMTP autenticato? GRATIS solo con Email.it: http://www.email.it/f Sponsor: Anteprima nuova Volkswagen Polo, scoprila adesso Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=9581&d=20090914 -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general