[GENERAL] Clean way to insert records if they don't exist, update if they do

2011-09-17 Thread Mike Christensen
Here's my situation. I have a table with a bunch of URLs and crawl dates associated with them. When my program processes a URL, I want to INSERT a new row with a crawl date. If the URL already exists, I want to update the crawl date to the current datetime. With MS SQL or Oracle I'd probably us

Re: [GENERAL] Am I best off keeping large chunks of text in a separate table?

2011-09-17 Thread Scott Marlowe
On Sat, Sep 17, 2011 at 7:15 PM, Mike Christensen wrote: > > Man I've been reading this list for years now, and I kept on seeing > this "TOAST" thing and just figured you people liked it for sandwiches > or something. > > I feel like the programmer who thinks he's smart using a left bitshift > ope

Re: [GENERAL] Am I best off keeping large chunks of text in a separate table?

2011-09-17 Thread Mike Christensen
> On Sat, Sep 17, 2011 at 6:46 PM, Mike Christensen wrote: >> I have a table that looks something like this: >> >> url - character varying(1024) >> date - timestamptz >> body - text >> >> Url is a unique primary key.  Body can potentially be a couple hundred >> k of text. >> >> There will at first

Re: [GENERAL] Am I best off keeping large chunks of text in a separate table?

2011-09-17 Thread Scott Marlowe
On Sat, Sep 17, 2011 at 6:46 PM, Mike Christensen wrote: > I have a table that looks something like this: > > url - character varying(1024) > date - timestamptz > body - text > > Url is a unique primary key.  Body can potentially be a couple hundred > k of text. > > There will at first be perhaps

[GENERAL] Am I best off keeping large chunks of text in a separate table?

2011-09-17 Thread Mike Christensen
I have a table that looks something like this: url - character varying(1024) date - timestamptz body - text Url is a unique primary key. Body can potentially be a couple hundred k of text. There will at first be perhaps 100,000 rows in this table, but at some point it might get into the million

Re: [GENERAL] problem connecting postgresql 9.0 tables from vba

2011-09-17 Thread Craig Ringer
On 09/17/2011 03:51 PM, Adriano V. Autino wrote: Therefore I use a docmd.transferdatabase acLink method, that works perfectly on SQL Server. When you say it fails: What's the full, exact text of the error message? What SQL, if any, is sent to the server? (Enable "mylog" on the ODBC driver and/

RES: RES: RES: [GENERAL] Foreign PostgreSQL server

2011-09-17 Thread Edson Carlos Ericksson Richter
Thanks, Adrian! That was the piece of information I was missing. I'll wait, and hopefully this will be released as an external module. Kind regards, Edson. -Mensagem original- De: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] Em nome de Adrian Klaver

[GENERAL] how to insert xml datatype using jdbc?

2011-09-17 Thread boris
hi all, I'm trying to use SQLXML ( con.createSQLXML();) with 8.4-703 jdbc4 and I'm getting this : Method org.postgresql.jdbc4.Jdbc4Connection.createSQLXML() is not yet implemented. how do I insert xml data type using jdbc in postgre 8.4? thanks. -- Sent via pgsql-general mailing list (pgsql-g

Re: RES: RES: [GENERAL] Foreign PostgreSQL server

2011-09-17 Thread Adrian Klaver
On Saturday, September 17, 2011 5:22:35 am Edson Carlos Ericksson Richter wrote: > Thanks Adrian, I really miss that part... > Anyway, if I try to declare a handler like > > CREATE FOREIGN DATA WRAPPER postgresql VALIDATOR postgresql_fdw_validator > HANDLER postgresql_fdw_handler; > > (as found o

[GENERAL] problem connecting postgresql 9.0 tables from vba

2011-09-17 Thread Adriano V. Autino
I develop a software product in msAccess, connecting a shared database on SQL Server, on a MS Windows Server machine. Recently i decided to enhance my product, porting the database to Postgresql 9.0, on an Ubuntu 10.0 Server machine. My software works on the db mainly connecting tables via OD

Re: [GENERAL] How to get Transaction Timestamp ?

2011-09-17 Thread Scott Ribe
On Sep 17, 2011, at 1:09 AM, Raghavendra wrote: > However, I was curious to know any thing stored at Page-Level(like XID) to > help me in getting the transaction timestamp. No, there is no such thing. If you want timestamps, you have to record them yourself. -- Scott Ribe scott_r...@elevated-

Re: [GENERAL] How to get Transaction Timestamp ?

2011-09-17 Thread Marti Raudsepp
2011/9/17 pasman pasmański : > Trigger may store timestamp to other table "timestamps". You join then > xmin with xmin from this table to access timestamp. But note that this is not reliable. Vacuum *does* change xmin during the freeze process, as does a pg_dump&reload of data. Possibly other case

Re: [GENERAL] Upgrading from 9.0->9.1 Ubuntu Best Practices

2011-09-17 Thread adebarros
Thanks, Toby. For some reason your reply didn't show up while I was looking at this thread in Google groups. My apologies. In looking at my system, I see I have 8.4 in there as well from an older Ubuntu version. I imagine I can remove that once I have 9.1 working fine. Best, Anthony -- View this

Re: [GENERAL] Upgrading from 9.0->9.1 Ubuntu Best Practices

2011-09-17 Thread Marti Raudsepp
On Sat, Sep 17, 2011 at 16:57, Anthony DeBarros wrote: > Anyone? Didn't you get the reply by Toby Corkindale? If your database is small (a few gigabytes or less), then pg_upgradecluster is the easiest way to upgrade on Ubuntu. Regards, Marti -- Sent via pgsql-general mailing list (pgsql-gener

Re: [GENERAL] Apparent Problem With NULL in Restoring pg_dump

2011-09-17 Thread Rich Shepard
On Fri, 16 Sep 2011, Andy Colson wrote: Sorry, I should have been a little more clear, but, at least you got things cleaned up. PG has a huge number of data manipulation functions. If you have to export data out of a database in order to massage it, then that's a failure of a database. PG (and

Re: [GENERAL] Upgrading from 9.0->9.1 Ubuntu Best Practices

2011-09-17 Thread Anthony DeBarros
Anyone? -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] warm standby - apply wal archives

2011-09-17 Thread MirrorX
just another update since the system is up and running and one more question :p the secondary server is able to restore the wal archives practically immediately after they arrive. i have set a rsync cron job to send the new wals every 5 minutes. the procedure to transfer the files and to restore t

RES: RES: [GENERAL] Foreign PostgreSQL server

2011-09-17 Thread Edson Carlos Ericksson Richter
Thanks Adrian, I really miss that part... Anyway, if I try to declare a handler like CREATE FOREIGN DATA WRAPPER postgresql VALIDATOR postgresql_fdw_validator HANDLER postgresql_fdw_handler; (as found on Wiki) I get error “ERROR: function postgresql_fdw_handler() does not exists” I’m definite

[GENERAL]

2011-09-17 Thread Tareq Tajkeh
http://catherinesmith.com/invitation.html";>http://catherinesmith.com/invitation.html

[GENERAL] Problem with pg_upgrade 9.0 -> 9.1

2011-09-17 Thread Thomas Kellerer
Hi, I was trying to upgrade my Postgres 9.0 installation using pg_upgrade. Running it first with --check revealed no problems. The when I did the actual migration, the following happened: === start console output Performing Consistency Checks

Re: [GENERAL] How to get Transaction Timestamp ?

2011-09-17 Thread Raghavendra
Thank you for your valuable inputs. Agreed, with the help of two workarounds we can pull the trx-timestamp one with additional-column/trigger and another with log_line_prefix from pg_log/logs. However, I was curious to know any thing stored at Page-Level(like XID) to help me in getting the transa

Re: [GENERAL] How to get Transaction Timestamp ?

2011-09-17 Thread pasman pasmański
Trigger may store timestamp to other table "timestamps". You join then xmin with xmin from this table to access timestamp. 2011/9/17, Raghavendra : > Thank you for your valuable inputs. > > Agreed, with the help of two workarounds we can pull the trx-timestamp one > with additional-column/trigger