Re: [GENERAL] RTRIM always used with JDBC?

2004-05-16 Thread David Teran
Hi Kris, i am using Postgres 7.4.2 with jdbc. Every time i try to select a varchar the SQL generated by the jdbc driver uses RTRIM(t0.columnname) which breaks an existing application. Is this normal, can we disable the RTRIM usage? I assume from this bold claim that you have written an SQL query l

Re: [GENERAL] one to many

2004-05-16 Thread Dennis Gearon
Stephan Szabo wrote: On Sun, 16 May 2004, Dennis Gearon wrote: CC me please. How do I set up a one to many relationship in Postgres, (any DB for that matter.) I.E., if a delete or update of a child table causes a row in the parent table to no longer refer to any rows in the child table, to eithe

Re: [GENERAL] Upgrade from 7.3.4 to 7.4.2 went wrong

2004-05-16 Thread Peter Eisentraut
Robert Fitzpatrick wrote: > I get this error after doing the upgrade on FreeBSD 5.2.1: > > The data directory was initialized by PostgreSQL version 7.3, which > is not compatible with this version 7.4.2 > > Should I just re-initdb and the import my dump file? Yes. ---(end

[GENERAL] Upgrade from 7.3.4 to 7.4.2 went wrong

2004-05-16 Thread Robert Fitzpatrick
I get this error after doing the upgrade on FreeBSD 5.2.1: The data directory was initialized by PostgreSQL version 7.3, which is not compatible with this version 7.4.2 Should I just re-initdb and the import my dump file? -- Robert ---(end of broadcast)

Re: [GENERAL] Domains with constraints?

2004-05-16 Thread Peter Eisentraut
Dennis Gearon wrote: > I have an older manual. Here are newer ones: http://www.postgresql.org/docs/ ---(end of broadcast)--- TIP 7: don't forget to increase your free space map settings

Re: [GENERAL] table column information

2004-05-16 Thread Scot L. Harris
On Sun, 2004-05-16 at 16:58, Carl E. McMillin wrote: > Hi, > > > Use getMetadata of java.sql.Connection. According to jdocs, the > > DatabaseMetaData object can probably give you what you are looking for. > > > Carl <|};-)> > > > Thanks, but I am using php 4.2.2 not java for this application

[GENERAL] RTRIM always used with JDBC?

2004-05-16 Thread David Teran
Hi, i am using Postgres 7.4.2 with jdbc. Every time i try to select a varchar the SQL generated by the jdbc driver uses RTRIM(t0.columnname) which breaks an existing application. Is this normal, can we disable the RTRIM usage? regards David ---(end of broadcast)-

Re: [GENERAL] table column information

2004-05-16 Thread Carl E. McMillin
Hi, > Use getMetadata of java.sql.Connection. According to jdocs, the > DatabaseMetaData object can probably give you what you are looking for. Carl <|};-)> -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Scot L. Harris Sent: Sunday, May 16, 2004 1:22

Re: [GENERAL] one to many

2004-05-16 Thread Stephan Szabo
On Sun, 16 May 2004, Dennis Gearon wrote: > CC me please. > > How do I set up a one to many relationship in Postgres, (any DB for that > matter.) > > I.E., if a delete or update of a child table causes a row in the parent > table to no longer refer to any rows in the child table, to either cause >

[GENERAL] table column information

2004-05-16 Thread Scot L. Harris
Currently using Postgresql 7.2.4-5.80 with php 4.2.2.-8.0.8 on a redhat 8.0 system. I am writing some php scripts where I want to generate a list of the column names in a particular table that the user selects. I could take the brute force method and hard code the column names but then every time

Re: [GENERAL] one to many

2004-05-16 Thread Peter Eisentraut
Dennis Gearon wrote: > How do I set up a one to many relationship in Postgres, (any DB for > that matter.) Read about foreign keys: http://www.postgresql.org/docs/7.4/static/ddl-constraints.html#DDL-CONSTRAINTS-FK ---(end of broadcast)--- TIP 7: do

Re: [GENERAL] pg_xlog becomes extremely large during CREATE INDEX

2004-05-16 Thread Jeffrey W. Baker
On Fri, 2004-05-14 at 20:55, Tom Lane wrote: > Vivek Khera <[EMAIL PROTECTED]> writes: > > "TL" == Tom Lane <[EMAIL PROTECTED]> writes: > > TL> ... On looking at the code I see that it doesn't make any > > TL> attempt to prune future log segments after a decrease in > > TL> checkpoint_segments, so

Re: [GENERAL] one to many

2004-05-16 Thread Dennis Gearon
Peter Eisentraut wrote: Dennis Gearon wrote: How do I set up a one to many relationship in Postgres, (any DB for that matter.) Read about foreign keys: http://www.postgresql.org/docs/7.4/static/ddl-constraints.html#DDL-CONSTRAINTS-FK That only takes care of if the PARENT is deleted/updat

Re: [GENERAL] Identifying diskspace leakage

2004-05-16 Thread Ed L.
Here's an attempt at a query to estimate diskspace leakage. This leakage might occur when max_fsm_pages and/or max_fsm_relations are set too low. Not sure which of the two approaches below (leak1 or leak2) is more accurate? Is there a better way via SQL? The query uses the 'dbsize' project fro

[GENERAL] Interesting Unique Index Needed - Functional?

2004-05-16 Thread Dennis Gearon
Given: CREATE TABLE Usrs( usr_id SERIAL NOT NULL PRIMARY KEY, usr VARCHAR(64) NOT NULL UNIQUE ); CREATE TABLE Emails( email_id SERIAL NOT NULL PRIMARY KEY, email VARCHAR(128) NOT NULL UNIQUE ); CREATE TABLE EmailTypes( email_type_id SERIAL NOT NULL PRIMARY KEY, ema

Re: [GENERAL] Confusion about inheritance -- NEVER MIND

2004-05-16 Thread Timothy Perrigo
As you've discovered, primary key constraints (and other constraints) do not inherit, but perhaps something like the following will work for you: create table base (id serial primary key, (other fields to be inherited...)); create table derived (new_field1 varchar(10), (other new fields...), c

[GENERAL] filesystem option tuning

2004-05-16 Thread share-postgres
Hi All, I have recently started evaluating Postgresql 7.4.2 to replace some *cough* more proprietary database systems... Thanks to the _excellent_ documentation (a point I cannot overemphasize) I was up and running in no time, and got a first test application running on the native C interface. Th

Re: [GENERAL] bytea

2004-05-16 Thread David Garamond
scott.marlowe wrote: And yes, toasting is fully automatic. Just insert a large text/varchar/bytea field and the database does the rest. which is why they are generally recommended over using large objects, which require specialized handling. They are not always recommended though. The manual c