Re: [GENERAL] C locale

2004-03-09 Thread scott.marlowe
On Tue, 2 Mar 2004, Ara Anjargolian wrote: > I've been searching the list archives and the web for a while about which > locale is best used with PostgreSQL and I did not find a satisfactory answer > so I > thought I would ask the list. > > Right now my locale is en_US, but with this you can not

[GENERAL] does this look more like a possible bug or more like a possible hardware problem...? (long)

2004-03-09 Thread Frank van Vugt
Hi, I'm using a 9500 line script to create an initial database. After applying a number of changes, I was repeatedly executing this script while hunting for typos. The script itself takes care of dropping the various objects and every now and then (when delta t << autovacuum t) a manual vacuum

Re: [GENERAL] Error message

2004-03-09 Thread scott.marlowe
On 3 Mar 2004, Eric wrote: > Hello. > > After I have performed several queries by an external program on the > database, an error message appeared: > "hard limit on result handles reached is not a valid query result" > > May I know how to solve the problem? Sounds like an application issue, not

Re: [GENERAL] Question on stored functions

2004-03-09 Thread Bill Moran
Gunjeet Singh wrote: Hi, I could only find support for defining functions in pl/pgsql. With a function I can have only one return value. What if I need to have multiple OUT parameters (i.e multiple return values) ? Is there any support for something that is similar to an Oracle stored procedure ?

Re: [GENERAL] C locale

2004-03-09 Thread Stephan Szabo
On Tue, 2 Mar 2004, Ara Anjargolian wrote: > I've been searching the list archives and the web for a while about > which locale is best used with PostgreSQL and I did not find a > satisfactory answer so I thought I would ask the list. > > Right now my locale is en_US, but with this you can not use

Re: [GENERAL] Shouldn't B'1' = 1::bit be true?

2004-03-09 Thread Stephan Szabo
On Wed, 3 Mar 2004, Bill Moran wrote: > Am I missing something here? > > agelis=# select B'1'::int; > int4 > -- > 1 > (1 row) > > agelis=# select 1::bit; > bit > - > 0 > (1 row) > > agelis=# select B'1'=1; > ?column? > -- > f > (1 row) > > Last I checked, binary 1 a

Re: [GENERAL] How do I change column details

2004-03-09 Thread Bruce Momjian
Simon Windsor wrote: > Hi > > I have a MySQL application which I am porting to Postgres. I have been > asked to increase the size of a varchar column from 200 chars to 2000. > > Normally, in MySQL/Oracle this is done with the alter table modify > column command. > > How do I do this in Postgres?

Re: [GENERAL] Shouldn't B'1' = 1::bit be true?

2004-03-09 Thread Tom Lane
Bill Moran <[EMAIL PROTECTED]> writes: > Am I missing something here? Hmm. It seems like int-to-bit casting ought to be aware of the bit-width one is casting to, and take that number of bits from the right end of the integer. This would make it be the inverse of the other direction. Right now i

Re: [GENERAL] autocommit to off?

2004-03-09 Thread Tom Lane
Bricklen <[EMAIL PROTECTED]> writes: > I've scoured the net for a simple way to set AUTOCOMMIT off in psql, for > the duration of a session (not simply a transaction). The only real > reference that I can find says that "\set autocommit off" will do what I > want. It doesn't though. You didn't

[GENERAL] How do I change column details

2004-03-09 Thread Simon Windsor
Hi I have a MySQL application which I am porting to Postgres. I have been asked to increase the size of a varchar column from 200 chars to 2000. Normally, in MySQL/Oracle this is done with the alter table modify column command. How do I do this in Postgres? I have just renamed the column, creat

Re: [GENERAL] Shouldn't B'1' = 1::bit be true?

2004-03-09 Thread Bill Moran
Stephan Szabo wrote: On Wed, 3 Mar 2004, Bill Moran wrote: Am I missing something here? agelis=# select B'1'::int; int4 -- 1 (1 row) agelis=# select 1::bit; bit - 0 (1 row) agelis=# select B'1'=1; ?column? -- f (1 row) Last I checked, binary 1 and integer 1 were equal.

[GENERAL] Composite types in tables

2004-03-09 Thread Floyd Shackelford
Are there any plans for PostGreSQL to support something like the following without having to write specialized C code for each type? (or maybe it already does?) create type a_type ( field_a int, field_b int ); create table a_table ( a_column a_type ); If i try this now, i get "column 'a_c

Re: [GENERAL] Record order change after update

2004-03-09 Thread Christopher Browne
Clinging to sanity, [EMAIL PROTECTED] (Josué Maldonado) mumbled into her beard: > After update a column on a table, that row goes to the top when I do a > select from that table without any order, is that the expected > behavior in postgresql? is there a way to prevent it? Prevent what? SQL retur

[GENERAL] RH7.3 / PGSQL7.4.1 binary distribution

2004-03-09 Thread Leo Sutic
Hi! I tried to find the binary distribution of Postgresql 7.4.1 for RedHat 7.3. The FTP directory was empty so I Googled for it and found some RPMs at http://developer.postgresql.org/ftpsite/binary/v7.4.1/redhat/redhat-7.3/ . However, when I tried to dowload them I received a "403 Forbidden" respo

Re: [GENERAL] autocommit to off?

2004-03-09 Thread Bruce Momjian
Bricklen wrote: > Hi all, > > I've scoured the net for a simple way to set AUTOCOMMIT off in psql, for > the duration of a session (not simply a transaction). The only real > reference that I can find says that "\set autocommit off" will do what I > want. It doesn't though. For example, if sess

[GENERAL] Shouldn't B'1' = 1::bit be true?

2004-03-09 Thread Bill Moran
Am I missing something here? agelis=# select B'1'::int; int4 -- 1 (1 row) agelis=# select 1::bit; bit - 0 (1 row) agelis=# select B'1'=1; ?column? -- f (1 row) Last I checked, binary 1 and integer 1 were equal. Is this a bug, or is there a reason for this that I need educ

Re: [GENERAL] Question on stored functions

2004-03-09 Thread scott.marlowe
On Wed, 3 Mar 2004, Gunjeet Singh wrote: > > Hi, > > I could only find support for defining functions in pl/pgsql. > With a function I can have only one return value. What if I need > to have multiple OUT parameters (i.e multiple return values) ? > Is there any support for something that is simi

Re: [GENERAL] Simple, but VERYuseful enhancement for psql command - or am I missing something?

2004-03-09 Thread Ben
I want to thank everyone for replying - that was really great. My specific issue sounds like it would be best addressed using variables. Thanks hugely for the pointer on that one. Displaying things vertically isn't going to work for me in particular; you lose too much display area that way. I nee

[GENERAL] need advice.

2004-03-09 Thread JustSomeGuy
I have a database that should be quite simple to do. I have a base object that is easily defined as create table myObject ( a integer, b integer, len integer, data bytea ); Now this really should be a type: And oddly enough it is the only type of data in the entire database. A l

[GENERAL] using Postgres to store many small files

2004-03-09 Thread Matthew Hixson
I am currently working on a Java web application. We are making use of the JDBC driver for Postgres 7.4.1. Part of our application allows the administrators to manage a large number of small images, most of them not exceeding 5KB. There is about a gigabyte of these small files. We're curren

Re: [GENERAL] plpgsql trigger function with arguments

2004-03-09 Thread Colin Fox
On Tue, 02 Mar 2004 21:35:27 -0600, Karl O. Pinc wrote: <..>> > CREATE TRIGGER pregs_insert_trigger >AFTER INSERT >ON pregs FOR EACH ROW >EXECUTE PROCEDURE pregs_func('insert'); > > CREATE TRIGGER pregs_update_trigger >AFTER UPDATE >ON pregs FOR EACH ROW >EXECUTE PROCEDUR

[GENERAL] Error message

2004-03-09 Thread Eric
Hello. After I have performed several queries by an external program on the database, an error message appeared: "hard limit on result handles reached is not a valid query result" May I know how to solve the problem? Thank you ---(end of broadcast)

Re: [GENERAL] autocommit to off?

2004-03-09 Thread scott.marlowe
On Wed, 3 Mar 2004, Bricklen wrote: > Hi all, > > I've scoured the net for a simple way to set AUTOCOMMIT off in psql, for > the duration of a session (not simply a transaction). The only real > reference that I can find says that "\set autocommit off" will do what I > want. It doesn't though.

[GENERAL] C locale

2004-03-09 Thread Ara Anjargolian
I've been searching the list archives and the web for a while about which locale is best used with PostgreSQL and I did not find a satisfactory answer so I thought I would ask the list. Right now my locale is en_US, but with this you can not use standard indexes for LIKE queries, so I am left with

[GENERAL] Trigger using 'if NEW = OLD'

2004-03-09 Thread Colin Fox
I've got a trigger function that gets executed after an insert or an update. It basically just creates a copy of the row in a history table. However, there are cases when a row will be updated to be the same as it was - in other words, no change. In these cases, the history is useless and taking u

[GENERAL] autocommit to off?

2004-03-09 Thread Bricklen
Hi all, I've scoured the net for a simple way to set AUTOCOMMIT off in psql, for the duration of a session (not simply a transaction). The only real reference that I can find says that "\set autocommit off" will do what I want. It doesn't though. For example, if session A inserts a row, then s

[GENERAL] Question on stored functions

2004-03-09 Thread Gunjeet Singh
Hi, I could only find support for defining functions in pl/pgsql. With a function I can have only one return value. What if I need to have multiple OUT parameters (i.e multiple return values) ? Is there any support for something that is similar to an Oracle stored procedure ? I understand that I

Re: [GENERAL] 7.4.1 upgrade issues

2004-03-09 Thread Gavin M. Roy
Thanks, I'll take a look, we've rewritten the queries and indexes to avoid the issue, but I'd like to get an ultimate solution to the issue, and the concept that it's a linux kernel scheduling thing is probably dead on. Gavin Karl O. Pinc wrote: This reminds me of the scheduler optimizations

Re: [GENERAL] 7.4.1 upgrade issues

2004-03-09 Thread Karl O. Pinc
This reminds me of the scheduler optimizations that have been flying around the Linux kernel deveopment over the last year or so. There are cases apparently where this kind of behavior can come up. IIRC it's fixed in later kernels but don't take my word for it, I'm just writing to give a heads-up