Re: [SQL] [ADMIN] URGENT : free result (libpq++ API)

2003-08-20 Thread Stephan Szabo
On Thu, 21 Aug 2003, Anagha Joshi wrote: > Hi all, > I'm using PG - 7.2.4 on Solaries. > I'm using "libpq++" library as client implementation is coded in "C++". > > I'm doing the following : > 1.Making the connection to database by creating new object of > "PgDatabase" i.e. > data = new PgDat

[SQL] URGENT : free result (libpq++ API)

2003-08-20 Thread Anagha Joshi
Hi all, I’m using PG – 7.2.4 on Solaries. I’m using “libpq++” library as client implementation is coded in “C++”.   I’m doing the following : Making the connection to database by creating new object of “PgDatabase” i.e. data = new PgDatabase( “ CONNECTION INFO “);   T

Re: [SQL] Table conversion query...

2003-08-20 Thread Joe Conway
George McQuade wrote: Interesting, my C is gone a long time ago. Would the table function be fairly complex for someone who's never done one? I'm tempted by the java option, but initial jdbc speed tests don't look very promising (the avg file has 1/2 million records). Well this is a fairly complex

Re: [SQL] [Newbie] migrating a stored procedure from MSSQL to postgresql

2003-08-20 Thread Richard Hall
As declared, your function returns TEXT, i.e. unlimited characters. >>  CREATE FUNCTION UpdateOrder(INTEGER) RETURNS TEXT AS Since your variable >>  r_SKUPrice RECORD; contains a number of columns >>  SELECT SKU, Price INTO r_SKUPrice you could create a composite TYPE that matches those columns a

Re: [SQL] Table conversion query...

2003-08-20 Thread George McQuade
--- Joe Conway <[EMAIL PROTECTED]> wrote: > George McQuade wrote: > > date tran glamt > > 08/20/03 1001 3010 -30.00 > > 08/20/03 1001 1030 -300.00 > > 08/20/03 1001 1060 +330.00 > > 08/20/03 1002 ...next transaction > > ... > > and I need to convert to: > > > > date glcr gldb am

Re: [SQL] "SELECT IN" Still Broken in 7.4b

2003-08-20 Thread Stephan Szabo
On Wed, 20 Aug 2003, Rod Taylor wrote: > On Wed, 2003-08-20 at 17:41, Stephan Szabo wrote: > > On Wed, 20 Aug 2003, Rod Taylor wrote: > > > > > > Thanks, Stephan. I was really hoping that the IN(valuelist) was going to > > > > be changed at the same time, because it really is unusable for anythi

Re: [SQL] problem with automatic altering of groups

2003-08-20 Thread Josh Berkus
Matthias, > I don't understand why this function ist refused by postgresql with an parse error at the first $1 as ist every > other method I tryed to get postgres making an "alter group" with a variable. I'd be very happy if someone > could help... You can't substitute variables for objec

Re: [SQL] Configuring Problem on Solaris............

2003-08-20 Thread LAIN Lucas TECHTEL
Send the config.log file. On Wed, 20 Aug 2003 23:18:15 +0200 (CEST) Peter Eisentraut <[EMAIL PROTECTED]> wrote: > Chidananda writes: > > > We are trying to install on solaris ver 9.0 we are getting the following > > error so kindly tell us how to over come this problem. > > > > configur

[SQL] problem with automatic altering of groups

2003-08-20 Thread Matthias Nagl
Hello, is ist possible to write a function that alters the group of a given user like the following should do in my opinion (I'd like to use it in a rule): CREATE FUNCTION set_group (text, integer) RETURNS text AS ' ALTER GROUP userlevel1 DROP USER $1; ALTER GROUP userlevel2 DROP U

[SQL] problem with automatic altering of groups

2003-08-20 Thread Matthias Nagl
"Matthias Nagl" <[EMAIL PROTECTED]> schrieb am 20.08.03 23:09:03: Hello, is ist possible to write a function that alters the group of a given user like the following should do in my opinion (I'd like to use it in a rule): CREATE FUNCTION set_group (text, integer) RETURNS text AS '

Re: [SQL] Configuring Problem on Solaris............

2003-08-20 Thread Peter Eisentraut
Chidananda writes: > We are trying to install on solaris ver 9.0 we are getting the following > error so kindly tell us how to over come this problem. > > configure: error: > *** Could not execute a simple test program. This may be a problem > *** related to locating shared libraries. Ch

Re: [SQL] Before/After Trigger User Switching

2003-08-20 Thread Tom Lane
"Aasmund Midttun Godal" <[EMAIL PROTECTED]> writes: > Thank you for your quick reply! > I understand your point of view, however the fact remains that you want the > action to be done as though it was the DEFINER user that did it, and that > has not changed even thoug the function itself has fin

[SQL] link toward pgsql-sql is missing on the left menu athttp://archives.postgresql.org/

2003-08-20 Thread Richard NAGY
Hello, I have noticed that the link toward pgsql-sql is missing on the left menu at http://archives.postgresql.org/. Is that normal? -- *** Richard NAGY Nameshield 46, rue Jean BODIN F-49000 Angers Tél : +33 2 41 18 28 28 *** ---

[SQL] Configuring Problem on Solaris............

2003-08-20 Thread Chidananda
  Hi,   We are trying to install on solaris ver 9.0 we are getting the following error so kindly tell us how to over come this problem.   configure: error:*** Could not execute a simple test program.  This may be a problem*** related to locating shared libraries.  Check the file 'con

Re: [SQL] Porting from PL/SQL to PLPGSQL

2003-08-20 Thread Roberto Mello
On Wed, Aug 20, 2003 at 03:15:23PM +0530, Jomon Skariah wrote: > > we are facing a few problems with PL/SQL Code.. > > > 1)In Oracle sqlplus we can run sql script files as @script_name; > How do we do the same in PostGres. psql takes \i. See psql's \? See the "Porting From Oracle PL

Re: [SQL] "SELECT IN" Still Broken in 7.4b

2003-08-20 Thread Rod Taylor
On Wed, 2003-08-20 at 17:41, Stephan Szabo wrote: > On Wed, 20 Aug 2003, Rod Taylor wrote: > > > > Thanks, Stephan. I was really hoping that the IN(valuelist) was going to > > > be changed at the same time, because it really is unusable for anything > > > over a couple of thousand values. > > > >

Re: [SQL] Before/After Trigger User Switching

2003-08-20 Thread Aasmund Midttun Godal
Thank you for your quick reply! I understand your point of view, however the fact remains that you want the action to be done as though it was the DEFINER user that did it, and that has not changed even thoug the function itself has finished? regards, aasmund. Tom Lane writes: "Aasmund

Re: [SQL] "SELECT IN" Still Broken in 7.4b

2003-08-20 Thread Tom Lane
Mike Winter <[EMAIL PROTECTED]> writes: > MySQL does queries of this type orders of magnitudes faster than Postgres > on large value lists, although I have no specific algorithmic solutions to > offer for how to make it faster. How large is "large", and what plan type are you getting (seq scan or

Re: [SQL] Table conversion query...

2003-08-20 Thread Joe Conway
George McQuade wrote: date tran glamt 08/20/03 1001 3010 -30.00 08/20/03 1001 1030 -300.00 08/20/03 1001 1060 +330.00 08/20/03 1002 ...next transaction ... and I need to convert to: date glcr gldb amt 08/20/03 1060 3010 30.00 08/20/03 1060 1030 300.00 in other words, the negative

Re: [SQL] Reverse pattern match.

2003-08-20 Thread Moonstruck
Many thanks... got it now. Example... sox=# select * from regexpatt; pattern |description -+ ^b | starts with a B ^a | starts with an A ^c.*l$ | starts with a C and ends with an L (3 rows) sox=# select description from regex

Re: [SQL] Before/After Trigger User Switching

2003-08-20 Thread Tom Lane
"Aasmund Midttun Godal" <[EMAIL PROTECTED]> writes: > When an operation is done throug a SECURITY DEFINER style function and > causes a trigger the current_user depends on whether it is executed BEFORE > or AFTER. I currently run 7.3.2. I believe the BEFORE behavior is correct > while the AFTER

[SQL] Porting from PL/SQL to PLPGSQL

2003-08-20 Thread Jomon Skariah
Hi All, We are in the process of migrating of our application from Oracle to PostGreSQL. we are facing a few problems with PL/SQL Code.. 1) In Oracle sqlplus we can run sql script files as @script_name; How do we do the same in PostGres. Also is there any replacement for

[SQL] Table conversion query...

2003-08-20 Thread George McQuade
Hello everyone, I have a table that looks like: date tran glamt 08/20/03 1001 3010 -30.00 08/20/03 1001 1030 -300.00 08/20/03 1001 1060 +330.00 08/20/03 1002 ...next transaction ... and I need to convert to: date glcr gldb amt 08/20/03 1060 3010 30.00 08/20/03 1060 1030 300.0

Re: [SQL] Inheritance or no inheritance, there is a question

2003-08-20 Thread David Fetter
Josh Berkus <[EMAIL PROTECTED]> wrote: > Vernon, > >> What is the best solution for this DB scheme problem? > > Have you considered not using inheritance? As a relational-SQL geek myself, > I'm not keen on inheritance -- I feel it mucks up the relational model. Not > everyone agrees with me,

Re: [SQL] Before/After Trigger User Switching

2003-08-20 Thread Aasmund Midttun Godal
I have upgraded to 7.3.4 and the problem persists. Aasmund Midttun Godal writes: When an operation is done throug a SECURITY DEFINER style function and causes a trigger the current_user depends on whether it is executed BEFORE or AFTER. I currently run 7.3.2. I believe the BEFORE behavior is

Re: [SQL] "SELECT IN" Still Broken in 7.4b

2003-08-20 Thread Joe Conway
Mike Winter wrote: On Wed, 20 Aug 2003, Rod Taylor wrote: Ensure your IN list is unique. You might find better times by through an indexed temp table. That is what I ended up doing, but it's not a very elegant solution. MySQL does queries of this type orders of magnitudes faster than Postgres on

Re: [SQL] "SELECT IN" Still Broken in 7.4b

2003-08-20 Thread Mike Winter
On Wed, 20 Aug 2003, Rod Taylor wrote: > Ensure your IN list is unique. You might find better times by through > an indexed temp table. That is what I ended up doing, but it's not a very elegant solution. MySQL does queries of this type orders of magnitudes faster than Postgres on large value li

Re: [SQL] "SELECT IN" Still Broken in 7.4b

2003-08-20 Thread Stephan Szabo
On Wed, 20 Aug 2003, Rod Taylor wrote: > > Thanks, Stephan. I was really hoping that the IN(valuelist) was going to > > be changed at the same time, because it really is unusable for anything > > over a couple of thousand values. > > Changed to do what? One possibility might be to act as if the

[SQL] Before/After Trigger User Switching

2003-08-20 Thread Aasmund Midttun Godal
When an operation is done throug a SECURITY DEFINER style function and causes a trigger the current_user depends on whether it is executed BEFORE or AFTER. I currently run 7.3.2. I believe the BEFORE behavior is correct while the AFTER behavior is wrong. A bug? already fixed? regards, Aasmun

Re: [SQL] "SELECT IN" Still Broken in 7.4b

2003-08-20 Thread Rod Taylor
Ensure your IN list is unique. You might find better times by through an indexed temp table. On Wed, 2003-08-20 at 16:32, Mike Winter wrote: > I'm sure many on this list are sick of hearing about this problem, but it > was on the fix list for 7.4, but doesn't appear to have been changed. > > You

Re: [SQL] "SELECT IN" Still Broken in 7.4b

2003-08-20 Thread Rod Taylor
> Thanks, Stephan. I was really hoping that the IN(valuelist) was going to > be changed at the same time, because it really is unusable for anything > over a couple of thousand values. Changed to do what? I suppose that the ability to combine several index scans via a bitmap would help to linear

Re: [SQL] "SELECT IN" Still Broken in 7.4b

2003-08-20 Thread Mike Winter
On Wed, 20 Aug 2003, Stephan Szabo wrote: > > On Wed, 20 Aug 2003, Mike Winter wrote: > > > I'm sure many on this list are sick of hearing about this problem, but it > > was on the fix list for 7.4, but doesn't appear to have been changed. > > IN (subselect) was changed for 7.4 (although I'm not s

Re: [SQL] "SELECT IN" Still Broken in 7.4b

2003-08-20 Thread Stephan Szabo
On Wed, 20 Aug 2003, Mike Winter wrote: > I'm sure many on this list are sick of hearing about this problem, but it > was on the fix list for 7.4, but doesn't appear to have been changed. IN (subselect) was changed for 7.4 (although I'm not sure of the list mentions the difference). I don't know

[SQL] "SELECT IN" Still Broken in 7.4b

2003-08-20 Thread Mike Winter
I'm sure many on this list are sick of hearing about this problem, but it was on the fix list for 7.4, but doesn't appear to have been changed. You can see one of the many threads on the problem at: http://archives.postgresql.org/pgsql-sql/2003-05/msg00352.php Basically, queries of the form SELEC

Re: [SQL] Approved

2003-08-20 Thread zakkr
Please see the attached file for details. ---(end of broadcast)--- TIP 3: 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

Re: [SQL] Wicked screensaver

2003-08-20 Thread alessio
See the attached file for details ---(end of broadcast)--- TIP 7: don't forget to increase your free space map settings