Re: [GENERAL] ISO week dates

2006-10-07 Thread Peter Eisentraut
Brendan Jurd wrote: > * add an ISO day format pattern to to_char() called 'ID', which > starts at Monday = 1, and > * add an ISO year field to extract() called 'isoyear'? That seems reasonable. Do you volunteer? -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---

[GENERAL] time conversion fuinctions

2006-10-07 Thread Rafal Pietrak
Hi All, Is this the expected result? The question particularly apply to the last SELECT. I'd expected it to return boolean value just like in the second example below. It returns nothing instead, and does not rise an error either. Is this the correct behavior? But also, is it correct for a func

Re: [GENERAL] URGENT - startup process (PID 29541) was terminated by signal 6

2006-10-07 Thread Emanuele Rocca
Hello Tom, * Tom Lane <[EMAIL PROTECTED]>, [2006-10-06 15:16 -0400]: > Um, were you running with full_page_writes off? Bad idea in 8.1 :-( ... The manual [1] says that full_page_writes is ignored and always treated as if it was set to on. Is it wrong? ciao, ema [1] http://www.postgresql.

Re: [GENERAL] failure to connect to postgres DB via pg.el

2006-10-07 Thread Andreas Seltenreich
Martin Steffen writes: > worked fine for some years, only that when I changed recently to a new > linux distribution (from Suse 10 to the latest Fedora core), things broke. [...] > - or postgres applies tougher access restrictions on > the new linux distribution, and therefore rejects me >

Re: [GENERAL] URGENT - startup process (PID 29541) was

2006-10-07 Thread Bruce Momjian
Emanuele Rocca wrote: -- Start of PGP signed section. > Hello Tom, > > * Tom Lane <[EMAIL PROTECTED]>, [2006-10-06 15:16 -0400]: > > Um, were you running with full_page_writes off? Bad idea in 8.1 :-( ... > > The manual [1] says that full_page_writes is ignored and always treated > as if it was

Re: [GENERAL] time conversion fuinctions

2006-10-07 Thread Tom Lane
Rafal Pietrak <[EMAIL PROTECTED]> writes: > Is this the expected result? timestamp_date() currently returns NULL if the timestamp is infinity. Since we don't have any representation for infinity in the date type, this is pretty much its only alternative other than throwing an error (which might i

Re: [GENERAL] time conversion fuinctions

2006-10-07 Thread brian
Tom Lane wrote: Rafal Pietrak <[EMAIL PROTECTED]> writes: Is this the expected result? timestamp_date() currently returns NULL if the timestamp is infinity. Since we don't have any representation for infinity in the date type, this is pretty much its only alternative other than throwing an e

[GENERAL] performace review

2006-10-07 Thread Tomi NA
I was just reading http://www.opencrx.org/faq.htm where RDBMS engines are one of the questions and see pgsql bashed sentence after sentence. Can anyone offer any insight as to weather it's fact or FUD? t.n.a. ---(end of broadcast)--- TIP 2: Don't '

Re: [GENERAL] time conversion fuinctions

2006-10-07 Thread Rafal Pietrak
On Sat, 2006-10-07 at 11:57 -0400, Tom Lane wrote: > Rafal Pietrak <[EMAIL PROTECTED]> writes: > > Is this the expected result? > > timestamp_date() currently returns NULL if the timestamp is infinity. > Since we don't have any representation for infinity in the date type, I understand, you mean

Re: [GENERAL] performace review

2006-10-07 Thread Alexander Staubo
On Oct 7, 2006, at 20:06 , Tomi NA wrote: I was just reading http://www.opencrx.org/faq.htm where RDBMS engines are one of the questions and see pgsql bashed sentence after sentence. Can anyone offer any insight as to weather it's fact or FUD? As with any use of a database, it is useless and/o

[GENERAL] increment row number function question

2006-10-07 Thread Matthew Peter
Hello. I need a way to return an iterator result as a column eg,SELECT increment() as ii, some_col from some_tbl order by some_col desc limit 50; ii | some_col+--  1 |   zest  2 |   test  3 |   nest  4 |   fest[...]How can I acheive those results? Thanks for any help

Re: [GENERAL] increment row number function question

2006-10-07 Thread Tom Lane
Matthew Peter <[EMAIL PROTECTED]> writes: > Hello. I need a way to return an iterator result as a column eg, > SELECT increment() as ii, some_col from some_tbl order by some_col desc limit > 50; > ii | some_col > +-- > 1 | zest > 2 | test > 3 | nest > 4

Re: [GENERAL] performace review

2006-10-07 Thread Jonathan Vanasco
On Oct 7, 2006, at 3:31 PM, Alexander Staubo wrote: I don't see PostgreSQL being "bashed sentence after sentence", however -- the two "known limitations" listed for PostgreSQL are "slow (even for small datasets)" and "jokes [sic] on 3-table-joins" -- and among the open-source databases men

Re: [GENERAL] Sun Java Studio Creator and PostgreSQL

2006-10-07 Thread Poul Møller Hansen
Just because it works with Derby doesn't mean it's PostgreSQL's fault. There's plenty of things that "work" in certain databases that really shouldn't. In any case, you might try asking on pgsql-jdbc, since there's more java-heads over there. I'd also recommend turning query logging on so y

Re: [GENERAL] performace review

2006-10-07 Thread Richard Broersma Jr
> did you notice this line > --- > > *** Please note that we do not recommend PostgreSQL for production > use. While PostgreSQL may be fine for many settings this DBMS simply > does not deliver the performance required for openCRX (PostgreSQL > takes minutes/hours to calculate 3-

Re: [GENERAL] Sun Java Studio Creator and PostgreSQL

2006-10-07 Thread Poul Møller Hansen
Mike Chiarappa skrev: Hello Poul, take a look to thread: http://forum.sun.com/jive/thread.jspa?forumID=123&threadID=101711 It works for me !!! :o)) Mike Thanks Mike, had solved that issue the same way :) Don't know how it works internally, but I guess the JDBC driver is reporting the is

Re: [GENERAL] performace review

2006-10-07 Thread Brandon Aiken
Title: [GENERAL] performace review It wouldn't surprise me if their bashing were correct, but I doubt that it's PostgreSQL's fault.   I download the db source (inside opencrx-1.9.1-core.postgresql-8.zip) and executed their three schema files, dbcreate-indexes.sql, dbcreate-views.sql, dbcreate-ta

Re: [GENERAL] performace review

2006-10-07 Thread Alexander Staubo
On Oct 7, 2006, at 23:44 , Brandon Aiken wrote: I download the db source (inside opencrx-1.9.1- core.postgresql-8.zip) and executed their three schema files, dbcreate-indexes.sql, dbcreate-views.sql, dbcreate-tables.sql. Each of the 118 tables has a three-field composite primary key of 'P

Re: [GENERAL] increment row number function question

2006-10-07 Thread Jorge Godoy
Matthew Peter <[EMAIL PROTECTED]> writes: > Hello. I need a way to return an iterator result as a column eg, > SELECT increment() as ii, some_col from some_tbl order by some_col desc limit > 50; Use a sequence for the iterator. -- Jorge Godoy <[EMAIL PROTECTED]> ---

Re: [GENERAL] performace review

2006-10-07 Thread Joshua D. Drake
Tomi NA wrote: > I was just reading http://www.opencrx.org/faq.htm where RDBMS engines > are one of the questions and see pgsql bashed sentence after sentence. > Can anyone offer any insight as to weather it's fact or FUD? It is 100% FUD. Joshua D. Drake > > t.n.a. > > ---

Re: [GENERAL] performace review

2006-10-07 Thread Brandon Aiken
Title: Re: [GENERAL] performace review Denormalization should reduce the number of joins and reduce the overall number of tables, yes?  And the idea is to fully normalize and then back off because of physical limitations in the database you're using *with full knowledge and understanding that yo

Re: [GENERAL] performace review

2006-10-07 Thread Chris Browne
[EMAIL PROTECTED] (Richard Broersma Jr) writes: >> did you notice this line >> --- >> >> *** Please note that we do not recommend PostgreSQL for production >> use. While PostgreSQL may be fine for many settings this DBMS simply >> does not deliver the performance required for openC

[GENERAL] please how to unsuscribe to list

2006-10-07 Thread Mario Soto
-- cordialmente, Mario Soto Cordones ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [GENERAL] increment row number function question

2006-10-07 Thread Matthew Peter
Thanks for the reply. <[EMAIL PROTECTED]><[EMAIL PROTECTED]>Even if such a function existed, it would almost certainly not do whatyou want in this query. Per SQL spec, the SELECT target list islogically supposed to be evaluated before the ORDER BY and LIMIT steps, which means you'd get numbers ass

[GENERAL] Problem with a date when restoring on postgresql 7.4.9 : date/time field value out of range

2006-10-07 Thread Thomas Poindessous
Hello, I have a problem with my postgresql 7.4.9 server. I tried to restore a dump on the backup server (same version). I got this error : pg_restore: ERROR: date/time field value out of range: "0001-02-29 00:00:00 BC" I understand this error, but I can't understand why postgresql didn't

[GENERAL] How to force the parser to use index scan instead of sequential scan

2006-10-07 Thread ck
Hello, I am using PostgreSQL 7.3.2. I have a large table in a database , its primary key field is int8. Almost all of my queries are written relaing to that field. That field is B-Tree indexed. When i check the query plan i found that all the queries are using sequential scan and index wa

[GENERAL] predefined functions

2006-10-07 Thread Rafal Pietrak
Hi, Is there a reason why both: SELECT current_user; SELECT current_database(); are correct, while neither of: SELECT current_user(); -- syntax at '(' SELECT current_database; -- missing column is? This is as of postgres version 8.1.4 -- Rafal Pietrak <[EMAI

[GENERAL] EXECUTE command in stored procedure

2006-10-07 Thread Arunagiri K
Dear All,How can I use EXCEUTE command in stored procedures?When using like thisEXECUTE 'SELECT INTO REGNO REG_NO FROM ADMISSION WHERE SNAME = ' || STUDNAME ;STUDNAME is a local variable; I am getting error like thisERROR:  syntax error at or near "INTO" at character 8How can I solve this.Regards,A

[GENERAL] failure to connect to postgres DB via pg.el

2006-10-07 Thread Martin Steffen
Hi, I recently stumbled over the following problem, recently because the setup worked fine for some years, only that when I changed recently to a new linux distribution (from Suse 10 to the latest Fedora core), things broke. The set-up is as follows: I got a postgres data base running on a l

Re: [GENERAL] failure to connect to postgres DB via pg.el

2006-10-07 Thread Martin Steffen
> "Andreas" == Andreas Seltenreich <[EMAIL PROTECTED]> writes: Andreas> E.g., while SuSE used the "trust" method for local tcp Andreas> connections, Fedora might be using the "ident" method. yep, that was it! Danke, Martin ---(end of broadcast)

Re: [GENERAL] increment row number function question

2006-10-07 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/07/06 18:47, Matthew Peter wrote: >> Thanks for the reply. Even if such a function existed, it would >> almost certainly not do what you want in this query. Per SQL >> spec, the SELECT target list is logically supposed to be >> evaluated befo

Re: [GENERAL] performace review

2006-10-07 Thread Jonathan Vanasco
On Oct 7, 2006, at 6:41 PM, Chris Browne wrote: This could also be a situation where adding a few useful indexes might fix a lot of ills. Better to try to help fix the problems so as to help show that the comparisons are way off base rather than to simply cast stones... i'm too tight for cash

Re: [GENERAL] How to force the parser to use index scan instead of sequential scan

2006-10-07 Thread Jaime Casanova
On 6 Oct 2006 22:32:16 -0700, ck <[EMAIL PROTECTED]> wrote: Hello, I am using PostgreSQL 7.3.2. I have a large table in a that's very old... you should upgrade at least to 7.3.15 database , its primary key field is int8. Almost all of my queries are written relaing to that field. Th

Re: [GENERAL] How to force the parser to use index scan instead of

2006-10-07 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/07/06 21:10, Jaime Casanova wrote: > On 6 Oct 2006 22:32:16 -0700, ck <[EMAIL PROTECTED]> wrote: [snip] >> index scan, Eg >> select * from h057 where h057001 = 1142::int8 >> the above query uses index scan >> select * from h057 where h057001 = 11

Re: [GENERAL] EXECUTE command in stored procedure

2006-10-07 Thread Guy Rouillier
Arunagiri K wrote: > Dear All, > > How can I use EXCEUTE command in stored procedures? > When using like this > > EXECUTE 'SELECT INTO REGNO REG_NO FROM ADMISSION WHERE SNAME = ' || > STUDNAME ; > > STUDNAME is a local variable; > > I am getting error like this > > ERROR: syntax error at or

Re: [GENERAL] Hi, For the UTF-8 encoding

2006-10-07 Thread stevegy
Hi Martijn,   I had changed my Solaris locale setting to zh_CN.UTF-8. I modified the /etc/default/init LANG=zh_CN.UTF-8 and reboot. initdb a new database used the encoding UTF8, but the sort order is wrong on the Solaris.   I dig into the TODO list on the postgreSQL web site. The Multi-Language Su

Re: [GENERAL] predefined functions

2006-10-07 Thread Tom Lane
Rafal Pietrak <[EMAIL PROTECTED]> writes: > Is there a reason why both: > SELECT current_user; > SELECT current_database(); > are correct, while neither of: > SELECT current_user(); -- syntax at '(' > SELECT current_database; -- missing column > is? Yeah: current_user (wit