[GENERAL] Java Postgres drivers.

2009-12-28 Thread Dave Coventry
I'm not sure this is the right place to enquire... I'm trying to connect to a postgres datanbase with Java. import java.sql.*; public static void main(String[] args) { // TODO code application logic here try{ System.out.println("Starting..."); Class.fo

Re: [GENERAL] Java Postgres drivers.

2009-12-28 Thread John R Pierce
Dave Coventry wrote: I'm not sure this is the right place to enquire... I'm trying to connect to a postgres datanbase with Java. does that sample code hang? do you get an error? -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: htt

Re: [GENERAL] Why grantor is owner in this case?

2009-12-28 Thread Alvaro Herrera
donniehan wrote: > Dear Tom, > > I'm sorry to bother you. i really care about this behavior, but i couldn't > find the discussions you mentioned in pgsql-hackers archives. > Would you please tell me more about the discussions(about date? the related > issue?), so that i can search it and find it

Re: [GENERAL] Java Postgres drivers.

2009-12-28 Thread fernando
Dave, It looks like the postgresql.jar archive is not in your CLASSPATH. []s, Fernando Lozano > I'm not sure this is the right place to enquire... > > I'm trying to connect to a postgres datanbase with Java. > > import java.sql.*; > > public static void main(String[] args) { > //

Re: [GENERAL] Java Postgres drivers.

2009-12-28 Thread Ivano Luberti
Sure the url looks bad. Shoudl be something like: http://jdbc.postgresql.org/dbname Anyway you cen find more help about jdbc connectivity to postgres here: http://jdbc.postgresql.org/ Dave Coventry ha scritto: > I'm not sure this is the right place to enquire... > > I'm trying to connect to a

Re: [GENERAL] Why grantor is owner in this case?

2009-12-28 Thread Tom Lane
Alvaro Herrera writes: > donniehan wrote: >> I'm sorry to bother you. i really care about this behavior, but i couldn't >> find the discussions you mentioned in pgsql-hackers archives. >> Would you please tell me more about the discussions(about date? the related >> issue?), so that i can search

Re: [GENERAL] How to use read uncommitted transaction level and set update order

2009-12-28 Thread Jaime Casanova
On Sat, Dec 19, 2009 at 7:16 PM, Christophe Pettus wrote: > >> I understand that it is not possible to read previous rows without >> creating hack using triggers. > > As noted above, that's not correct.  You cannot access new values of a > particular row within a single UPDATE statement, but you d

Re: [GENERAL] cross-database time extract?

2009-12-28 Thread Israel Brewster
On Dec 24, 2009, at 12:53 PM, Adrian Klaver wrote: On Thursday 24 December 2009 1:44:58 pm Israel Brewster wrote: This is sort of a PostgreSQL question/sort of a general SQL question, so I apologize if this isn't the best place to ask. At any rate, I know in PostgreSQL you can issue a command

[GENERAL] unsubscribe remove

2009-12-28 Thread Mark Williamson

[GENERAL] DB Link Question

2009-12-28 Thread Alex -
Hi,is there away to check with DB Link if one record exists/not exists in a remote database? Something like... SELECT item_id FROM TABLE A WHERE NOT EXISTS (SELECT 1 FROM TABLE B WHERE A.item_id=B.item_id) Where Table A is on a Local machine and Table B is on a remote machine. Thanks for any hel

[GENERAL] pg_dump excluding tables content but not table schema

2009-12-28 Thread Ivan Sergio Borgonovo
I've some tables that are just cache. I'd like to just dump the table schema without dumping the table contend. I think I could do it in 2 steps but I'd like to avoid it. Is there a way? thanks -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing list (pgs

Re: [GENERAL] pg_dump excluding tables content but not table schema

2009-12-28 Thread Raymond O'Donnell
On 28/12/2009 18:41, Ivan Sergio Borgonovo wrote: > I'd like to just dump the table schema without dumping the table > contend. pg_dump -s -t Ray. -- Raymond O'Donnell :: Galway :: Ireland r...@iol.ie -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes t

Re: [GENERAL] cross-database time extract?

2009-12-28 Thread Greenhorn
2009/12/29 Israel Brewster : > > On Dec 24, 2009, at 12:53 PM, Adrian Klaver wrote: > >> On Thursday 24 December 2009 1:44:58 pm Israel Brewster wrote: >>> >>> This is sort of a PostgreSQL question/sort of a general SQL question, >>> so I apologize if this isn't the best place to ask. At any rate,

Re: [GENERAL] pg_dump excluding tables content but not table schema

2009-12-28 Thread Ivan Sergio Borgonovo
On Mon, 28 Dec 2009 19:39:36 + Raymond O'Donnell wrote: > On 28/12/2009 18:41, Ivan Sergio Borgonovo wrote: > > > I'd like to just dump the table schema without dumping the table > > contend. > pg_dump -s -t My fault. I was not clear enough. I'd like to make a "mostly" full backup, exclu

Re: [GENERAL] pg_dump excluding tables content but not table schema

2009-12-28 Thread Raymond O'Donnell
On 28/12/2009 20:20, Ivan Sergio Borgonovo wrote: > On Mon, 28 Dec 2009 19:39:36 + > Raymond O'Donnell wrote: > >> On 28/12/2009 18:41, Ivan Sergio Borgonovo wrote: >> >>> I'd like to just dump the table schema without dumping the table >>> contend. > >> pg_dump -s -t > > My fault. I was

[GENERAL] pg_dump ERROR, usename "postgres" duplicated

2009-12-28 Thread Gastón Quiroga
Hi: I cannot dump any database from my server. When I try to do it i receive this error pg_dump: The command was: SELECT tableoid, oid, nspname, (select usename from pg_user where nspowner = usesysid) as usename, nspacl FROM pg_namespace I checked the pg_user database and I found this:

[GENERAL] pg_dump ERROR, usename "postgres" duplicated

2009-12-28 Thread Gastón
Hi: I cannot dump any database from my server. When I try to do it i receive this error pg_dump: The command was: SELECT tableoid, oid, nspname, (select usename from pg_user where nspowner = usesysid) as usename, nspacl FROM pg_namespace I checked the pg_user database and I found this:

Re: [GENERAL] Java Postgres drivers.

2009-12-28 Thread John R Pierce
Ivano Luberti wrote: Sure the url looks bad. Shoudl be something like: http://jdbc.postgresql.org/dbname say huh? http://jdbc.postgresql.org/documentation/84/load.html http://jdbc.postgresql.org/documentation/84/connect.html says what he's doing is fine. -- Sent via pgsql-general mailin

[GENERAL] pg_dump ERROR, usename "postgres" duplicated

2009-12-28 Thread Gastón
Hi: I cannot dump any database from my server. When I try to do it i receive this error pg_dump: The command was: SELECT tableoid, oid, nspname, (select usename from pg_user where nspowner = usesysid) as usename, nspacl FROM pg_namespace I checked the pg_user database and I found this:

Re: [GENERAL] pg_dump ERROR, usename "postgres" duplicated

2009-12-28 Thread Tom Lane
=?ISO-8859-1?Q?Gast=F3n_Quiroga?= writes: > I checked the pg_user database and I found this: > postgres=# select * from pg_user; > usename| usesysid | usecreatedb | usesuper | usecatupd | > passwd | valuntil | useconfig > ---+--+-+--+

Re: [GENERAL] pg_dump ERROR, usename "postgres" duplicated

2009-12-28 Thread Gastón
Thanks for your reply Tom, and sorry for the duplicated e-mails. It's Postgres version 8.0.8 Thank you Gastón Quiroga Allytech S.A. Tom Lane wrote: =?ISO-8859-1?Q?Gast=F3n_Quiroga?= writes: I checked the pg_user database and I found this: postgres=# select * from pg_use

Re: [GENERAL] pg_dump ERROR, usename "postgres" duplicated

2009-12-28 Thread Tom Lane
=?ISO-8859-1?Q?Gast=F3n?= writes: > It's Postgres version 8.0.8 Well, that's pretty ancient, and I see at least one bug in the release history that could result in duplicated rows. I'd counsel an update to 8.0.something-recent. You can probably delete the extra row using a WHERE on ctid.

[GENERAL] parse tree in XML format

2009-12-28 Thread matt
Is there some way to export the postgresql query parse tree in XML format? I can not locate the API/Tool etc to do that... thanks -Matt -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-g

Re: [GENERAL] parse tree in XML format

2009-12-28 Thread Tom Lane
matt writes: > Is there some way to export the postgresql query parse tree in XML format? No, and it probably wouldn't be very useful to you if there was, because we feel free to whack the internal parsetree representation around in every release. regards, tom lane -- S

Re: [GENERAL] Java Postgres drivers.

2009-12-28 Thread Ivano Luberti
Oh sorry, cut and paste mistake By the way using that syntax he is using he is assuming the server is running on localhost and the port is the default one John R Pierce ha scritto: > Ivano Luberti wrote: >> Sure the url looks bad. >> Shoudl be something like: >> >> http://jdbc.postgresql.org/dbnam

Re: [GENERAL] Why grantor is owner in this case?

2009-12-28 Thread Erik Jones
On Dec 27, 2009, at 6:59 PM, donniehan wrote: > Hi Tom, > > Thanks for your information. One more question, if i wanna get the accurate > information about grantor(Sometimes the application just needs the > information), what can i do? > Apparently i cannot get from the acls, so where can i g

Re: [GENERAL] cross-database time extract?

2009-12-28 Thread Adrian Klaver
On Monday 28 December 2009 12:13:46 pm Greenhorn wrote: > 2009/12/29 Israel Brewster : > > On Dec 24, 2009, at 12:53 PM, Adrian Klaver wrote: > >> On Thursday 24 December 2009 1:44:58 pm Israel Brewster wrote: > >>> This is sort of a PostgreSQL question/sort of a general SQL question, > >>> so I ap

Re: [GENERAL] cross-database time extract?

2009-12-28 Thread Scott Marlowe
On Mon, Dec 28, 2009 at 6:34 PM, Adrian Klaver wrote: > On Monday 28 December 2009 12:13:46 pm Greenhorn wrote: >> 2009/12/29 Israel Brewster : >> > On Dec 24, 2009, at 12:53 PM, Adrian Klaver wrote: >> >> On Thursday 24 December 2009 1:44:58 pm Israel Brewster wrote: >> >>> This is sort of a Post

[GENERAL] Installation of Postgis/postgresql

2009-12-28 Thread Nick
Trying to install postgis on LINUX machine, need to find the geos- config file, as seems it is no where to be found after download of postgis in the ./configure step, is there anyone that can give me a clue on how to find this file? Ultimate goal is to get postgis working so we can use geom data ty

Re: [GENERAL] Installation of Postgis/postgresql

2009-12-28 Thread Paul Ramsey
Nick, You'll find GEOS questions get answered better on the GEOS mailing list (http://lists.osgeo.org/mailman/listinfo/geos-devel), BUT: If ./configure is not finding g++ then odds are, you don't have it installed (type g++ on the commandline, see what happens). Use your package manager to do a se

Re: [GENERAL] Installation of Postgis/postgresql

2009-12-28 Thread Andy Colson
On 12/28/2009 08:24 PM, Nick wrote: Trying to install postgis on LINUX machine, need to find the geos- config file, as seems it is no where to be found after download of postgis in the ./configure step, is there anyone that can give me a clue on how to find this file? Ultimate goal is to get post

Re: [GENERAL] Installation of Postgis/postgresql

2009-12-28 Thread Devrim GÜNDÜZ
On Mon, 2009-12-28 at 18:24 -0800, Nick wrote: > Trying to install postgis on LINUX machine, Which Linux? Many distros have PostGIS and related stuff in their repositories. You don't need to compile them. > need to find the geos-config file, as seems it is no where to be found > after download of

Re: [GENERAL] Installation of Postgis/postgresql

2009-12-28 Thread Nick
On Dec 28, 7:20 pm, a...@squeakycode.net (Andy Colson) wrote: > On 12/28/2009 08:24 PM, Nick wrote: > > > > > Trying to install postgis on LINUX machine, need to find the geos- > > config file, as seems it is no where to be found after download of > > postgis in the ./configure step, is there anyon

Re: [GENERAL] Installation of Postgis/postgresql

2009-12-28 Thread Tom Lane
Nick writes: > 'g++' or g++ says -bash g++: command not found So you haven't got it installed. > distro is red hat "Red Hat" is pretty darn nonspecific, but on recent Fedora g++ is part of the gcc-c++ package. regards, tom lane -- Sent via pgsql-general mailing list (

Re: [GENERAL] Installation of Postgis/postgresql

2009-12-28 Thread John R Pierce
Nick wrote: 'g++' or g++ says -bash g++: command not found distro is red hat Assuming thats RHEL5, yum install gcc-c++ if its RHEL4 or earlier, use up2date instead. either of these will require a RHN subscription to be activated. if it is in fact, centos 3,4,5, yum install g