Re: [GENERAL] get the previous assigned sequence value

1999-12-09 Thread Ed Loehr
"Ross J. Reedstrom" wrote: > Gah, this is getting a bit annoying, correcting this bit of > mis-information. > > currval() is kept as part of the session context, as is completely > multi-user safe. That's why the person you quoted said 'in the same > session'. > > Where is everyone coming up with

Re: [GENERAL] Problems with pg_dump

1999-12-09 Thread Bruce Momjian
[Charset iso-8859-1 unsupported, filtering to ASCII...] > I'm running Postgresql 6.5.3 on RedHat Linux 6.0. > > When I try to use pg_dump: > > # pg_dump mmt > > I get the following error message: > > pg_dump: couldn't find the template1 database. You are really hosed. Giving > up. > > Both my

Re: [GENERAL] get the previous assigned sequence value

1999-12-09 Thread Ross J. Reedstrom
Gah, this is getting a bit annoying, correcting this bit of mis-information. currval() is kept as part of the session context, as is completely multi-user safe. That's why the person you quoted said 'in the same session'. Where is everyone coming up with the wrong idea on this? Is there a major

Re: [GENERAL] How to stop implicit rollback on certain errors?

1999-12-09 Thread Ross J. Reedstrom
Hmm, sounds like a vote for nested transactions. The JDBC driver developer (Peter Mount) was musing that nested transaction would make large object support easier for him, as well. As to the other example of Oracle not forcing a rollback, I have a feeling that this may be specific to syntax erro

[GENERAL] Problems with pg_dump

1999-12-09 Thread Peter Bojanic
I'm running Postgresql 6.5.3 on RedHat Linux 6.0. When I try to use pg_dump: # pg_dump mmt I get the following error message: pg_dump: couldn't find the template1 database. You are really hosed. Giving up. Both my database, "mmt" and the "template1" database are present and I can connect to t

Re: [GENERAL] parse error ???

1999-12-09 Thread kaiq
cast is not necessarily extract, if you really want portablility, use extract(), which is sql92. select extract (day from d1) from datetime_tbl; On Thu, 9 Dec 1999 [EMAIL PROTECTED] wrote: > >I have one question... > > Why postgres returns parse error when i send > > select birth

Re: [GENERAL] Error: Using Large Objects by perl5-Interface

1999-12-09 Thread kaiq
in your perl script: $dbh->{AutoCommit}=0; you can get more info by perldoc DBI and perldoc DBD::Pg On Thu, 9 Dec 1999, Hans Reichenecker wrote: > I want to use Large Objects in PostgreSQL, source is a Perl-Script. But in > unchained mode it won´t work. What else should I do to change in chai

[GENERAL] Setting of locales at runtime ?

1999-12-09 Thread David Sauer
Hi, I have question about postgres: it is possible (or planned) to change locales (and sorting) at runtime ? For example, I will have 2 tables, in 2 different languages. I want following: set locale cs; select * from table1 order by 1; // this will sort by first column

Re: [GENERAL] Where is IFNULL?

1999-12-09 Thread Jose Soares
select * from a; a|b -+- 1|primo 2| (2 rows)   SELECT CASE WHEN b IS NOT NULL THEN 'pref.'||b||'.suf' ELSE 'pref.'||'NULL'||'.suf' END FROM a; case -- pref.primo.suf pref.NULL.suf (2 rows)   Jose' Sascha Ziemann wrote: "Gene Selkov Jr." <[EMAIL PROTECTED]>: | > the user manual des

Re: [GENERAL] get the previous assigned sequence value

1999-12-09 Thread Nikolay Mijaylov
Why you discuss it The problem is quite clean and it was solvev many years ago. 1. Get the *next* sequence value: select nextval("gogo_seq"); 2. Store it into a variable (for example $X) 3. Insert proper data (and and sequence value) insert into gogo values( $X, 'NMMM', 'mailto:[EMAIL PR

[GENERAL] Function arguments

1999-12-09 Thread Sascha Ziemann
Hi, is there a way to define a function, that accepts a TEXT value and NULL as an argument? bis später... Sascha

Re: [GENERAL] How to stop implicit rollback on certain errors?

1999-12-09 Thread Jose Soares
Peter Eisentraut wrote: > On 1999-12-08, Lincoln Yeoh mentioned: > > > begin; > > insert into stuff; > > do some nondatabase things based on last inserted id; > > update a date in stuff; > > commit; > > > > It seems that if the date is out of the database range, everything is > > thrown out. Is i

Re: [GENERAL] operator *=

1999-12-09 Thread Karel Zak - Zakkr
On 9 Dec 1999, Sascha Ziemann wrote: > Hi, > > I have two tables "user_t" and "email_alias_t". The "user_t" table > has the two fields "last_name" and "linux_login" and the > "email_alias_t" table has the two fields "login" and "alias". > > In some rows in the "user_t" table the entry "linux_

Re: [GENERAL] get the previous assigned sequence value

1999-12-09 Thread Adriaan Joubert
> > With this second method, you'd probably need to beware race conditions. If > > another process inserts a record into mytable after you do but before you > > call currval(), then you'll get the wrong value. > > > > Not an issue if you've only got one process accessing the table - probably > > i

[GENERAL] operator *=

1999-12-09 Thread Sascha Ziemann
Hi, I have two tables "user_t" and "email_alias_t". The "user_t" table has the two fields "last_name" and "linux_login" and the "email_alias_t" table has the two fields "login" and "alias". In some rows in the "user_t" table the entry "linux_login" is NULL. Now I need all rows from "user_t" an

Re: [GENERAL] get the previous assigned sequence value

1999-12-09 Thread Stuart Rison
On Thu, 9 Dec 1999, Dev Elop wrote: > > > > > > After an INSERT, I want to retrieve the value of the sequence I use for > > > unique_ids > > > > ... > > > > Alternatively, use the currval(mytable_id_seq) function within the same > > session immediately after the insert. > > > With this second met

[GENERAL] Error: Using Large Objects by perl5-Interface

1999-12-09 Thread Hans Reichenecker
I want to use Large Objects in PostgreSQL, source is a Perl-Script. But in unchained mode it won´t work. What else should I do to change in chained mode ? Users-Guide: "By default, Postgres executes transactions in unchained mode (also known as "autocommit" in other database systems)." S

Re: [GENERAL] get the previous assigned sequence value

1999-12-09 Thread Dev Elop
> > > > After an INSERT, I want to retrieve the value of the sequence I use for > > unique_ids > > ... > > Alternatively, use the currval(mytable_id_seq) function within the same > session immediately after the insert. > With this second method, you'd probably need to beware race conditions. If an

[GENERAL] Please help with these error messages

1999-12-09 Thread V Krishnaraj
Dear Community need your help once again: We are running on one installation 2 databases: one for tracking any activity on a site another for serving out ads based on certain targeting parameters. The OS is Linux and the Web Server is Apache We keep getting around 5-7 requests / sec and activ

[GENERAL] parse error ???

1999-12-09 Thread greg
I have one question... Why postgres returns parse error when i send select birth_time::date from table; parse error at or near ":" I use CBuilder4 and postODBC driver... when I write select date(birth_time) from table; it works... but in DataBaseExplorer th