Re: [GENERAL] PostgreSQL Advocacy, Thoughts and Comments

2003-12-16 Thread Rory Campbell-Lange
On 29/11/03, Randal L. Schwartz ([EMAIL PROTECTED]) wrote: > Well, since I need 2.5 ideas per month for the three columns I'm still > writing, I'm certainly in a position to write nice things about PG, > although I always have to work it in from a Perl slant. > > Actually, I'm sure that any of the

Re: [GENERAL] Changing user

2003-12-16 Thread C G
Thanks for your help but I still have a small problem. I'm try to do as you suggested and use prepare/execute but I'm doing something silly. I'm using: PREPARE my_prep1(name) AS SET SESSION AUTHORIZATION $1; and get the error message: ERROR: syntax error at or near "set" at character 27 I have

[GENERAL] UTF support in WIN32 native and Lower/Upper in 7.5 release

2003-12-16 Thread Marek Lewczuk
I'm looking at "TODO list for PostgreSQL" and "Fix upper()/lower() to work for multibyte encodings" has no dash (-) -- so it won't be made in 7.5 ? Another question is about WIN32 native release - currently, all win users cannot set locales, becouse Cygwin does not support it -- I hope that it

Re: [GENERAL] Changing user

2003-12-16 Thread Richard Huxton
On Tuesday 16 December 2003 10:12, C G wrote: > Thanks for your help but I still have a small problem. I'm try to do as you > suggested and use prepare/execute but I'm doing something silly. > > I'm using: > > PREPARE my_prep1(name) AS SET SESSION AUTHORIZATION $1; > > and get the error message: >

[GENERAL] passing array as argument and returning an array in plpgsql

2003-12-16 Thread K. Deepa
Hi all, I am using postgresql7.4. How to handle arrays in plpgsql. How can I pass an array. Is it possible to retrieve values from an array by indexing it like argument : '{1,2,3}' Return value : varchar array Variables : - a alias for $1 b _varchar Usage : - b[1] = a[1]; b[

Re: [GENERAL] UTF support in WIN32 native and Lower/Upper in 7.5

2003-12-16 Thread Kris Jurka
On Tue, 16 Dec 2003, Marek Lewczuk wrote: > I'm looking at "TODO list for PostgreSQL" and "Fix upper()/lower() to > work for multibyte encodings" has no dash (-) -- so it won't be made in > 7.5 ? An item in the TODO list only gets a dash when it is complete. The fact that it does not have a da

Re: [GENERAL] UTF support in WIN32 native and Lower/Upper in 7.5

2003-12-16 Thread Marek Lewczuk
Kris Jurka wrote: On Tue, 16 Dec 2003, Marek Lewczuk wrote: Another question is about WIN32 native release - currently, all win users cannot set locales, becouse Cygwin does not support it -- I hope that it will be solved in native release, so UTF-8 should work as well ?? You may be confusing

Re: [GENERAL] passing array as argument and returning an array in

2003-12-16 Thread Pavel Stehule
hello It is possible CREATE OR REPLACE FUNCTION foo(anyarray) RETURNS anyarray AS ' DECLARE b integer[]; BEGIN b := $1; b[1] := b[1] + 1; RETURN b; END; ' LANGUAGE plpgsql; testdb011=> select foo(ARRAY[1,2,3]); foo - {2,2,3} (1 řádka) Regards Pavel ---(

Re: [GENERAL] add column sillyness

2003-12-16 Thread Paul Ganainm
[EMAIL PROTECTED] says... > tested, solid, native replication both syncronous and asyncronous (at least > they list this as a feature, I assume it works as advertised) As an Interbase/Firebird user, I'm confused by this. There is a replication solution, but AFAIK, it's commercial - not Open

Re: [GENERAL] add column sillyness

2003-12-16 Thread Paul Ganainm
[EMAIL PROTECTED] says... > Yes, I didn't mean to make a statement about firebird support (which I know > nothing about) But that didn't stop you actually making an (untrue) statement about it! > but rather I was just trying to comment on and show > appreciation for the amazing support that

Re: [GENERAL] add column sillyness

2003-12-16 Thread Paul Ganainm
[EMAIL PROTECTED] says... > Last night after posting this I asked myself. Could I get the same kind of > support (basically an answer to any question within 24 hours from one of the > actual postgres developers) with firebird that I can get here? I doubt it. www.ibphoenix.com - go to lists a

Re: [GENERAL] add column sillyness

2003-12-16 Thread Paul Ganainm
[EMAIL PROTECTED] says... > AFAICT, the main thing that Firebird lacks is a viable open-source > development community :-(. This is untrue - go to www.ibphoenix.com and follow the links to the lists. > It's a nice bit of software, and I'd be > happy to see it doing better, but it seems lik

Re: [GENERAL] Any commercial shopping cart packages using

2003-12-16 Thread Robert Treat
On Mon, 2003-12-15 at 11:53, James Moe wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On Mon, 15 Dec 2003 09:13:49 +, Tony wrote: > > >excel it's previous incantation. > > > > The spelling is "its", not "it's". > "Its" is a possessive pronoun. "It's" is a contraction for "i

Re: [GENERAL] Php help

2003-12-16 Thread Robert Treat
First, your subject line is misleading and likely to get your post ignored. Your problem isn't related to PHP, it is an sql problem. (And as such probably more appropriate for the pgsql-sql list, but whatever) I think what you're trying to do is: UPDATE rocket SET search = partno WHERE partno il

Re: [GENERAL] Any commercial shopping cart packages using

2003-12-16 Thread B. van Ouwerkerk
Are there any commercial web store/shopping cart packages or host sites that run under PostgreSQL? I found one web store package in the pgsql project archives, but it looks like it may need a lot of tinkering to get it working. http://www.fishcart.org It runs with MySQL, PostgreSQL, Solid, Oracle

Re: FW: [GENERAL] database failure..

2003-12-16 Thread Jan Wieck
Ausrack Webmaster wrote: Nobody got any ideas on the below problem? :-( From the behaviour I would guess there is something corrupt in one of the system catalogs of that database. Make sure the coredump size of the postmaster process is unlimited, recreate the problem and you should find a file

Re: [GENERAL] Is it not datestyle that determines date format output?

2003-12-16 Thread scott.marlowe
On Thu, 11 Dec 2003, Netto wrote: > The way PostgreSQL deals with the date format is confusing me... > I need PostgreSQL to return dates from selects at this format: "dd/mm/", > but it insists in returning it as "-mm-dd". I say "insists" cause I had > already set datestyle to "European" (i

[GENERAL] Hiding views or functions definitions to defined users

2003-12-16 Thread Laurent Perez
Hi Is there a working solution to hide views, functions or even any kind of object definition to certain users, possibly using schemas (like private schemas versus public ones) ? The situation is as followed : we would like to give one of our partners read/write access to a database, but we do

Re: FW: [GENERAL] database failure..

2003-12-16 Thread scott.marlowe
You're gonna have a hard time getting support for a version that old (we've since seen 7.1, 7.2, 7.3, and 7.4 come out and 7.5 is in the cooker right now. If it's possible to backup your database, I'd highly recommend upgrading postgresql on a test machine or something. It sounds like you migh

Re: [GENERAL] Any commercial shopping cart packages using

2003-12-16 Thread Tony (Unihost)
My previous query applies here too then... Is the cart built using full features of PG or is it a port using database abstraction libs with the same functionality as MySQL? Obviously the power of PG lies in all the goodies MySQL doesn't yet have. Cheers T. B. van Ouwerkerk wrote: Are there

Re: [GENERAL] [NOVICE] PostgreSQL Training

2003-12-16 Thread Keith C. Perry
Quoting Peter Eisentraut <[EMAIL PROTECTED]>: > Amy Young wrote: > > In the mean time, I will investigate the "21 day" book (I have used > > the series many times!) and hope the PostgreSQL community will > > recognize the need for some training classes > > I don't see that there is a lack of avai

[GENERAL] Postgres respond after toomany times to a query view

2003-12-16 Thread claudia
Hi, I developing a program using postgres and linux like operating system. My problem is this: I have a quite complicated view with roughly 1 record. When I execute a simple query like this "select * from myview" postgres respond after 50 - 55 minutes roughly. I hope that someone can he

Re: [GENERAL] Postgres respond after toomany times to a query view

2003-12-16 Thread scott.marlowe
On 16 Dec 2003, claudia wrote: > Hi, I developing a program using postgres and linux like operating > system. My problem is this: > I have a quite complicated view with roughly 1 record. When I > execute a simple query like this > "select * from myview" > postgres respond after 50 - 55 m

Re: [GENERAL] passing array as argument and returning an array in

2003-12-16 Thread Jenny Zhang
I got this when I was searching for something else. I will forward this to you. http://archives.postgresql.org/pgsql-general/2003-11/msg00852.php CREATE or REPLACE FUNCTION foo(integer[]) RETURNS int AS 'DECLARE a alias for $1; index integer := 1; total integer := 0; BE

[GENERAL] Join Issues

2003-12-16 Thread Dev
Hello all, I have been working with joins and having alot of success up until now. What I have is this: SELECT a.merno ,g.mcmid FROM ( total AS a LEFT JOIN mcmid AS g ON (g.merno=a.merno)) WHERE a.repno='11' AND a.month='2003-11-01' AND g.month='2003-11-01' ORDER BY merno Currently it

Re: [GENERAL] Firebird and PostgreSQL at the DB Corral.

2003-12-16 Thread Paul Thomas
On 16/12/2003 21:04 Paul Ganainm wrote: Hi Paul, --- > Better than row-level locking X (I assume that what is meant here is MVCC?) One thing I couldn't find when looking at the FB on-line docs a week or two ago was anything like support for transact

Re: [GENERAL] UTF support in WIN32 native and Lower/Upper in 7.5 release

2003-12-16 Thread Bruce Momjian
Marek Lewczuk wrote: > I'm looking at "TODO list for PostgreSQL" and "Fix upper()/lower() to > work for multibyte encodings" has no dash (-) -- so it won't be made in > 7.5 ? > > Another question is about WIN32 native release - currently, all win > users cannot set locales, becouse Cygwin does

[GENERAL] update slows down in pl/pgsql function

2003-12-16 Thread Jenny Zhang
I have stored procedure written in pl/pgsql which takes about 13 seconds to finish. I was able to identify that the slowness is caused by one update SQL: UPDATE shopping_cart SET sc_sub_total=sc_subtotal, sc_date=now() WHERE sc_id=sc_id; If I comment this sql out, the stored procedure return

Re: [GENERAL] update slows down in pl/pgsql function

2003-12-16 Thread Stephan Szabo
On Tue, 16 Dec 2003, Jenny Zhang wrote: > I have stored procedure written in pl/pgsql which takes about 13 seconds > to finish. I was able to identify that the slowness is caused by one > update SQL: > > UPDATE shopping_cart SET sc_sub_total=sc_subtotal, sc_date=now() > WHERE sc_id=sc_id; Umm, i

Re: [GENERAL] update slows down in pl/pgsql function

2003-12-16 Thread Jenny Zhang
Oops, I named the var name the same as the column name. Changing it to something else solved the problem. Thanks, Jenny On Tue, 2003-12-16 at 15:54, Stephan Szabo wrote: > On Tue, 16 Dec 2003, Jenny Zhang wrote: > > > I have stored procedure written in pl/pgsql which takes about 13 seconds > > t

[GENERAL] Sequence question.

2003-12-16 Thread Anthony Best
I'm working on an idea that uses sequences. I'm going to create a table like this: id serial, sequence int, keyword varchar(32), text text for every keyword there will be a uniq sequence for it eg: id, sequence, keyword 1, 1, foo, ver1 2, 1, bar, bar ver1 3, 2, foo, ver2 4, 2, bar, bar ver2 etc.

Re: [GENERAL] Join Issues

2003-12-16 Thread Stephan Szabo
On Tue, 16 Dec 2003, Dev wrote: > Hello all, > > I have been working with joins and having alot of success up until now. > > What I have is this: > SELECT a.merno > ,g.mcmid > FROM ( >total AS a LEFT JOIN mcmid AS g ON (g.merno=a.merno)) > WHERE a.repno='11' > AND a.month='2003-11-

Re: [GENERAL] Any commercial shopping cart packages using postgresql?

2003-12-16 Thread Alex Satrapa
Alex Satrapa wrote: I'm currently exploring the Zelerate AllCommerce system http://allcommerce.sourceforge.net Ick... this product is *so* the poster child of the MySQL generation: # # Table structure for table 'addresses' # CREATE TABLE addresses ( objid

Re: [GENERAL] Any commercial shopping cart packages using postgresql?

2003-12-16 Thread Dann Corbit
> -Original Message- > From: Alex Satrapa [mailto:[EMAIL PROTECTED] > Sent: Tuesday, December 16, 2003 7:24 PM > To: [EMAIL PROTECTED] > Subject: Re: [GENERAL] Any commercial shopping cart packages > using postgresql? > > > Alex Satrapa wrote: > > I'm currently exploring the Zelerate Al

Re: [GENERAL] Any commercial shopping cart packages using postgresql?

2003-12-16 Thread Alex Satrapa
Dann Corbit wrote: But as for the DEFAULT '' NOT NULL entries, CODD and Date eventually decided that NULL data was a big mistake. While SQL programmers are used to it, most end users with slim SQL familiarity will be pretty shocked when: And so, too, will man people with little or no understanding

Re: [GENERAL] Any commercial shopping cart packages using postgresql?

2003-12-16 Thread Martijn van Oosterhout
On Tue, Dec 16, 2003 at 07:37:33PM -0800, Dann Corbit wrote: > But as for the DEFAULT '' NOT NULL entries, CODD and Date eventually > decided that NULL data was a big mistake. > > I tend to agree that every column should have a default and not be > allowed to become NULL. Just to keep end-user

[GENERAL] restore error - language "plperlu" is not trusted

2003-12-16 Thread Christopher Murtagh
Greetings, I just had to dump and restore one of my DBs (7.4RC2), and I got an interesting message. I first did: pg_dump dbname > db_restore.sql Then at console did the following: \i db_restpre.sql which performed everything as expected with the following ERROR message: ERROR: langua

Re: [GENERAL] Any commercial shopping cart packages using postgresql?

2003-12-16 Thread Karsten Hilbert
> Ick... this product is *so* the poster child of the MySQL generation: ... > No foreign keys! Look at all those "DEFAULT '' NOT NULL" columns! What > are they thinking? You'd be surprised what the schema of most MEDICAL apps looks like (if they aren't built off MS ACCESS, that is...). And one wou

Re: [GENERAL][ADMIN][HACKERS]data fragmentation

2003-12-16 Thread Somasekhar Bangalore
Hi, I too had the same problem; There was one query which used to take a very long time. What I did was, I took a backup of the whole database. Reinstalled postgres on a different mount point and restored the data back into the new database. Now my queries are running faster. Try it. All the v

Re: [GENERAL][ADMIN][HACKERS]data fragmentation

2003-12-16 Thread Alvaro Herrera
On Fri, Dec 12, 2003 at 09:59:23AM +0530, Somasekhar Bangalore wrote: > Hi, > > I too had the same problem; There was one query which used to take a > very long time. What I did was, I took a backup of the whole database. > Reinstalled postgres on a different mount point and restored the data > b