[GENERAL] Help, Australian Time Problem

2003-11-24 Thread Dean Grubb
Is there a faq on this..cause boy it is giving me a headache. System is FreeBSD 4.9 System date returns Tue Nov 25 16:32:36 EST 2003 Postgres Version is 7.3.4 installed from the port collection I've set the datestyle to ISO, european I've set australian_timezones to true I've set TimeZone to local

Re: [GENERAL] Index on array element

2003-11-24 Thread Tom Lane
Steve Crawford <[EMAIL PROTECTED]> writes: > How can I create an index on an array element? You need 7.4 and an extra layer of parentheses: create index foodex on foo ((textarray[3])); regards, tom lane ---(end of broadcast)---

Re: [GENERAL] PostgreSQL certifications?

2003-11-24 Thread Bruce Momjian
CSN wrote: > Just curious - are there any PostgreSQL > certifications, or plans for them? I ask because I > just became aware of two for mysql: No, we have talked about certification but felt it was better for individual companies to offer their own certifications. -- Bruce Momjian

[GENERAL] get_typdefault: failed to ...

2003-11-24 Thread Vernon Smith
Hi, Here is the case: mm=# delete from signon where user_id='210'; ERROR: get_typdefault: failed to lookup type 0 What is wrong here? A bug or something else. Thanks for your information. Vernon Get advanced SPAM filtering on We

[GENERAL] unsubscribe

2003-11-24 Thread Venkatesh R Ramteke
---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Re: [GENERAL] array iteration?

2003-11-24 Thread Bruce Momjian
Ben wrote: > Hey, that's cool. When did those functions arrive? I think 7.4. We had a lot of nice array stuff added. > > On Sun, 23 Nov 2003, Tom Lane wrote: > > > Ben <[EMAIL PROTECTED]> writes: > > > On Sat, 2003-11-22 at 12:44, CSN wrote: > > >> Is it possible to iterate over an array in p

[GENERAL] Cron-job for checking up on pg_autovacuum

2003-11-24 Thread Markus Wollny
Hi! I haven't found anything in terms of startup- and check-scripts for pg_autovacuum yet; usually I like to have some sort of mechanism to check if some daemon is running and restart it if it isn't. Of course this sort of script shouldn't be too much of a bother for more experienced users; howev

Re: [GENERAL] Humor me: Postgresql vs. MySql (esp. licensing)

2003-11-24 Thread Bruce Momjian
Randolf Richardson, DevNet SysOp 29 wrote: > [sNip] > > For exsample, if I have a product that I built for a customer, I would > > have to give it to them under the GPL. But I also have the choice to not > > give it to them AT ALL. So, they pay me to get it, and the license is > > the GPL. Their

Re: [GENERAL] retrieve statement from catalogs

2003-11-24 Thread Jaime Casanova
STOP MORE SPAM with the new MSN 8 and get 2 months FREE*

[GENERAL] Index on array element

2003-11-24 Thread Steve Crawford
How can I create an index on an array element? I seem to recall having done this in the past but I don't recall how. steve=# \d foo Table "public.foo" Column | Type | Modifiers ---++--- textarray | text[] | steve=# create index foodex on foo (textarray[3]);

Re: [GENERAL] Where is Postgesql ? - MYSQL SURPRISES WITH MAXDB /

2003-11-24 Thread Alex Satrapa
Randolf Richardson wrote: From my perspective MySQL and PostgreSQL are completely different projects (for starters they even use different licensing schemes -- BSD v. GPL) that are in competition. Since PostgreSQL stands on its own without any dependencies on MySQL, I don't see any reason

[GENERAL] configure --with-java fails

2003-11-24 Thread Markus Wollny
Hello! When I try to run ./configure --with-java, it complains that ant doesn't work. However ant is installed, as is the latest Java SDK 1.4.2 from sun, PATH and JAVA_HOME are set correctly; helles:/ # /usr/java/apache-ant-1.5.4/bin/ant -version Apache Ant version 1.5.4 compiled

Re: [GENERAL] tsearch2 column update produces "word too long"error

2003-11-24 Thread Markus Wollny
Hi! Now I really couldn't code C to save my life, but I managed to elicit some more debugging info. It's still dumb-user-interaction as suspected, but this is an issue I have to take into account as a basis; here's the "patch" for ts_cfg.c: if (lenlemm >= MAXSTRLEN) erepor

Re: [GENERAL] Where is Postgesql ? - MYSQL SURPRISES WITH MAXDB /

2003-11-24 Thread Christopher Browne
[EMAIL PROTECTED] (Jonathan Bartlett) writes: > As far as I'm aware, MAXDB is completely different from MySQL, > although it's sold by the same company. It's basically SAP's DB, > which is really just a fork off of Adabas D, which has been a > mainframe database for a long time. > > So, it really

Re: [GENERAL] Humor me: Postgresql vs. MySql (esp. licensing)

2003-11-24 Thread Randolf Richardson, DevNet SysOp 29
>>>- Define a 32-bit field in MySQL. Insert a 64-bit number instead. >>>Common sense tells you the value would be rejected. Yet MySQL happily >>>folds it in and carries on its merry way. >> >> That's unacceptable. To me, this is a complete show-stopper because I >> simply won't tolerate data los

Re: [GENERAL] Export CSV from psql

2003-11-24 Thread Randolf Richardson, DevNet SysOp 29
[sNip] > I have been playing with this lately, and I have found that if you use > > \f , > \o /tmp/output.csv > > it opens fine in excel, it just bypasses the need to go > next, next, finish when opening from a TAB separated .txt file Have you tested other Spreadsheet applications? If

Re: [GENERAL] Where is Postgesql ? - MYSQL SURPRISES WITH MAXDB /

2003-11-24 Thread Randolf Richardson, DevNet SysOp 29
[sNip] > * My favorite - TABLESPACES!! [sNip] This is one feature I dearly wished PostgreSQL had because it would allow for some additional performance tuning options. One thing I really liked about Oracle's Table Spaces was that I could specify a full path to it and the entire

Re: [GENERAL] SCSI vs. IDE performance test

2003-11-24 Thread Randolf Richardson, DevNet SysOp 29
>>> "we have no portable means of expressing that exact constraint to the >>> kernel" >> Does this mean that specific operating systems have a better way of >> dealing with this? Which ones and how? > > I'm not aware of any that offer a way of expressing "write these > particular blocks before th

Re: [GENERAL] Humor me: Postgresql vs. MySql (esp. licensing)

2003-11-24 Thread Randolf Richardson, DevNet SysOp 29
[sNip] > For exsample, if I have a product that I built for a customer, I would > have to give it to them under the GPL. But I also have the choice to not > give it to them AT ALL. So, they pay me to get it, and the license is > the GPL. Their other choice, if they didn't pay me, would be to not

Re: [GENERAL] SRPM (PGDG) will not build

2003-11-24 Thread Lamar Owen
On Monday 24 November 2003 12:49 pm, Roderick A. Anderson wrote: > Hopefully not fuel to the RPM discussion but I've downloaded the PGDG SRPM > this AM made some changes to what packages/portions would build and am now > getting the following error. > gcc: cannot specify -o with -c or -S and

Re: [GENERAL] autocommit in 7.4

2003-11-24 Thread Tom Lane
Christian Traber <[EMAIL PROTECTED]> writes: > Ok, I'll try to make it. Do you know any reason why libpgtcl is not > tclstub enabled? Nobody's done the work (I don't think tclstub even existed the last time anyone was doing serious work on libpgtcl). If you think it's worth having, and it can be

[GENERAL] SRPM (PGDG) will not build

2003-11-24 Thread Roderick A. Anderson
Hopefully not fuel to the RPM discussion but I've downloaded the PGDG SRPM this AM made some changes to what packages/portions would build and am now getting the following error. gcc: cannot specify -o with -c or -S and multiple compilations Somewhere near line 719 in the spec file. The

Re: [GENERAL] autocommit in 7.4

2003-11-24 Thread Christian Traber
Tom Lane wrote: > > In psql, "\set AUTOCOMMIT off". In libpgtcl, I think you're out of luck > ... AFAIR no one got around to writing any autocommit control logic > for libpgtcl. You are of course welcome to write some and send it in if > you need it ... > Ok, I'll try to make it. Do you know any

Re: [GENERAL] SQL text of view

2003-11-24 Thread Pavel Stehule
Hello run psql with param -E and use metacommand \d nameofyourview regards Pavel On Mon, 24 Nov 2003, Yury Shvetsov wrote: > Hi. > > Where is the SQL text of view stored in the database? > I mean the text like "SELECT the_field FROM the_table". > I can found the function's text in "pg_proc.

[GENERAL] pam authentication for postgres

2003-11-24 Thread Jason Tesser
I am trying to authenticate POstgres using Pam. How do I do this. I tried using webmin on RH9 and telling it to use Pam for authentication but it doesn't seem to work. Jason Tesser Web/Multimedia Programmer Northland Ministries Inc. (715)324-6900 x3050 ---(end of broad

Re: [GENERAL] autocommit in 7.4

2003-11-24 Thread Tom Lane
Christian Traber <[EMAIL PROTECTED]> writes: > Only one small problem, how can I disable autocommit in Postgres 7.4 in > libpgtcl and psql? > I found something about .psqlrc but how is the syntax and how can I set it > for libpgtcl? In psql, "\set AUTOCOMMIT off". In libpgtcl, I think you're ou

Re: [GENERAL] Lock strategies!

2003-11-24 Thread Jonathan Bartlett
> But, how can I explain to the user, who use the > sequence numbers, that he will have to handle with > those holes? If it's just hte user, you might try to make sure that there are ALWAYS holes, so he doesn't get confused. Jon > > Ok! I will try to handle the holes! (fight against the > users

Re: [GENERAL] Lock strategies!

2003-11-24 Thread Jonathan Bartlett
Perhaps the primary key should be a sequence/serial, but also have a secondary key which is assigned after commit. You could have a process that continually ran something like: select max(skey) from the_table; select pkey from the_table where skey is null; Then loop through the answers and assig

Re: [GENERAL] updated linux startup script?

2003-11-24 Thread Lamar Owen
On Saturday 22 November 2003 06:36 pm, CSN wrote: > I did initdb -D /var/lib/pgsql/data. I downloaded the > attached script from this message - > http://archives.postgresql.org/pgsql-general/2003-11/msg01258.php > - and will give that a try. (I was getting the same > "old version" errors as well.)

Re: [GENERAL] Lock strategies!

2003-11-24 Thread Jeff
On Mon, 24 Nov 2003 12:48:26 -0300 (ART) MaRcElO PeReIrA <[EMAIL PROTECTED]> wrote: > The biggest problem it that I *can't* have holes in > that column, so it was because I used id (serial) and > forn_id (integer). > Well, if you cannot use a sequence you will have no choice but to use locking.

Re: [GENERAL] Lock strategies!

2003-11-24 Thread MaRCeLO PeReiRA
Hi Dave, Marc and all others, I know it is really weird! But, how can I explain to the user, who use the sequence numbers, that he will have to handle with those holes? Ok! I will try to handle the holes! (fight against the users) Thanks! Marcelo --- Dave Cramer <[EMAIL PROTECTED]> escreveu

Re: [GENERAL] Lock strategies!

2003-11-24 Thread Dave Cramer
Marcelo, You are asking for the impossible. In order for sequences to work reliably they have to exist outside of a transaction, and be atomic. If two transactions asked for a sequence simultaneously, what number would you give them? If the first one gets 1, and the second gets 2 how do you roll

[GENERAL] SQL text of view

2003-11-24 Thread Yury Shvetsov
Hi. Where is the SQL text of view stored in the database? I mean the text like "SELECT the_field FROM the_table". I can found the function's text in "pg_proc.prosrc", but can't find the same for a view. Yury Shvetsov. ---(end of broadcast)--- TIP

Re: [GENERAL] Export CSV from psql

2003-11-24 Thread Jeff Eckermann
--- Craig O'Shannessy <[EMAIL PROTECTED]> wrote: > > As it's very unlikely that there are tab's in your > strings, tab makes a > much safer field separator. Probably, but I wouldn't bet the farm on it. I have found plenty of instances of unexpected tabs, especially with data generated from cha

Re: [GENERAL] why ORDER BY works wrong in pg7.3.4?

2003-11-24 Thread Tom Lane
igor <[EMAIL PROTECTED]> writes: > Thank u for hint it really helped me - I made initdb with new lc-ctype > and lc-collate > settings : ru_RU:UTF8. > But im still having one question - some functions - lower() and upper() > doesnt work properly . what im doing wrong? We don't have any support fo

Re: [GENERAL] rounding timestamps

2003-11-24 Thread Claudio Lapidus
Joe Conway wrote: > Is this what you wanted? > > regression=# select to_char(timestamp(0) '2003-10-24 > 15:30:59.999','MMDDHH24MISS'); > to_char > > 20031024153100 > (1 row) Yes! Exactly! > > See: > http://www.postgresql.org/docs/current/static/datatype-datetime.html

Re: [GENERAL] Lock strategies!

2003-11-24 Thread Jeff
On Mon, 24 Nov 2003 10:20:07 -0300 (ART) MaRcElO PeReIrA <[EMAIL PROTECTED]> wrote: > Hi guys, > > I have a simple table: > > teste=# \d forn >Table "public.forn" > Column | Type | Modifiers > -+-+-

Re: [GENERAL] building 7.4 with plperl

2003-11-24 Thread Peter Eisentraut
Gianni Mariani writes: > > The 7.4 version of plperl.c (with some error handling API calls > > commented out) compiles fine in the 7.3.4 tree. > > (Same machine - same install of perl !) Points to using some > > alternate perl API probably by macro collision ? > > /* Define to 1 to build client l

Re: [GENERAL] Lock strategies!

2003-11-24 Thread Dave Cramer
Marceio The sequence logic takes care of it. try it yourself open two connections with psql on one do a begin; insert into table select curval('forn_id_seq'); on the other do a begin insert into table select curval('forn_id_seq'); You will see that they both increment the sequence numbe

Re: [GENERAL] Lock strategies!

2003-11-24 Thread MaRcElO PeReIrA
Dave, I actually use just the sequence, as you wrote! The biggest problem it that I *can't* have holes in that column, so it was because I used id (serial) and forn_id (integer). All other tables use only the sequence by itself, but this one, especially, CAN'T have holes! It is the problem!!! ;-

Re: [GENERAL] Lock strategies!

2003-11-24 Thread Marc A. Leith
I think that defining forn_id as "serial" is what you are looking for. This will handle the assignment of unique numbers to the id for you (it creates a sequence table). The locking stategy is fraught with danger... and unnecessary. Marc A. Leith redboxdata inc. E-mail:[EMAIL PROTECTED] Quo

[GENERAL] Lock strategies!

2003-11-24 Thread MaRcElO PeReIrA
Hi guys, I have a simple table: teste=# \d forn Table "public.forn" Column | Type | Modifiers -+-+-- id | integer | not null default nextval('public.forn_id_seq'::text)

[GENERAL] autocommit in 7.4

2003-11-24 Thread Christian Traber
Hi, thanks for the new great version! Only one small problem, how can I disable autocommit in Postgres 7.4 in libpgtcl and psql? I found something about .psqlrc but how is the syntax and how can I set it for libpgtcl? BTW, SET AUTOCOMMIT TO ON still gives no error, only SET AUTOCOMMIT TO OFF s

Re: [GENERAL] Declaring empty, non-NULL array in plpgsql

2003-11-24 Thread Tom Lane
CSN <[EMAIL PROTECTED]> writes: > Is there a way to declare an array in plpgsql so that > it's empty (not NULL)? Sure. An empty-array literal is '{}', so: regression=# create function foo(int) returns varchar[] as ' regression'# declare regression'# arr varchar[] := ''{}''; regression'# begin

Re: [GENERAL] why ORDER BY works wrong in pg7.3.4?

2003-11-24 Thread igor
Thank u for hint it really helped me - I made initdb with new lc-ctype and lc-collate settings : ru_RU:UTF8. But im still having one question - some functions - lower() and upper() doesnt work properly . what im doing wrong? Tom Lane wrote: igor <[EMAIL PROTECTED]> writes: why "order by" and

[GENERAL] what's the compile option for the postgresql 7.3 in redhat 9 ?

2003-11-24 Thread LitelWang
TKS. ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster