Re: [GENERAL] timezone() with timeofday() converts the wrong direction?

2005-04-24 Thread Karsten Hilbert
On Sun, Apr 24, 2005 at 04:34:31PM -0600, Michael Fuhr wrote: > > gnumed=> select version(); > > version > > --- > > PostgreSQL 7.1.3 on i686-pc-linux-gnu, compiled by GCC 2.95.3 >

[GENERAL] Help-Urgent

2005-04-24 Thread ElayaRaja S
Hi, I am using Redhat Linux 9 and PostgreSQL 7.4.5. While shutdown the linux server i forget to stop the postgresql. After starting the linux server, now i am unable to stop the postgres. When stopping the postgres i am getting the following error as bash-2.05b$ pg_ctl status pg_ctl: postmaste

Re: [GENERAL] Calculated bigserial column in a view

2005-04-24 Thread Bruno Wolff III
On Sun, Apr 24, 2005 at 22:16:14 +0200, Zlatko Matic <[EMAIL PROTECTED]> wrote: > I know that it sounds crazy, > but I need a bigserial coulumn in a view that is consisted of several tables. > That column should not be based on bigserial column of any table, but should > be a calculated column..

[GENERAL] question about about future 8.1 and IN, INOUT, and OUT parameters

2005-04-24 Thread Tony Caduto
I saw that the recently released pl/java has the ablity to use IN, INOUT, and OUT parameters. Is the syntax going to be exactly like it is in Oracle? ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [GENERAL] Immutable attributes?

2005-04-24 Thread Michael Fuhr
On Sun, Apr 24, 2005 at 09:26:49PM +0200, Stephane Bortzmeyer wrote: > > To protect the database from programming errors (there is a team > working on the project and some beginners may produce bugs), I would > like to flag some attributes as immutable, meaning non modifiable in > an UPDATE. (Typic

Re: [GENERAL] Optimising Union Query.

2005-04-24 Thread Jim C. Nasby
On Sat, Apr 23, 2005 at 10:39:14PM +, Patrick TJ McPhee wrote: > In article <[EMAIL PROTECTED]>, > Rob Kirkbride <[EMAIL PROTECTED]> wrote: > > % I've done a explain analyze and as I expected the database has to check > % every row in each of the three tables below but I'm wondering if I can

Re: [GENERAL] timezone() with timeofday() converts the wrong direction?

2005-04-24 Thread Michael Fuhr
On Sun, Apr 24, 2005 at 07:09:44PM +0200, Karsten Hilbert wrote: > Isn't the following what you want? ... > gnumed=> select version(); > version > --- > PostgreSQL 7.1.3 on i686-pc-l

[GENERAL] SQLException "Connection is closed. Operation is not permitted"

2005-04-24 Thread Rajiv Verma
I'm accessing postgres database through tomcat 4.3.1. I'm able to execute the select and update query through my application but Insert query is giving following SQLException : Connection is closed. Operation is not permitted. If I execute the same insert query by simple java program using jdbc c

Re: [GENERAL] Immutable attributes?

2005-04-24 Thread David Fetter
On Sun, Apr 24, 2005 at 09:26:49PM +0200, Stephane Bortzmeyer wrote: > To protect the database from programming errors (there is a team > working on the project and some beginners may produce bugs), I would > like to flag some attributes as immutable, meaning non modifiable in > an UPDATE. (Typical

Re: [GENERAL] Table modifications with dependent views - best practices?

2005-04-24 Thread David Roussel
So I have a scenario in which account creation at the application layer generates a set of tables and indexes. The tables created have foreign keys to tables in use (and frequently read from and written to) by the rest of the application. Occasionally I was getting deadlocks, and this definitel

Re: [GENERAL] Optimising Union Query.

2005-04-24 Thread Patrick TJ McPhee
In article <[EMAIL PROTECTED]>, Rob Kirkbride <[EMAIL PROTECTED]> wrote: % I've done a explain analyze and as I expected the database has to check % every row in each of the three tables below but I'm wondering if I can This is because you're returning a row for every row in the three tables.

Re: [GENERAL] psqlodbc MSAccess and Postgresql

2005-04-24 Thread Zlatko Matic
Hello,   I am currently migrating my MSDE/Access (Access Project) aplication to PostgreSQL. I have experienced a lot of obstacles till now, but anyway it seems quite posible to make a good aplication by this combination of Access front-end and PostgreSQL base. I use the following ODBC setting

[GENERAL] Calculated bigserial column in a view

2005-04-24 Thread Zlatko Matic
I know that it sounds crazy, but I need a bigserial coulumn in a view that is consisted of several tables. That column should not be based on bigserial column of any table, but should be a calculated column... How can I accomplish it ?   Thanks in advance.   Zlatko

[GENERAL] Immutable attributes?

2005-04-24 Thread Stephane Bortzmeyer
To protect the database from programming errors (there is a team working on the project and some beginners may produce bugs), I would like to flag some attributes as immutable, meaning non modifiable in an UPDATE. (Typical examples are ID or creation time.) Currently, I use triggers: CREATE OR RE

Re: [GENERAL] Primary Key and Indices

2005-04-24 Thread Rich Shepard
On Sun, 24 Apr 2005, Ragnar Hafstað wrote: yes. for example, only the first one can be used for ORDER BY org_id gnari, Thank you. I thought it might be the case but I wasn't sure. Rich -- Dr. Richard B. Shepard, President Applied Ecosystem Services, Inc. (TM) Voice:

Re: [GENERAL] New PostgreSQL book coming

2005-04-24 Thread Antoine Solomon
You should try to get it at www.bookpool.com since opensource books are 43% off On 4/24/05, Bruce Momjian wrote: > I have been recommending the Korry Douglas book to people because it is > considered one of the best PostgreSQL books available. I see a new > edition is coming out in May 2005 and

Re: [GENERAL] Primary Key and Indices

2005-04-24 Thread Ragnar =?ISO-8859-1?Q?Hafsta=F0?=
On Sun, 2005-04-24 at 09:49 -0700, Rich Shepard wrote: >I'm converting mysql tables to postgres. One of the tables has this: > >PRIMARY KEY (org_id, contact_id), >KEY contact (contact_id, org_id) > >Is there really a difference in the two indices if the sequence of fields > is rev

Re: [GENERAL] timezone() with timeofday() converts the wrong direction?

2005-04-24 Thread Karsten Hilbert
On Sun, Apr 24, 2005 at 10:49:13AM -0600, Michael Fuhr wrote: > > > As far as I know, it's not possible to get output like the following > > > from the same query if the data type is timestamp with time zone: > > > > > > 2005-04-21 15:00:00-07 > > > 2005-04-21 22:00:00+00 > > > > Doesn't "at tim

Re: [GENERAL] timezone() with timeofday() converts the wrong direction?

2005-04-24 Thread Michael Fuhr
On Sun, Apr 24, 2005 at 05:21:41PM +0200, Karsten Hilbert wrote: > > > > As far as I know, it's not possible to get output like the following > > from the same query if the data type is timestamp with time zone: > > > > 2005-04-21 15:00:00-07 > > 2005-04-21 22:00:00+00 > > Doesn't "at time zone"

[GENERAL] Primary Key and Indices

2005-04-24 Thread Rich Shepard
I'm converting mysql tables to postgres. One of the tables has this: PRIMARY KEY (org_id, contact_id), KEY contact (contact_id, org_id) Is there really a difference in the two indices if the sequence of fields is reversed? Thanks, Rich -- Dr. Richard B. Shepard, President Applied Ecosystem

[GENERAL] Delphi personal (was Playing with PostgreSQL and Access VBA)

2005-04-24 Thread Tony Caduto
All you need is the Personal Edition of say Delphi 6 or Delphi 7, and even Delphi 2005. For Delphi 2005 personal edition see this link: http://andy.jgknet.de/oss/kylix/wiki/index.php/Delphi_2005_Personal_Edition_xmlrtl.dcp_fake Heck, Delphi 5 is still extremely viable and can do anything 6,7 or 20

Re: [GENERAL] Had a problem with pg_clog

2005-04-24 Thread Tom Lane
Peter Wiersig <[EMAIL PROTECTED]> writes: > On Sat, Apr 23, 2005 at 08:19:31PM -0400, Tom Lane wrote: >> Peter Wiersig <[EMAIL PROTECTED]> writes: >>> vacuumdb -z miwabar >>> PANIC: open of /var/lib/pgsql/data/pg_clog/ failed: >>> Keine Berechtigung >>> server closed the connection unexpectedl

Re: [GENERAL] psqlODBC and Access

2005-04-24 Thread Tony Caduto
Let's not forget about PG Lightning Admin :-) http://www.amsoftwaredesign.com In case you don't like PgAdminIII you may try commercial products like EMS PostgreSQL Manager http://sqlmanager.net/products/postgresql/manager What they call "Visual Database Designer" might just be what you are looking

Re: [GENERAL] timezone() with timeofday() converts the wrong direction?

2005-04-24 Thread Karsten Hilbert
> As far as I know, it's not possible to get output like the following > from the same query if the data type is timestamp with time zone: > > 2005-04-21 15:00:00-07 > 2005-04-21 22:00:00+00 Doesn't "at time zone" do what you need ? Karsten -- GPG key ID E4071346 @ wwwkeys.pgp.net E167 67FD A29

Re: [GENERAL] [Question]batch execute sql command

2005-04-24 Thread Michael Fuhr
On Sun, Apr 24, 2005 at 02:08:33PM +0100, neo anderson wrote: > > i encounter a question when create database schema. > because i have a sql script, in which contains lots of > sql command, including insert, create table, create > index and so on. however, i do know weather postgresql > supports ba

[GENERAL] Locale question

2005-04-24 Thread Matthew T. O'Connor
I have a (hopefully simple) question regarding locale. I am migrating a postgresql database from a server running FC1 & PostgreSQL 7.4 to a newer machine running FC2 and PostgreSQL 8.0. I dumped the data from the old server using pg_dumpall and restored it to the new server with no problems, an

[GENERAL] [Question]batch execute sql command

2005-04-24 Thread neo anderson
Hi, i encounter a question when create database schema. because i have a sql script, in which contains lots of sql command, including insert, create table, create index and so on. however, i do know weather postgresql supports batch executing sql script or not, for i try to run scrtip like what or

Re: [GENERAL] optimal hardware for postgres?

2005-04-24 Thread William Yu
peter pilsl wrote: I was now wondering which hardware would fit this server best. I think about 2GB RAM, a fast Raid1 and now I'm not sure about the CPU. I was considering 64-bit AMD : A Athlon 64 FX-51 or a Opteron 2.2GHz. The hosting system will be a 64-Bit linux. While the A64 and Opteron are t

[GENERAL] New PostgreSQL book coming

2005-04-24 Thread Bruce Momjian
I have been recommending the Korry Douglas book to people because it is considered one of the best PostgreSQL books available. I see a new edition is coming out in May 2005 and covers 8.0: http://search.barnesandnoble.com/booksearch/isbnInquiry.asp?userid=1K8b8TLBBo&isbn=0672327562&itm=1

Re: [GENERAL] PHP and Postgresql on Windows

2005-04-24 Thread Hannes Dorbath
On 23.04.2005 00:03, David Roussel wrote: Try PEAR DB. http://pear.php.net/package/DB It's a database abstraction layer, which means that you can change DB later, with less hasle. http://www.powerpostgresql.com/Downloads/database_depends_public.swf :) I really dislike db abstraction layers and PEA

Re: [GENERAL] psqlODBC and Access

2005-04-24 Thread Hannes Dorbath
On 23.04.2005 03:23, [EMAIL PROTECTED] wrote: Should I not use MONEY in defining such fields to be used with ACCESS? Is there a different TYPE that I should use in my definition? Thanks! From http://www.postgresql.org/docs/8.0/interactive/datatype-money.html "The money type is deprecated. Use

Re: [GENERAL] Had a problem with pg_clog

2005-04-24 Thread Peter Wiersig
On Sat, Apr 23, 2005 at 08:19:31PM -0400, Tom Lane wrote: > Peter Wiersig <[EMAIL PROTECTED]> writes: > > vacuumdb -z miwabar > > PANIC: open of /var/lib/pgsql/data/pg_clog/ failed: > >Keine Berechtigung > > server closed the connection unexpectedly > > What PG version

[GENERAL] optimal hardware for postgres?

2005-04-24 Thread peter pilsl
I'm just going to buy a new server which will mainly run a postgreSQL-database and a apache2 with mod_perl and do little more than deliver loads of index-based select-queries. But it will have to do a lot of them. And it will be master for a replication to slaves. As always of course we dont kno