[GENERAL] delete my email from the list

2006-03-22 Thread Aftab Alam
Title: Message  

Re: [GENERAL] back slash separated values

2006-03-22 Thread surabhi.ahuja
Title: Re: [GENERAL] back slash separated values SHOW server_version; server_version 8.0.6(1 row)   the stored procedure is :   CREATE OR REPLACE FUNCTION update_exam_modality(bigint, varchar(16)) RETURNS text AS'DECLARE    mod_of_study varchar(16);    mod_pattern varcha

Re: [GENERAL] partial resultset in java

2006-03-22 Thread surabhi.ahuja
Title: Re: [GENERAL] partial resultset in java   on which object is this method "cancel()" avaialble. the peice of code that i am looking at right now is :   Statement stmt_ = this.dbSession_.getDBConnection().createStatement();String queryStr = dbxQuery.createQuery(DBObject.getLevelNumber(

Re: [GENERAL] Enforcing serial uniqueness?

2006-03-22 Thread Steven Brown
Tom Lane wrote: [...] I think the solution for you is to use BEFORE triggers as suggested upthread. The BEFORE INSERT trigger function should be SECURITY DEFINER and owned by a user who has permission to NEXTVAL the sequence. The id column should probably be declared plain integer (or bigint),

Re: [GENERAL] index for inet and >> (contains) function

2006-03-22 Thread Michael Glaesemann
On Mar 23, 2006, at 1:35 , Richard Jones wrote: select countryid from iptocountry where network >> '1.2.3.4'; Is there a suitable index that I can put on the network field to fix this? Have you taken a look at the ip4r pgfoundry project? http://pgfoundry.org/projects/ip4r/ From the READM

[GENERAL] substitute for array functions in postgresql v7.3 ?

2006-03-22 Thread Alain BAUDHUIN
Title: Message Hello!   Does anybody know whether ther is a substitue for the array_to_string function available from v7.4, that would allow a query equivalent to this one to run on v7.3:   select array_to_string(array[1,2,3]);    (ok from v7.4)   Having a 7.3 substitute for select array[1

Re: [GENERAL] Hi,

2006-03-22 Thread Tom Lane
"Brian Kitzberger" <[EMAIL PROTECTED]> writes: > When I did I get "pg_dump: server version: 8.1.3; pg_dump version: > 7.4.8" Apparently you already had a 7.4.8 postgres installed on your machine. Most versions of Linux do have PG in them. You probably want to remove the 7.4.8 files to avoid con

Re: [GENERAL] question about the admin contrib module and binary

2006-03-22 Thread Tom Lane
"Dave Page" writes: >> There's also a licensing issue which is that pgAdmin is GPL, while >> we're trying to make sure that all contrib modules are licensed >> the same as the core server. > Yeuch, not GPL - Artistic. Oh, my mistake, I looked at the phppgadmin home page not pgadmin's. But relice

Re: [GENERAL] question about the admin contrib module and binary

2006-03-22 Thread Magnus Hagander
> There's also a licensing issue which is that pgAdmin is GPL, > while we're trying to make sure that all contrib modules are > licensed the same as the core server. No, pgAdmin is Artistic License, not GPL. Still not BSD, tough, so the argument still holds even if the difference isn't as big.

[GENERAL] Hi,

2006-03-22 Thread Brian Kitzberger
Hi, I am a new user testing this open-source database and I have a few questions. I was able to install PostgreSQL version 8.1.3 on Linux version 9 using the simple install script provided. I created a simple database and populated the database with some data. The inserts, select, delete, drop,

Re: [GENERAL] question about the admin contrib module and binary

2006-03-22 Thread Dave Page
> -Original Message- > From: Tom Lane [mailto:[EMAIL PROTECTED] > Sent: 22 March 2006 22:02 > To: Dave Page > Cc: Tony Caduto; Devrim GUNDUZ; pgsql-general@postgresql.org > Subject: Re: [GENERAL] question about the admin contrib > module and binary > > "Dave Page" writes: > > Yeah -

Re: [GENERAL] Old pg_xlog files

2006-03-22 Thread Tom Lane
"Tass Chapman" <[EMAIL PROTECTED]> writes: > Any suggestions on what I can look at to see why the checkpoint was so far > outstanding and why it hung on in a Zombie state when we tried a soft boot? If it was in a funny process state, I'd guess that there was some hardware problem that caused a dis

Re: [GENERAL] question about the admin contrib module and binary

2006-03-22 Thread Devrim GUNDUZ
Hi, On Wed, 2006-03-22 at 15:52 -0600, Tony Caduto wrote: > All I am trying to say is that it should be included in this file: > postgresql-contrib-8.1.3-1PGDG.i686.rpm > so binary linux users can use it almost as easy as the binary win32 > users. It won't happen, because adminpack is not in con

Re: [GENERAL] question about the admin contrib module and binary

2006-03-22 Thread Tom Lane
"Dave Page" writes: > Yeah - wxWidgets, GTK etc. but none are required by the admin module, > only by pgAdmin itself on the users workstation. Oh, so what we're talking about is some server-side support functions for the pgAdmin client? OK, that's not what I was envisioning. From a dependency s

Re: [GENERAL] question about the admin contrib module and binary

2006-03-22 Thread Tony Caduto
Dave Page wrote: Well in fairness to Tony we do refer to it as a 'contrib' module, but that's because it uses the contrib build system (or PGXS in SVN trunk). Devrim has said he will build it as a separate RPM - in the meantime a source tarball can be downloaded from http://www.pgadmin.org/d

Re: [GENERAL] question about the admin contrib module and binary

2006-03-22 Thread Tony Caduto
Which is one very good reason why it should be a separate RPM, no? If it were in the contrib RPM then you could not install that RPM *at all* on a machine that didn't have all of pgadmin's dependencies. I don't know offhand what its dependencies are, but I'd imagine they include a fair number

Re: [GENERAL] question about the admin contrib module and binary

2006-03-22 Thread Dave Page
> -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Tom Lane > Sent: 22 March 2006 21:31 > To: Tony Caduto > Cc: Devrim GUNDUZ; pgsql-general@postgresql.org > Subject: Re: [GENERAL] question about the admin contrib > module and binary > > Tony Cadu

Re: [GENERAL] Advantages of PostgreSQL over MySQL 5.0

2006-03-22 Thread Russ Brown
On Wed, 2006-03-22 at 16:36 -0500, Merlin Moncure wrote: > Chis Browne wrote: > > PostgreSQL is likely to be way slower if you submit streams of little > > queries, each an independent transaction... > > When I get around to it I plan on debunking this ;). I recently did > extensive internal benc

Re: [GENERAL] Old pg_xlog files

2006-03-22 Thread Tass Chapman
Thanks all. It is finally begining to reuse them.   Any suggestions on what I can look at to see why the checkpoint was so far outstanding and why it hung on in a Zombie state when we tried a soft boot?  On 3/22/06, Tom Lane <[EMAIL PROTECTED]> wrote: Vivek Khera <[EMAIL PROTECTED]> writes:> On Mar

Re: [GENERAL] Advantages of PostgreSQL over MySQL 5.0

2006-03-22 Thread Merlin Moncure
Chis Browne wrote: > PostgreSQL is likely to be way slower if you submit streams of little > queries, each an independent transaction... When I get around to it I plan on debunking this ;). I recently did extensive internal benchmarking of mysql 5.0 vs. postgresql 8.1 and it's victories across th

Re: [GENERAL] Advantages of PostgreSQL over MySQL 5.0

2006-03-22 Thread Dann Corbit
I see a titanic advantage of PostgreSQL over MySQL: the license. http://www.postgresql.org/about/licence http://www.mysql.com/company/legal/licensing/commercial-license.html Would you like to use the database for commercial purposes? To my way of thinking, the Berkeley style license is the best

Re: [GENERAL] question about the admin contrib module and binary

2006-03-22 Thread Tom Lane
Tony Caduto <[EMAIL PROTECTED]> writes: > I understand it was created by the pgAdmin project, but don't you think > it would be better to be with the rest of the contrib modules? Except it isn't one of the contrib modules. The fact that you think of it as being like them doesn't make it one of t

Re: [GENERAL] question about the admin contrib module and binary

2006-03-22 Thread Tony Caduto
As far as I can tell there is no admin813 contrib module... I am looking at my 8.1.3 source install and there is no contrib module named that??? If the pgAdmin folks would like to submit it to PostgreSQL contrib that is a different argument. Joshua D. Drake Hi Joshua, You are correct,

Re: [GENERAL] quirk with update a from b

2006-03-22 Thread Tom Lane
"Mike G." <[EMAIL PROTECTED]> writes: > UPDATE bb > SET bb.b_col1 = aa.a_col1 > FROM aa > WHERE bb.b_col1 <> aa.a_col1; > Error: column "bb" of relation "bb" does not exist. > Maybe in a future version the alias can be allowed? No. It's contrary to SQL spec, and if we allowed it we'd have an am

Re: [GENERAL] PANIC: heap_update_redo: no block

2006-03-22 Thread Alex bahdushka
On 3/21/06, Qingqing Zhou <[EMAIL PROTECTED]> wrote: > > "Tom Lane" <[EMAIL PROTECTED]> wrote > > > > While at it, you should extend the error message to include the relation > > ID, so you have some idea which table is affected ... this is certainly > > not a very informative message ... > > > > E

Re: [GENERAL] question about the admin contrib module and binary

2006-03-22 Thread Joshua D. Drake
Tony Caduto wrote: Devrim GUNDUZ wrote: Admin81 stuff is not a part of PostgreSQL RPMs -- it is a part of pgadmin3 project. gards, Hi, I understand it was created by the pgAdmin project, but don't you think it would be better to be with the rest of the contrib modules? I and many others

Re: [GENERAL] Advantages of PostgreSQL over MySQL 5.0

2006-03-22 Thread Scott Marlowe
On Wed, 2006-03-22 at 05:06, Jimbo1 wrote: > Hello there, > > I'm a freelance Oracle Developer by trade (can almost hear the boos now > ;o)), and am looking into developing my own Snowboarding-related > website over the next few years. Anyway, I'm making some decisions now > about the site archite

Re: [GENERAL] question about the admin contrib module and binary

2006-03-22 Thread Tony Caduto
Devrim GUNDUZ wrote: Admin81 stuff is not a part of PostgreSQL RPMs -- it is a part of pgadmin3 project. gards, Hi, I understand it was created by the pgAdmin project, but don't you think it would be better to be with the rest of the contrib modules? I and many others don't want to insta

[GENERAL] quirk with update a from b

2006-03-22 Thread Mike G.
CREATE TABLE aa ( a_col1 text ); CREATE TABLE bb ( b_col1 text ); This update works: UPDATE bb SET b_col1 = aa.a_col1 FROM aa WHERE bb.b_col1 <> aa.a_col1; This does not: UPDATE bb SET bb.b_col1 = aa.a_col1 FROM aa WHERE bb.b_col1 <> aa.a_col1; Error: column "bb" of relation "bb" does not exis

Re: [GENERAL] Advantages of PostgreSQL over MySQL 5.0

2006-03-22 Thread Guy Fraser
On Wed, 2006-22-03 at 11:34 -0800, Benjamin Smith wrote: > On Wednesday 22 March 2006 03:06, Jimbo1 wrote: > > Hello there, > > > > I'm a freelance Oracle Developer by trade (can almost hear the boos now > > ;o)), and am looking into developing my own Snowboarding-related > > website over the next

Re: [GENERAL] Confused about a function returning SETOF

2006-03-22 Thread Ken Winter
Well, duh! Thank you. I could have stared at it for hours without seeing it... > -Original Message- > From: Tom Lane [mailto:[EMAIL PROTECTED] > Sent: Tuesday, March 21, 2006 11:12 PM > To: [EMAIL PROTECTED] > Cc: PostgreSQL pg-general List > Subject: Re: [GENERAL] Confused about a funct

Re: [GENERAL] Updating database structure

2006-03-22 Thread Janning Vygen
Am Mittwoch, 22. März 2006 20:40 schrieb Luuk Jansen: > I have a problem with finding a way to update a database structure. > This might be a very simple problem, just cannot find the info. > > I am looking at updating the structure of my database. I put an > application on my production server som

Re: [GENERAL] Advantages of PostgreSQL over MySQL 5.0

2006-03-22 Thread Kenevel
Jimbo1 wrote: > Hello there, > > Regarding MySQL Hi Jimbo, As I'm sure you've asked the same question of the MySQL folks, can you tell us what they've said about "us"? I guess it's not just idle curiosity (90% though), but it might give us some pointers about how to improve either our marketing,

Re: [GENERAL] how to update structural & data changes between PostgreSQL

2006-03-22 Thread Jeff Amiel
We have a fairly 'good' process at our shop that we follow that works for us First we do a schema comparison between our prod and devl/test environments using the EMS PostgreSQL database comparer tool... We extract the DDL changes that it produces ("alter table add column, etc") and place

Re: [GENERAL] Updating database structure

2006-03-22 Thread Johan Vromans
Luuk Jansen <[EMAIL PROTECTED]> writes: > How can I update the structure on the production server to reflect the > database on my test machine in an easy way with preservation of the data > on the production server. There are no major changes in the fields types > etc., mainly additions/deletions

Re: [GENERAL] Advantages of PostgreSQL over MySQL 5.0

2006-03-22 Thread Chris Browne
[EMAIL PROTECTED] ("Joshua D. Drake") writes: > Jimbo1 wrote: >> Hello there, >> I'm a freelance Oracle Developer by trade (can almost hear the boos >> now >> ;o)), and am looking into developing my own Snowboarding-related >> website over the next few years. Anyway, I'm making some decisions now >

Re: [GENERAL] PANIC: heap_update_redo: no block

2006-03-22 Thread Tom Lane
"Qingqing Zhou" <[EMAIL PROTECTED]> writes: > (2) print verbose information after errror If you want to do it that way, the correct thing is for the WAL replay logic to add an error context hook to print the current WAL record, not invent weird hacks in the error processing logic. Compare the way

[GENERAL] Sounds silly ...

2006-03-22 Thread Tomas Lanczos
Hello, I uninstalled the Postrgressql 8.1.0-2 (Win XP Pro) and tried to install the version 8.1.1-1 instead. In the Service configuration window I put in all the required data. After clicking "next" I got an error message that user "XY was not found, and it will be created. During the installation

Re: [GENERAL] question about the admin contrib module and binary

2006-03-22 Thread Devrim GUNDUZ
Hi, On Wed, 2006-03-22 at 13:31 -0600, Tony Caduto wrote: > I just updated my CentOS box to Postgresql 8.1.3 and installed the > contrib rpm and I can't find the admin81 stuff anywhere. > My question is how come this is not included in the RPM based binary > distrubution? Admin81 stuff is not a

[GENERAL] Updating database structure

2006-03-22 Thread Luuk Jansen
I have a problem with finding a way to update a database structure. This might be a very simple problem, just cannot find the info. I am looking at updating the structure of my database. I put an application on my production server some time ago and further developed the application till a point

[GENERAL] how to update structural & data changes between PostgreSQL databases?

2006-03-22 Thread postgresql
Hi, I'm looking for advice on how to update both structural changes and data changes between PostgreSQL databases. Here is my situation: I have both a development and production environment. In the development environment I have a PostgreSQL database that has many tables. Some of the table

Re: [GENERAL] Advantages of PostgreSQL over MySQL 5.0

2006-03-22 Thread Steve Crawford
...I can think of two really high profile Postgresql installs that have recently been discussed: 1. The Wisconsin Court System, search the archives for a recent post about this. 2. The entire .org and .info domains are stored in a Postgresql database. I am sure there are many more. Yup, Sony

Re: [GENERAL] Advantages of PostgreSQL over MySQL 5.0

2006-03-22 Thread Benjamin Smith
On Wednesday 22 March 2006 03:06, Jimbo1 wrote: > Hello there, > > I'm a freelance Oracle Developer by trade (can almost hear the boos now > ;o)), and am looking into developing my own Snowboarding-related > website over the next few years. Anyway, I'm making some decisions now > about the site ar

[GENERAL] question about the admin contrib module and binary RPMs

2006-03-22 Thread Tony Caduto
Hi, I just updated my CentOS box to Postgresql 8.1.3 and installed the contrib rpm and I can't find the admin81 stuff anywhere. My question is how come this is not included in the RPM based binary distrubution? I don't have a source based install of PG anywhere nor do the servers have the compi

Re: [GENERAL] Old pg_xlog files

2006-03-22 Thread Tom Lane
Vivek Khera <[EMAIL PROTECTED]> writes: > On Mar 22, 2006, at 1:37 PM, Tass Chapman wrote: >> Checkpoints appear to be up to date (via pg_controldata), but the >> pg_xlog directory has 95 files, of which 90 are dated before >> midnight yesterday or earlier. >> >> Can I just delete them safely?

Re: [GENERAL] Advantages of PostgreSQL over MySQL 5.0

2006-03-22 Thread Jeffrey Melloy
Jimbo1 wrote: Hello there, I'm a freelance Oracle Developer by trade (can almost hear the boos now ;o)), and am looking into developing my own Snowboarding-related website over the next few years. Anyway, I'm making some decisions now about the site architecture, and the database I'm going to n

Re: [GENERAL] Old pg_xlog files

2006-03-22 Thread Vivek Khera
On Mar 22, 2006, at 1:37 PM, Tass Chapman wrote: Checkpoints appear to be up to date (via pg_controldata), but the pg_xlog directory has 95 files, of which 90 are dated before midnight yesterday or earlier. Can I just delete them safely? Or is there some recovery method I can do? no,

[GENERAL] Old pg_xlog files

2006-03-22 Thread Tass Chapman
I am running postgres 7.4.9 on an LFS system , and had a long outstanding pg_checkpoint that seemed to prevent the DB from being cleanly shutdown. The box was power cycled (not my choice...) and when it came up Postgres did it's recovery and seemed to be fine.   Checkpoints appear to be up to date

Re: [GENERAL] Advantages of PostgreSQL over MySQL 5.0

2006-03-22 Thread Joshua D. Drake
Jimbo1 wrote: Hello there, I'm a freelance Oracle Developer by trade (can almost hear the boos now ;o)), and am looking into developing my own Snowboarding-related website over the next few years. Anyway, I'm making some decisions now about the site architecture, and the database I'm going to ne

Re: [GENERAL] Advantages of PostgreSQL over MySQL 5.0

2006-03-22 Thread Berend Tober
Tony Caduto wrote: Jimbo1 wrote: "With MySQL, customers across all industries are finding ... If any PostgreSQL devotees on this group can comment on the above and its accuracy/inaccuracy, I'd really appreciate it. That's exactly what it is "propoganda", I can think of two really high

Re: [GENERAL] How to release locks

2006-03-22 Thread Andrus
> Do you mean that the statement hadn't been fully transmitted yet? Yes. Sending 2 MB takes most of time so client is terminated in this stage. > If so, the backend would have just been waiting for the rest of the > statement to arrive. Perhaps you're looking at some sort of network bug > that c

Re: [GENERAL] Advantages of PostgreSQL over MySQL 5.0

2006-03-22 Thread Tony Caduto
Jimbo1 wrote: "With MySQL, customers across all industries are finding they can easily handle nearly every type of database workload, with performance and scalability outpacing every other open source rival. As Los Alamos lab (who uses MySQL to manage their terabyte data warehouse) said, "We cho

Re: [GENERAL] java_reset - how it works

2006-03-22 Thread Marek Lewczuk
Marek Lewczuk napisał(a): Hi, I can't understand how java_reset works - the docs says that "..Since java does not yet support library versions, the PHP/Java Bridge must be reset after a new library version has been deployed..." - so in other words, when we have new version of libraries used by

Re: [GENERAL] index for inet and >> (contains) function

2006-03-22 Thread SCassidy
Depending on the types of queries you need to do, maybe you could kludge it up for speed by doing something like adding another column (or two) that can be easily indexed, and whose values can be derived from the existing data. You could then use the indexed column to narrow down the result set.

Re: [GENERAL] How to release locks

2006-03-22 Thread Tom Lane
"Andrus" <[EMAIL PROTECTED]> writes: >> What's it doing exactly? > odbc driver was in progress of sending data using libpq when client was > terminated. Do you mean that the statement hadn't been fully transmitted yet? If so, the backend would have just been waiting for the rest of the statement

Re: [GENERAL] db sever seems to be dropping connections

2006-03-22 Thread Tom Lane
"Rushabh Doshi" <[EMAIL PROTECTED]> writes: > DBI handle: DBI::db=HASH(0x9480bdc) # this is the stale handle > DBD::Pg::db disconnect failed: rollback failed at *** line 241. > result of disconnect: > disconnect failed for DBI::db=HASH(0x9480bdc): DBD::Pg::db disconnect > failed: rollback failed

Re: [GENERAL] Autovacuum Daemon Disrupting dropdb?

2006-03-22 Thread Thomas F. O'Connell
In an interesting epilogue to this thread, I just encountered something unusual. Since having disabled autovacuum in the cluster in which it was preventing dropdb from working (because autovacuum the autovacuum daemon was behaving as a user accessing the database), dropdb has been working

Re: [GENERAL] index for inet and >> (contains) function

2006-03-22 Thread Tom Lane
Richard Jones <[EMAIL PROTECTED]> writes: > select countryid from iptocountry where network >> '1.2.3.4'; > Is there a suitable index that I can put on the network field to fix > this? Not at the moment :-(. I think it might be possible to write a GIST opclass that could handle this, but there

Re: [GENERAL] Advantages of PostgreSQL over MySQL 5.0

2006-03-22 Thread Vivek Khera
On Mar 22, 2006, at 6:06 AM, Jimbo1 wrote: lab (who uses MySQL to manage their terabyte data warehouse) said, "We chose MySQL over PostgreSQL primarily because it scales better and has embedded replication.".". The "one size fits all" style replication. What if it doesn't suit your needs?

Re: [GENERAL] db sever seems to be dropping connections

2006-03-22 Thread Vivek Khera
On Mar 21, 2006, at 4:39 PM, Rushabh Doshi wrote: This is my problem. I have a connection to the database using DB- >connect. Apparently, this connection sits idle for around an hour or so because of my application, and after that it has to do something. So I check that if the handle is st

[GENERAL] ANNOUNCE: Type-safe interface to PostgreSQL

2006-03-22 Thread Richard Jones
This may be of interest to some people on this list. It's a complete type-safe interface to PostgreSQL, from Objective CAML (OCaml) where statements are checked not just for syntax, but for types, at compile time. http://merjis.com/developers/pgocaml It works by shuffling the statements off t

[GENERAL] Advantages of PostgreSQL over MySQL 5.0

2006-03-22 Thread Jimbo1
Hello there, I'm a freelance Oracle Developer by trade (can almost hear the boos now ;o)), and am looking into developing my own Snowboarding-related website over the next few years. Anyway, I'm making some decisions now about the site architecture, and the database I'm going to need is obviously

Re: [GENERAL] db sever seems to be dropping connections

2006-03-22 Thread Rushabh Doshi
Tom, This is my problem. I have a connection to the database using DB->connect. Apparently, this connection sits idle for around an hour or so because of my application, and after that it has to do something. So I check that if the handle is still a valid one or not. If it's not, then re-establish

[GENERAL] invalid page header

2006-03-22 Thread Jo De Haes
Hi All, We are evaluating Postgresql as a db platform for one of our future applications. Some tables in the database will contain more than 10.000.000 records, which as i understand it, should be no problem with postgresql. We have been trying to find the most effective/fastest way to mani

[GENERAL] java_reset - how it works

2006-03-22 Thread Marek Lewczuk
Hi, I can't understand how java_reset works - the docs says that "..Since java does not yet support library versions, the PHP/Java Bridge must be reset after a new library version has been deployed..." - so in other words, when we have new version of libraries used by php/java bridge we can ca

[GENERAL] index for inet and >> (contains) function

2006-03-22 Thread Richard Jones
I've got a table like this: create table iptocountry ( network inet not null, countryid int not null references countries (id) ); The idea is that it contains mappings from IP address ranges to countries, something like this: insert into iptocountry values ('1.2.3.0/24', 33); It

Re: [GENERAL] How to release locks

2006-03-22 Thread Andrus
>> A cancel signal was sent to the selected server process(es). >> However, process continues running. > > What's it doing exactly? Client was killed when it waits a 2 MB bytea string insert statement to be completed inside transaction: INSERT INTO localfil (filename,filedirect,BlockNumber,lastc

Re: [GENERAL] How to release locks

2006-03-22 Thread Tom Lane
"Andrus" <[EMAIL PROTECTED]> writes: > I tried to kill the process using pgAdmin Status page Cancel button. > pgAdmin responds: > A cancel signal was sent to the selected server process(es). > However, process continues running. What's it doing exactly? We recently fixed some places in btree inde

Re: [GENERAL] xml output

2006-03-22 Thread David Fetter
On Mon, Mar 20, 2006 at 06:22:32PM -0600, Murali K. Maddali wrote: > Hello Guys, > > I am trying to export the data out of the database directly to an > xml file. Is there a way that I could this in PostgreSQL. You could use the libxml2 bindings in contrib/ and pipe that output to a file. Cheers

Re: [GENERAL] pg 8.1.3 on AIX

2006-03-22 Thread Seneca Cunningham
Gavin Hamill wrote: We're a Linux shop, and are getting an IBM pSeries 650 with AIX preloaded on Friday - I have no AIX experience, and was looking for info about compiling pg 8.1.3 on AIX, since it's the only app that will run on the machine. First, are there any precompiled packages? :)) No

Re: [GENERAL] partial resultset in java

2006-03-22 Thread Harald Fuchs
In article <[EMAIL PROTECTED]>, Luckys <[EMAIL PROTECTED]> writes: > I believe you should restrict number of rows that needs to be returned, or > giving a choice to the user, although showing the total count. Even if you > display all 20K records, no one is going to see them all,  you can even add

[GENERAL] about "explain analyze" cannot get detailed analyzed results for queries in a plpgsql function

2006-03-22 Thread Emi Lu
Hello, I am using postgresql 8.0.1. I have a function (Pl/PgSQL) created with serveral complex queries inside. For example, create function f1() return void... begin ... query 1: insert into ... from A left join B... left join C where ... query 2: update T1 set ... from (X left join Y .. lef

Re: [GENERAL] pg 8.1.3 on AIX

2006-03-22 Thread Tom Lane
Gavin Hamill <[EMAIL PROTECTED]> writes: > Basically, is it currently a matter of ./configure, make, make install ? Should be, modulo whatever FAQ_AIX tells you. > We can have whatever AIX version we want up to 5.3, so I'm looking for > advice on which provides the path of least resistance.. W

Re: [GENERAL] Enforcing serial uniqueness?

2006-03-22 Thread Greg Stark
Tom Lane <[EMAIL PROTECTED]> writes: > Steven Brown <[EMAIL PROTECTED]> writes: > > Martijn van Oosterhout wrote: > >> IIRC you can set the permissions on a sequence to allow nextval but not > >> setval. > > > I've not been able to find a way - granting UPDATE grants the use of > > both. > > Ye

Re: [GENERAL] back slash separated values

2006-03-22 Thread Tom Lane
"surabhi.ahuja" <[EMAIL PROTECTED]> writes: > mod_pattern := mod_of_study || ''\\'' || $2; If this is in a function body, you need four backslashes not two, for the same reason that you need to double the quote marks: one level of quotes and backslashes is eaten when the function body is parsed a

Re: [GENERAL] Enforcing serial uniqueness?

2006-03-22 Thread Tom Lane
Steven Brown <[EMAIL PROTECTED]> writes: > Martijn van Oosterhout wrote: >> IIRC you can set the permissions on a sequence to allow nextval but not >> setval. > I've not been able to find a way - granting UPDATE grants the use of > both. Yes. This is intentional, on the grounds that being able

Re: [GENERAL] Enforcing serial uniqueness?

2006-03-22 Thread Steven Brown
Tino Wildenhain wrote: since your insert above would call nextval() per default, its save to use currval() in the same transaction. Ah, I didn't realize currval() was handled session-local - that removes my need to support any non-default value to my serial column. So, if I can identify use

Re: [GENERAL] invalid page header

2006-03-22 Thread Tom Lane
"Qingqing Zhou" <[EMAIL PROTECTED]> writes: > "Jo De Haes" <[EMAIL PROTECTED]> wrote >> CETERROR: XX001: invalid page header in block 22182 of relation > "dunn_main" > I suppose there is no system error happens during the period (like lost > power). Can you attach the gdb at "b bufmgr.c:257" and

Re: [GENERAL] xml output

2006-03-22 Thread Jim C. Nasby
On Mon, Mar 20, 2006 at 06:22:32PM -0600, Murali K. Maddali wrote: > Hello Guys, > > I am trying to export the data out of the database directly to an xml > file. Is there a way that I could this in PostgreSQL. Not automatically. You'll need to build the XML by hand, or by using something like p

Re: [GENERAL] Enforcing serial uniqueness?

2006-03-22 Thread Jim Buttafuoco
create a view with insert/update/delete rules and DON'T let the users assign to the serial col. remove insert/upload/delete permission to the base table and only allow access via the view. -- Original Message --- From: Steven Brown <[EMAIL PROTECTED]> To: Csaba Nagy <[EMAIL P

Re: [GENERAL] Enforcing serial uniqueness?

2006-03-22 Thread Csaba Nagy
> Gaps are fine. All I want is safe uniqueness. What is an issue for me > is a user having INSERT permission being able to shut down all INSERTs > from everyone else until someone manually figures out what happened and > fixes it, ditto for UPDATE permission on a sequence (which they need in

Re: [GENERAL] Enforcing serial uniqueness?

2006-03-22 Thread Steven Brown
Csaba Nagy wrote: That way they really can't touch the sequence; otherwise they still could call nextval multiple times erroneously (people do that...). It doesn't matter much to the sequence, of course... It just leaves the ugly gaps out :P The sequence facility was NOT designed with no-gap

Re: [GENERAL] Enforcing serial uniqueness?

2006-03-22 Thread Tino Wildenhain
Steven Brown schrieb: Martijn van Oosterhout wrote: ... Secondly, if you don't want people to be able to stuff with your ID column, you could set a BEFORE INSERT trigger to overwrite whatever they provide and a BEFORE UPDATE trigger to cancel any changes... The problem is that to get the la

Re: [GENERAL] How to release locks

2006-03-22 Thread Andrus
>> It is not because of the locks. There is only running transaction (and it >> got every locks). Not sure why the backend stucks there, seems it doesn't >> aware of the broken client. In normal situations, if you killed a client, >> then the server will print something like "could not receive data

Re: [GENERAL] Enforcing serial uniqueness?

2006-03-22 Thread Steven Brown
Martijn van Oosterhout wrote: IIRC you can set the permissions on a sequence to allow nextval but not setval. I've not been able to find a way - granting UPDATE grants the use of both. Someone in the interactive docs ran into the same thing it seems: http://www.postgresql.org/docs/8.0/inte

Re: [GENERAL] Enforcing serial uniqueness?

2006-03-22 Thread Csaba Nagy
> I didn't suggest anything of the kind. I was just suggesting a (IMO) > cleaner way to allow access to the sequence, so that the users of the > OP's database don't make too much of a mess of it. As I said, it won't > matter much to the sequence. It's just a matter of wanting to do things > the

Re: [GENERAL] Enforcing serial uniqueness?

2006-03-22 Thread Alban Hertroys
Csaba Nagy wrote: That way they really can't touch the sequence; otherwise they still could call nextval multiple times erroneously (people do that...). It doesn't matter much to the sequence, of course... It just leaves the ugly gaps out :P The sequence facility was NOT designed with no-gap

Re: [GENERAL] Updating a primary key

2006-03-22 Thread Terry Lee Tucker
On Wednesday 22 March 2006 06:32 am, Paul Mackay saith: > I was surprised to see that PostgreSQL doesn't execute a multiple row > update as an atomic operation, but apparently one row at a time, with > primary key uniqueness being checked after each row update. Actually, I think its done before t

[GENERAL] Updating a primary key

2006-03-22 Thread Paul Mackay
I was surprised to see that PostgreSQL doesn't execute a multiple row update as an atomic operation, but apparently one row at a time, with primary key uniqueness being checked after each row update. For example, let's say we have this table : CREATE TABLE mytable ( pos int PRIMARY KEY, t text );in

Re: [GENERAL] Postgresql won't run after upgrade to fc5

2006-03-22 Thread Peter Eisentraut
Bruno Wolff III wrote: > I wouldn't trust that if I didn't have to. FC5 is using a different > version of gcc than FC4. That is only a problem if you are using C++. -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end of broadcast)

Re: [GENERAL] Enforcing serial uniqueness?

2006-03-22 Thread Csaba Nagy
> That way they really can't touch the sequence; otherwise they still > could call nextval multiple times erroneously (people do that...). It > doesn't matter much to the sequence, of course... It just leaves the > ugly gaps out :P The sequence facility was NOT designed with no-gap sequencing i

Re: [GENERAL] partial resultset in java

2006-03-22 Thread William ZHANG
There is a method called cancel() in interface Statement. But I don't know if it is implemented correctly in JDBC. Maybe you can try it. Regards, William ZHANG ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [GENERAL] back slash separated values

2006-03-22 Thread William ZHANG
What's the version of pgsql? postgres=# show server_version; server_version 8.1.0 (1 row) postgres=# CREATE OR REPLACE FUNCTION foo (v_s1 varchar, v_s2 varchar) postgres-# RETURNS varchar AS $$ postgres$# BEGIN postgres$# RETURN v_s1 || '\\' || v_s2; postgres$# END; postgre

Re: [GENERAL] Enforcing serial uniqueness?

2006-03-22 Thread Alban Hertroys
Martijn van Oosterhout wrote: On Tue, Mar 21, 2006 at 11:41:11PM -0800, Steven Brown wrote: I want to allow access to a table's rows without allowing that table to be damaged. A problem I have is with my serial primary key 'id' field. Although I can block its UPDATE, if users INSERT with an e

Re: [GENERAL] Enforcing serial uniqueness?

2006-03-22 Thread Martijn van Oosterhout
On Tue, Mar 21, 2006 at 11:41:11PM -0800, Steven Brown wrote: > I want to allow access to a table's rows without allowing that table to > be damaged. A problem I have is with my serial primary key 'id' field. > Although I can block its UPDATE, if users INSERT with an explicit 'id' > higher tha

[GENERAL] pg 8.1.3 on AIX

2006-03-22 Thread Gavin Hamill
Hullo :) We're a Linux shop, and are getting an IBM pSeries 650 with AIX preloaded on Friday - I have no AIX experience, and was looking for info about compiling pg 8.1.3 on AIX, since it's the only app that will run on the machine. First, are there any precompiled packages? :)) Basically, i

[GENERAL] back slash separated values

2006-03-22 Thread surabhi.ahuja
mod_pattern := mod_of_study || ''\\'' ||  $2;   is giving me syntax error, please tell how i can concat a backslah cgaracter.   Thanks, regards Surabhi

Re: [GENERAL] How to release locks

2006-03-22 Thread Qingqing Zhou
"Andrus" <[EMAIL PROTECTED]> wrote > > insert command takes a long time. I terminated the client application from > Windows XP client manager during insert command. > At next re-run application and pgadmin both hang in DELETE FROM line > > I think I can reproduce this. Postgres server is in FreeBS