Re: [GENERAL] Data loading from a flat file...

2006-01-05 Thread Angshu Kar
Thanks a lot Pandu.Everything works ok. Now one last thing : I want to insert a fixed value to the D field in all rows. Any statement for that?On 1/6/06, Pandurangan R S <[EMAIL PROTECTED]> wrote: Issue the following command before you execute copyALTER TABLE DISTANCE ALTER COLUMN SET DEFAULT next

Re: [GENERAL] Data loading from a flat file...

2006-01-05 Thread Pandurangan R S
Issue the following command before you execute copy ALTER TABLE DISTANCE ALTER COLUMN SET DEFAULT nextval('') Btw, what version of postgres are you using? On 1/6/06, Angshu Kar <[EMAIL PROTECTED]> wrote: > here it is: > > >Table "public.distance" > Column|

Re: [GENERAL] Data loading from a flat file...

2006-01-05 Thread Angshu Kar
here it is:   Table "public.distance"    Column    |   Type   | Modifiers--+--+--- distance_id  | integer  | not null  query_id              | integer  | not null subject_id            | integer 

Re: [GENERAL] Data loading from a flat file...

2006-01-05 Thread Pandurangan R S
Please show the output of describe command of the table On 1/6/06, Angshu Kar <[EMAIL PROTECTED]> wrote: > More problems solved and created - Now I'm getting the error: > > null value in column "subject_id" violates not-null constraint > > and this is nothing but column A which I talked about in

Re: [GENERAL] Adding another primary key to a populated table

2006-01-05 Thread Daniel Kunkel
Why do I want to include 6 fields in the primary key? Good question... I don't know. It's a requirement of OFBiz, a really awesome ERP/CRM/Accounting/ECommerce system. I'm upgrading the software which requires it, and need to upgrade the database to match. Once I find out, I'll publish the so

Re: [GENERAL] Data loading from a flat file...

2006-01-05 Thread Pandurangan R S
cat test | paste - - - This will merge three consecutive lines into a single line. Note that there is a space between each -. On 1/6/06, Angshu Kar <[EMAIL PROTECTED]> wrote: > More problems solved and created - Now I'm getting the error: > > null value in column "subject_id" violates not-null c

Re: [GENERAL] Data loading from a flat file...

2006-01-05 Thread Angshu Kar
More problems solved and created - Now I'm getting the error: null value in column "subject_id" violates not-null constraintand this is nothing but column A which I talked about in the very beginning! Since its not null how can I COPY to B C and E. The same problem will arise with field E too! AKOn

Re: [GENERAL] Adding another primary key to a populated table

2006-01-05 Thread Aaron Koning
Are you trying to create a primary key composed of 6 fields? What is the result you want to achieve with the constraint? If you just want UNIQUE, NOT NULL values in a field, you can achieve that without creating a primary key. AaronOn 1/5/06, Daniel Kunkel <[EMAIL PROTECTED]> wrote: HiIt makes sen

Re: [GENERAL] Data loading from a flat file...

2006-01-05 Thread Angshu Kar
Thanks for the chmod command Pandu but the cat command is not doing anything!And as Michael suggested that file has indeed carriage returns embedded in fields. I opened it in my windows m/c using textpad and got: B1    C1    E1B2    C2    E2...Any more suggestions on how to solve this? :(On 1/6/06,

Re: [GENERAL] Data loading from a flat file...

2006-01-05 Thread Pandurangan R S
To get rid of ^M characters you could use cat file | tr -d ^M you need to type ^V before you type ^M in the preceeding command. But ^V will not be displayed on the screen. You might need to change directory permission too. use chmod +rx . For this command to succeed you need to execute this co

Re: [GENERAL] Data loading from a flat file...

2006-01-05 Thread Angshu Kar
I've solved the permission issue but now the error is:ERROR:  missing data for column "subject_entry_id" CONTEXT:  COPY distance, line 1: "107128"I feel the ^M is creating the problem! Any means to remove that? I mean using the delimiters option? On 1/6/06, Angshu Kar <[EMAIL PROTECTED]> wrote: Tha

Re: [GENERAL] Data loading from a flat file...

2006-01-05 Thread Angshu Kar
Thanks Michael.I'm using PgAdmin III 1.4.0 from my WinXP m/c to access the DB in my linux m/c! The file has about 2GB data.It returns back to the prompt very soon.I'm using less or vi command to view the file and getting those ^M as mentioned (i.e. between fields). Any clue how I can massage the d

Re: [GENERAL] Adding another primary key to a populated table

2006-01-05 Thread Daniel Kunkel
Hi It makes sense that I can't have more than 1 primary key. Postgres was trying to create another primary key instead of modify the existing primary key. So... As I understand it, a table does not always have to have a primary key defined. Would it work to first delete/drop the primary key, t

Re: [GENERAL] Data loading from a flat file...

2006-01-05 Thread Michael Fuhr
On Thu, Jan 05, 2006 at 11:04:16PM -0600, Angshu Kar wrote: > Thanks Jim. the statement is running without any error but nothing is > getting copied into the table! What client are you using and what's the exact command you ran? Does the command finish or does it never return? How much data is th

Re: [GENERAL] Adding another primary key to a populated table

2006-01-05 Thread Andrew - Supernews
On 2006-01-06, Daniel Kunkel <[EMAIL PROTECTED]> wrote: > Hi > > I'm trying to add another primary key to a table populated with data and > a number of foreign key constraints. You can only have one primary key on a table. You can add additional unique constraints to get the same effect. (A prima

Re: [GENERAL] Data loading from a flat file...

2006-01-05 Thread Michael Fuhr
On Thu, Jan 05, 2006 at 10:51:55PM -0600, Angshu Kar wrote: > I've a table schema in pg say as: > > (A B C D E) > > where none of these fields allow null. > > Now, I've a flat file that has got tab-delimited data for B,C and E fields. > And A,B come from sequences. > > Could anyone please let m

Re: [GENERAL] Data loading from a flat file...

2006-01-05 Thread Angshu Kar
Could you please tell me what's the syntax with INSERT for this?On 1/5/06, Bruno Wolff III <[EMAIL PROTECTED]> wrote: On Thu, Jan 05, 2006 at 22:51:55 -0600,  Angshu Kar < [EMAIL PROTECTED]> wrote:> Hi Pgsql,>> I've a table schema in pg say as:>> (A B C D E)>> where none of these fields allow null.

Re: [GENERAL] Data loading from a flat file...

2006-01-05 Thread Angshu Kar
Thanks Jim. the statement is running without any error but nothing is getting copied into the table!Also, my data file is showing some ^M chars likeB1^M   C1^M   E1B2^M   C2^M   E2... Does anyone know what can it represent?Is it creating any trouble for the COPY command?And can we use INSERT with C

Re: [GENERAL] Data loading from a flat file...

2006-01-05 Thread Bruno Wolff III
On Thu, Jan 05, 2006 at 22:51:55 -0600, Angshu Kar <[EMAIL PROTECTED]> wrote: > Hi Pgsql, > > I've a table schema in pg say as: > > (A B C D E) > > where none of these fields allow null. > > Now, I've a flat file that has got tab-delimited data for B,C and E fields. > And A,B come from sequen

Re: [GENERAL] Data loading from a flat file...

2006-01-05 Thread Jim C. Nasby
On Thu, Jan 05, 2006 at 10:51:55PM -0600, Angshu Kar wrote: > Hi Pgsql, > > I've a table schema in pg say as: > > (A B C D E) > > where none of these fields allow null. > > Now, I've a flat file that has got tab-delimited data for B,C and E fields. > And A,B come from sequences. > > Could anyo

[GENERAL] Data loading from a flat file...

2006-01-05 Thread Angshu Kar
Hi Pgsql,I've a table schema in pg say as:(A B C D E) where none of these fields allow null.Now, I've a flat file that has got tab-delimited data for B,C and E fields.And A,B come from sequences. Could anyone please let me know how I can upload the complete dataset into the table?Thanks,AK-- Ignore

Re: [GENERAL] Adding another primary key to a populated table

2006-01-05 Thread Jim C. Nasby
On Thu, Jan 05, 2006 at 08:08:39PM -0800, Daniel Kunkel wrote: > Hi > > I'm trying to add another primary key to a table populated with data and > a number of foreign key constraints. > > The new column is populated with non-null data (a requirement as I > understand it to become a valid primary

[GENERAL] Adding another primary key to a populated table

2006-01-05 Thread Daniel Kunkel
Hi I'm trying to add another primary key to a table populated with data and a number of foreign key constraints. The new column is populated with non-null data (a requirement as I understand it to become a valid primary key) I tried: ALTER TABLE product_price ADD CONSTRAINT product_price_pke

Re: [GENERAL] plpgsql question

2006-01-05 Thread Michael Fuhr
On Thu, Jan 05, 2006 at 12:50:34AM -0800, Matthew Peter wrote: > Is it possible to skip the loop and just return all records in a > single query and shove all those rows into a table variable? Not in PL/pgSQL -- you need to return each row with RETURN NEXT, generally from within a loop. Why do yo

Re: [GENERAL] copy from error

2006-01-05 Thread Michael Fuhr
On Thu, Jan 05, 2006 at 02:34:14PM +, marcelo Cortez wrote: > there any procedure for fix fts installation? As Tom asked, what steps did you follow to install tsearch2? The standard installation script creates its tables with oids, at least in current releases, so you appear to have installe

Re: [GENERAL] Putting restrictions on pg_dump?

2006-01-05 Thread Klint Gore
On Thu, 5 Jan 2006 09:59:45 -0800, Benjamin Smith <[EMAIL PROTECTED]> wrote: > Good ideas, all. but, what about keeping things like check constraints, > foreign keys, etc? how about something like pg_dump -s -t customers dbname >customers.def > Hmmm... maybe, if I dumped the entire DB schema

Re: [GENERAL] NEW variable values in trigger functions

2006-01-05 Thread Tom Lane
"Ken Winter" <[EMAIL PROTECTED]> writes: > 1. What is the value of the NEW variable for a column that is not mentioned > in an UPDATE statement? Is it NULL? If not NULL, what? No, it's whatever value is going to be assigned to the new row (which in this particular case would be the same as the O

Re: [GENERAL] create summaries and update a second table?

2006-01-05 Thread Jim C. Nasby
On Wed, Jan 04, 2006 at 07:49:30PM +0100, Michelle Konzack wrote: > Hello *, > > I have many tables (one per product) and the are two columns where I > put my buyed and selled pieces. Second I have a Main-Table with all > products and a summary of the stock. > > What I want is, whenever I buy or

Re: [GENERAL] Moving Tablespaces

2006-01-05 Thread Jim C. Nasby
You can also use WAL log shipping; there's been recent discussion about that on -admin. BTW, I'm seeing duplicated emails from you... On Tue, Jan 03, 2006 at 08:31:09PM -0500, Doug McNaught wrote: > Allen Fair <[EMAIL PROTECTED]> writes: > > > Our databases can get large and we want to find the

Re: [GENERAL] Hardware recommendation for PostgreSQL on Windows?

2006-01-05 Thread Qingqing Zhou
""Bj?rn T Johansen"" <[EMAIL PROTECTED]> wrote >I an planning to make a small Windows application and need a nice >database I am used to using PostgreSQL > under Linux and I am thinking about using this under Windows but how much > resources does it use under Windows? > The server will be ru

Re: [GENERAL] Adding columns to a view

2006-01-05 Thread Jim C. Nasby
On Wed, Dec 28, 2005 at 07:29:28PM +0100, Ingo van Lil wrote: > Now, if I want to get a list of users that have a certain combination of > valid status entries (e.g. all users that have paid their annual fee and > are not banned for some reason), I have to use several subselects: > > SELECT person

[GENERAL] Hardware recommendation for PostgreSQL on Windows?

2006-01-05 Thread Bjørn T Johansen
I an planning to make a small Windows application and need a nice database I am used to using PostgreSQL under Linux and I am thinking about using this under Windows but how much resources does it use under Windows? The server will be running on the workstation along with the Windows applica

Re: [GENERAL] 'Official' definition of ACID compliance?

2006-01-05 Thread Jaime Casanova
On 1/5/06, Russ Brown <[EMAIL PROTECTED]> wrote: > On Thu, 5 Jan 2006 22:25:21 +0100 > Peter Eisentraut <[EMAIL PROTECTED]> wrote: > > > Am Donnerstag, 5. Januar 2006 21:58 schrieb Scott Marlowe: > > > But it's not consistent. Imagine we do the one where we take one > > > from peter and give it to

Re: [GENERAL] Best Data type for Binary Data?

2006-01-05 Thread Aaron Koning
BYTEA is the easiest from my point of view. I like being able to treat my binary data more like any other field (e.g. date, text, etc). Heres some light reading on the BLOB/BYTEA debate:   http://search.postgresql.org/www.search?cs=utf-8&fm=on&st=20&dt=back&q=blob+bytea AaronOn 1/5/06, Ketema Harr

Re: [GENERAL] 'Official' definition of ACID compliance?

2006-01-05 Thread Richard_D_Levine
[EMAIL PROTECTED] wrote on 01/05/2006 04:00:37 PM: > On Thu, 5 Jan 2006 15:11:49 -0500 > Jaime Casanova <[EMAIL PROTECTED]> wrote: > > > On 1/5/06, [EMAIL PROTECTED] > > <[EMAIL PROTECTED]> wrote: > > > > > > > > > [EMAIL PROTECTED] wrote on 01/05/2006 01:59:52 PM: > > > > > > > so the problem

Re: [GENERAL] 'Official' definition of ACID compliance?

2006-01-05 Thread Michael Fuhr
On Thu, Jan 05, 2006 at 03:00:37PM -0600, Russ Brown wrote: > See, this is why I was looking for some sort of 'official' definition > of the term, to remove the ambiguity introduced by individual > interpretation. :) > > Anyone know who came up with the term in the first place? According to Date

Re: [GENERAL] 'Official' definition of ACID compliance?

2006-01-05 Thread Russ Brown
On Thu, 5 Jan 2006 22:25:21 +0100 Peter Eisentraut <[EMAIL PROTECTED]> wrote: > Am Donnerstag, 5. Januar 2006 21:58 schrieb Scott Marlowe: > > But it's not consistent. Imagine we do the one where we take one > > from peter and give it to paul. If paul's account is stored in an > > int, and is at

Re: [GENERAL] 'Official' definition of ACID compliance?

2006-01-05 Thread Chris Travers
Peter Eisentraut wrote: Am Donnerstag, 5. Januar 2006 21:58 schrieb Scott Marlowe: But it's not consistent. Imagine we do the one where we take one from peter and give it to paul. If paul's account is stored in an int, and is at 2147483647, and we add one, it does not increment, and it doe

Re: [GENERAL] Can't connect to postgresql using 'psql -d database -U user -W'

2006-01-05 Thread Rick Ellis
In article <[EMAIL PROTECTED]>, ctobini <[EMAIL PROTECTED]> wrote: >tobini% psql -d template1 -U postgres -W >password: postgres >psql: FATAL: IDENT authentication failed for user "postgres" > >Do you have an idea about this problem ? Use the su command to become user postgres and then run the p

Re: [GENERAL] 'Official' definition of ACID compliance?

2006-01-05 Thread Peter Eisentraut
Am Donnerstag, 5. Januar 2006 21:58 schrieb Scott Marlowe: > But it's not consistent. Imagine we do the one where we take one from > peter and give it to paul. If paul's account is stored in an int, and > is at 2147483647, and we add one, it does not increment, and it does not > cause an error th

Re: [GENERAL] Suse Linux 10.0

2006-01-05 Thread Joe Audette
I installed from rpms after adding some sources to YaST based on this article http://www.thejemreport.com/mambo/content/view/178/42/ Not sure its the absolute latest version of postgres. Hope it helps, Joe joe_audette [at] yahoo dotcom http://www.joeaudette.com http://www.mojoportal.com -

Re: [GENERAL] 'Official' definition of ACID compliance?

2006-01-05 Thread Russ Brown
On Thu, 5 Jan 2006 15:11:49 -0500 Jaime Casanova <[EMAIL PROTECTED]> wrote: > On 1/5/06, [EMAIL PROTECTED] > <[EMAIL PROTECTED]> wrote: > > > > > > [EMAIL PROTECTED] wrote on 01/05/2006 01:59:52 PM: > > > > > so the problem is that MySQL _forces_ a consistent state but in > > > the process it vio

Re: [GENERAL] 'Official' definition of ACID compliance?

2006-01-05 Thread Scott Marlowe
On Thu, 2006-01-05 at 14:11, Jaime Casanova wrote: > On 1/5/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > > > > [EMAIL PROTECTED] wrote on 01/05/2006 01:59:52 PM: > > > > > so the problem is that MySQL _forces_ a consistent state but in the > > > process it violates the integrity of the d

Re: [GENERAL] Suse Linux 10.0

2006-01-05 Thread Peter Eisentraut
Am Donnerstag, 5. Januar 2006 21:15 schrieb Joseph M. Day: > Has anyone been able to get the latest version of Postgres working on > Suse 10.0 ? I just switched form Fedora and realized that this version > is not specifically supported. Get it here: ftp://ftp.suse.com/pub/people/max/postgresql --

Re: [GENERAL] Suse Linux 10.0

2006-01-05 Thread Moises Alberto Lindo Gutarra
i have compiled Postgresql 8.1.1 on OpenSuse 10.0 with out problems. 2006/1/5, Joseph M. Day <[EMAIL PROTECTED]>: > Has anyone been able to get the latest version of Postgres working on > Suse 10.0 ? I just switched form Fedora and realized that this version > is not specifically supported. > > If

[GENERAL] Suse Linux 10.0

2006-01-05 Thread Joseph M. Day
Has anyone been able to get the latest version of Postgres working on Suse 10.0 ? I just switched form Fedora and realized that this version is not specifically supported. If so, can I use the RPM's or do I need to recompile it ? Thanks in advance! Joe, ---(end of bro

Re: [GENERAL] 'Official' definition of ACID compliance?

2006-01-05 Thread Jaime Casanova
On 1/5/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > [EMAIL PROTECTED] wrote on 01/05/2006 01:59:52 PM: > > > so the problem is that MySQL _forces_ a consistent state but in the > > process it violates the integrity of the data > > > That is a contradiction in terms. Data integrity is a

[GENERAL] Best Data type for Binary Data?

2006-01-05 Thread Ketema Harris
Hi, I would like to store binary data from a tcpdump (libpcap) file in a table. What is the best type to use? i have read posts saying lo, oid, and bytea. Which one would be best for this scenario?Thanks, ketema

Re: [GENERAL] 'Official' definition of ACID compliance?

2006-01-05 Thread Richard_D_Levine
[EMAIL PROTECTED] wrote on 01/05/2006 01:59:52 PM: > so the problem is that MySQL _forces_ a consistent state but in the > process it violates the integrity of the data > That is a contradiction in terms. Data integrity is a requirement of database consistency. ---(end

Re: [GENERAL] ACID compliance

2006-01-05 Thread Jeffrey Webster
Atomicity, Consistency, Isolation and DurabilitySee:http://cegt201.bradley.edu/projects/proj2003/equiprd/acid.html On 1/5/06, John Meyer <[EMAIL PROTECTED]> wrote: Okay, what exactly is ACID compliance?---(end of broadcast)---TIP 6: explain analyze is

Re: [GENERAL] ACID compliance

2006-01-05 Thread Jaime Casanova
On 1/5/06, John Meyer <[EMAIL PROTECTED]> wrote: > Okay, what exactly is ACID compliance? > http://en.wikipedia.org/wiki/ACID -- regards, Jaime Casanova (DBA: DataBase Aniquilator ;) ---(end of broadcast)--- TIP 4: Have you searched our list archiv

Re: [GENERAL] 'Official' definition of ACID compliance?

2006-01-05 Thread Scott Marlowe
On Thu, 2006-01-05 at 13:24, Scott Marlowe wrote: > On Thu, 2006-01-05 at 11:39, John Dean wrote: > > At 16:38 05/01/2006, Stephen Frost wrote: > > >* Russ Brown ([EMAIL PROTECTED]) wrote: > > > > Oh, that's a long story. We're a MySQL house that I've been trying to > > > > convert to PostgreSQL on

Re: [GENERAL] 'Official' definition of ACID compliance?

2006-01-05 Thread Scott Marlowe
On Thu, 2006-01-05 at 11:39, John Dean wrote: > At 16:38 05/01/2006, Stephen Frost wrote: > >* Russ Brown ([EMAIL PROTECTED]) wrote: > > > Oh, that's a long story. We're a MySQL house that I've been trying to > > > convert to PostgreSQL one way or the other for ages (with no success as > > > yet).

Re: [GENERAL] Drop database/create database broken in 7.4?

2006-01-05 Thread Scott Marlowe
On Thu, 2006-01-05 at 13:30, John Wells wrote: > Scott Marlowe said: > > Yep, somewhere along the lines you accidentally created those tables in > > template1 > > yep, sorry guys. I need more sleep Hey, how do you think we all recognized that mistake so quickly. We've all done it before. :) -

[GENERAL] ACID compliance

2006-01-05 Thread John Meyer
Okay, what exactly is ACID compliance? ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] Drop database/create database broken in 7.4?

2006-01-05 Thread John Wells
Scott Marlowe said: > Yep, somewhere along the lines you accidentally created those tables in > template1 yep, sorry guys. I need more sleep Thanks! John ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

[GENERAL] NEW variable values in trigger functions

2006-01-05 Thread Ken Winter
1. What is the value of the NEW variable for a column that is not mentioned in an UPDATE statement? Is it NULL? If not NULL, what? For example, given this table: my_tbl (id integer, att1 varchar, att2 varchar) and a row-wise ON UPDATE OR INSERT trigger function containing this condition

Re: [GENERAL] Drop database/create database broken in 7.4?

2006-01-05 Thread Joe Conway
John Wells wrote: I've noticed some oddities. The script connects to template1, drops the target database, creates the target database, and the rebuilds the tables. However, two specific tables and sequences are not dropped, although the drop command completes successfully. Anyone know what

Re: [GENERAL] Drop database/create database broken in 7.4?

2006-01-05 Thread Jim Buttafuoco
John check to see if the objects are in the template1 database which just gets copied 100% to the target db. Jim -- Original Message --- From: "John Wells" <[EMAIL PROTECTED]> To: pgsql-general@postgresql.org Sent: Thu, 5 Jan 2006 14:09:02 -0500 (EST) Subject: [GENERAL] Drop d

Re: [GENERAL] Monitoring PostgreSQL connections using cricket and

2006-01-05 Thread Tony Wasson
On 1/5/06, Steve Crawford <[EMAIL PROTECTED]> wrote: > > Resting Connections - connections that have no query information. I > > suspect these are connections starting up or shutting down, but feel > > free to clue me in. > > OK, this appears to be version-dependent but it can mean that > stats_que

Re: [GENERAL] Drop database/create database broken in 7.4?

2006-01-05 Thread Scott Marlowe
On Thu, 2006-01-05 at 13:09, John Wells wrote: > Guys, > > I'm running PG 7.4 on Ubuntu Breezy for Ruby on Rails development. One of > the things I ofter have to do is rebuild the database...for which I have a > script that I've created to do it in one step. > > I've noticed some oddities. The sc

[GENERAL] Drop database/create database broken in 7.4?

2006-01-05 Thread John Wells
Guys, I'm running PG 7.4 on Ubuntu Breezy for Ruby on Rails development. One of the things I ofter have to do is rebuild the database...for which I have a script that I've created to do it in one step. I've noticed some oddities. The script connects to template1, drops the target database, create

Re: [GENERAL] 'Official' definition of ACID compliance?

2006-01-05 Thread Jaime Casanova
On 1/5/06, Peter Eisentraut <[EMAIL PROTECTED]> wrote: > Am Donnerstag, 5. Januar 2006 17:01 schrieb Scott Marlowe: > > The C stands for consistency. Consistency means that only valid data > > can be written to the database. MySQL fails this test precisely because > > it does / can write inconsis

Re: [GENERAL] 'Official' definition of ACID compliance?

2006-01-05 Thread Peter Eisentraut
Am Donnerstag, 5. Januar 2006 17:01 schrieb Scott Marlowe: > The C stands for consistency. Consistency means that only valid data > can be written to the database. MySQL fails this test precisely because > it does / can write inconsistent data to the database. Note that even > the latest version

[GENERAL] java.sql.SQLException: ERROR: invalid byte sequence for encoding "UNICODE": 0xe3936e

2006-01-05 Thread F. Fernandez
Hi! I'm using PostgreSQL 8.0.4 with UNICODE encoding and accessing it with JDBC3 driver 8.0.313. Sometimes, we get this error: java.sql.SQLException: ERROR: invalid byte sequence for encoding "UNICODE": 0xe3936e at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorIm

Re: [GENERAL] Putting restrictions on pg_dump?

2006-01-05 Thread Benjamin Smith
Good ideas, all. but, what about keeping things like check constraints, foreign keys, etc? Hmmm... maybe, if I dumped the entire DB schema, with no data, and then looped thru the tables, creating a temp table (as you describe) with a funky name (such as TABLEaBcDeFgH_U) and then pg_dumping tha

Re: [GENERAL] 'Official' definition of ACID compliance?

2006-01-05 Thread John Dean
At 16:38 05/01/2006, Stephen Frost wrote: * Russ Brown ([EMAIL PROTECTED]) wrote: > Oh, that's a long story. We're a MySQL house that I've been trying to > convert to PostgreSQL one way or the other for ages (with no success as > yet). Note that the argument isn't about which letter the type > tr

Re: [GENERAL] 'Official' definition of ACID compliance?

2006-01-05 Thread Jaime Casanova
On 1/5/06, Stephen Frost <[EMAIL PROTECTED]> wrote: > * Russ Brown ([EMAIL PROTECTED]) wrote: > > Oh, that's a long story. We're a MySQL house that I've been trying to > > convert to PostgreSQL one way or the other for ages (with no success as > > yet). Note that the argument isn't about which lett

Re: [GENERAL] 'Official' definition of ACID compliance?

2006-01-05 Thread Stephen Frost
* Russ Brown ([EMAIL PROTECTED]) wrote: > Oh, that's a long story. We're a MySQL house that I've been trying to > convert to PostgreSQL one way or the other for ages (with no success as > yet). Note that the argument isn't about which letter the type > truncation applies to, but whether it actually

Re: [GENERAL] 'Official' definition of ACID compliance?

2006-01-05 Thread Russ Brown
On Thu, 05 Jan 2006 08:22:01 -0800 Steve Crawford <[EMAIL PROTECTED]> wrote: > Alan Garrison wrote: > > Russ Brown wrote: > >> Does anyone know where I can find the 'official' definition of > >> what it meant by ACID compliance? > >> > >> We're having a discussion about it that we could do with >

Re: [GENERAL] Loading large amounts of data in a SQL command

2006-01-05 Thread Sean Davis
On 1/5/06 8:31 AM, "frank church" <[EMAIL PROTECTED]> wrote: > > > I am loading lots of data via SQL into a database and wrapping it into > transactions to speed it up. > > This fails a number of times and causes the whole transaction to fail. The > queries results are logged so it is easy f

Re: [GENERAL] 'Official' definition of ACID compliance?

2006-01-05 Thread Steve Crawford
Alan Garrison wrote: Russ Brown wrote: Does anyone know where I can find the 'official' definition of what it meant by ACID compliance? We're having a discussion about it that we could do with resolving. In particular, the key point is what it meant by the 'C' part. I maintain that MySQL is not

Re: [GENERAL] Getting timestamp without milliseconds

2006-01-05 Thread Scott Marlowe
On Thu, 2006-01-05 at 10:04, Tadej Kanizar wrote: > Hi! > > > > I’ve got a timestamp field.. and it returns sth like “2006-01-04 > 21:33:17.156”. How can I get the same result, just without the .156? > I’ve looked at date/time formatting functions, etc, but couldn’t find > a straight way to do

Re: [GENERAL] Getting timestamp without milliseconds

2006-01-05 Thread Tom Lane
"Tadej Kanizar" <[EMAIL PROTECTED]> writes: > I've got a timestamp field.. and it returns sth like "2006-01-04 > 21:33:17.156". How can I get the same result, just without the .156? Cast to timestamp(0). regards, tom lane ---(end of broadcast)-

Re: [GENERAL] Getting timestamp without milliseconds

2006-01-05 Thread John Sidney-Woollett
Either date_trunc eg, SELECT date_trunc('hour', TIMESTAMP '2001-02-16 20:38:40'); Result: 2001-02-16 20:00:00 Or format the timestamp as a string select to_char(now(), '-mm-dd HH24:MI:SS'); Hope that helps. John Tadej Kanizar wrote: Hi! I've got a timestamp field.. and it returns s

[GENERAL] Getting timestamp without milliseconds

2006-01-05 Thread Tadej Kanizar
Hi!   I’ve got a timestamp field.. and it returns sth like “2006-01-04 21:33:17.156”. How can I get the same result, just without the .156? I’ve looked at date/time formatting functions, etc, but couldn’t find a straight way to do this L Thanks.   Regards, Tadej

Re: [GENERAL] Monitoring PostgreSQL connections using cricket and

2006-01-05 Thread Steve Crawford
Resting Connections - connections that have no query information. I suspect these are connections starting up or shutting down, but feel free to clue me in. OK, this appears to be version-dependent but it can mean that stats_query_string is false or that the user you are connecting as has no p

Re: [GENERAL] 'Official' definition of ACID compliance?

2006-01-05 Thread Scott Marlowe
On Thu, 2006-01-05 at 08:58, Russ Brown wrote: > Does anyone know where I can find the 'official' definition of what it > meant by ACID compliance? > > We're having a discussion about it that we could do with resolving. In > particular, the key point is what it meant by the 'C' part. I maintain >

Re: [GENERAL] Problem with Starting server 7.4.10_1 on FreeBSD

2006-01-05 Thread |N_E_O|
On 1/5/06, Richard Huxton wrote: |N_E_O| wrote:> It did the initdb command(/usr/local/etc/rc.d/010.pgsql.sh initdb) and got> an "error":>> initdb: file "/usr/local/share/postgresql/postgres.bki" not found > This means you have a corrupted installation or identified the> wrong dir

Re: [GENERAL] 'Official' definition of ACID compliance?

2006-01-05 Thread Alan Garrison
Russ Brown wrote: Does anyone know where I can find the 'official' definition of what it meant by ACID compliance? We're having a discussion about it that we could do with resolving. In particular, the key point is what it meant by the 'C' part. I maintain that MySQL is not ACID compliant becaus

[GENERAL] 'Official' definition of ACID compliance?

2006-01-05 Thread Russ Brown
Does anyone know where I can find the 'official' definition of what it meant by ACID compliance? We're having a discussion about it that we could do with resolving. In particular, the key point is what it meant by the 'C' part. I maintain that MySQL is not ACID compliant because it will (among oth

Re: [GENERAL] Can't connect to postgresql using 'psql -d database -U user -W'

2006-01-05 Thread Larry Rosenman
ctobini wrote: > Hello, > > I have a problem with postgresql 7.4 installed on Linux Ubuntu 5.04 > (hoary). > > I made an 'alter' command for my db users : > > eg: alter user postgres with password 'postgres'; > ALTER USER > > but I can't connect to postgresql using : > > tobini% psql -d templa

Re: [GENERAL] Moving Tablespaces

2006-01-05 Thread Patrick TJ McPhee
In article <[EMAIL PROTECTED]>, Allen Fair <[EMAIL PROTECTED]> wrote: % Do you or (or anyone else) suggest a method for moving databases from % one server to another without the time consuming dump/transfer/restore % process? Anything in the contrib directory or a good management tool? If you w

[GENERAL] Can't connect to postgresql using 'psql -d database -U user -W'

2006-01-05 Thread ctobini
Hello, I have a problem with postgresql 7.4 installed on Linux Ubuntu 5.04 (hoary). I made an 'alter' command for my db users : eg: alter user postgres with password 'postgres'; ALTER USER but I can't connect to postgresql using : tobini% psql -d template1 -U postgres -W password: postgres psq

Re: [GENERAL] Problem with Starting server 7.4.10_1 on FreeBSD

2006-01-05 Thread Richard Huxton
|N_E_O| wrote: It did the initdb command(/usr/local/etc/rc.d/010.pgsql.sh initdb) and got an "error": initdb: file "/usr/local/share/postgresql/postgres.bki" not found This means you have a corrupted installation or identified the wrong directory with the invocation option -L. 1. What is in /u

Re: [GENERAL] copy from error

2006-01-05 Thread marcelo Cortez
Tom , Michael Thanks for your responses, there any procedure for fix fts installation? any advice will be appreciated Tia. best regards. MDC --- Tom Lane <[EMAIL PROTECTED]> escribió: > marcelo Cortez <[EMAIL PROTECTED]> writes: > > the follow error: > > Warning: pg_query(): Query f

[GENERAL] Loading large amounts of data in a SQL command

2006-01-05 Thread frank church
I am loading lots of data via SQL into a database and wrapping it into transactions to speed it up. This fails a number of times and causes the whole transaction to fail. The queries results are logged so it is easy for me to find problem records. Is there a setting or feature that allows which

[GENERAL] Problem with Starting server 7.4.10_1 on FreeBSD

2006-01-05 Thread |N_E_O|
I have a question that might be noobish and it might not. I dont know cus i havent tried PostgrSQL before.i did the simple task og installing the database server on FreeBSD 6.0 (make install clean in the ports tree). I then did make auto-confige for the port /usr/net-mngt/nav/It did the initdb comm

Re: [GENERAL] plpgsql question

2006-01-05 Thread Matthew Peter
On 1/5/06, Matthew Peter wrote: > I'm trying to do a simple SELECT * in plpgsql that returns a set of records > as a row w/ columns, not a row into a variable, w/ some conditionals. > > The function below is semi-pseudo with what I'm trying to... If anyone > could give me an example that wor

Re: [GENERAL] pg admin III and primary keys (for backup/restore)

2006-01-05 Thread Richard Huxton
Assad Jarrahian wrote: Environment: Deployed on Debian. Test and Development on Windows. Using pg_admin III and Postgresql 8.1 (both test and development). I want to backup Development and restore it in test and vice-versa. So when I do a backup of the db (in PGAdmin III), it backs it up. But w