Re: [GENERAL] PL/pgSQL: SELECT INTO only if result count = 1

2011-08-28 Thread Tarlika Elisabeth Schmitz
On Sat, 27 Aug 2011 18:36:14 -0400 Tom Lane wrote: >Tarlika Elisabeth Schmitz writes: >> SELECT INTO >> country_id, region_id, town_id >> country_fk, region_fk, id >> FROM town >> WHERE ...; > >> GET DIAGNOSTICS cnt = ROW_COUNT; >> RAISE DEBUG 'COUNT %', cnt; > >> always returns 1 > >Yeah. B

[GENERAL] Call for translations

2011-08-28 Thread Peter Eisentraut
In anticipation of the release of PostgreSQL 9.1, it is once again time to update the message translations. We are now in a string freeze, which has traditionally been associated with the first release candidate, so it's a good time to do this work now. If you want to help, see

Re: [GENERAL] Feature request: per user connections limit

2011-08-28 Thread pasman pasmański
Thanks, i'll try it tomorrow -- 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] JDBC Connection Errors

2011-08-28 Thread Craig Ringer
On 24/08/2011 6:47 AM, Sam Nelson wrote: Hi list, A client is hitting an issue with JDBC: org.postgresql.util.PSQLException: Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections. -pg_hba.conf is set to trust 0.0.0.0/0 (IPv4 onl

Re: [GENERAL] JDBC Connection Errors

2011-08-28 Thread Ian Pilcher
On 08/28/2011 08:33 AM, Craig Ringer wrote: >> A client is hitting an issue with JDBC: >> org.postgresql.util.PSQLException: Connection refused. Check that the >> hostname and port are correct and that the postmaster is accepting >> TCP/IP connections. >> >> -pg_hba.conf is set to trust 0.0.0.0/0 (

Re: [GENERAL] Problem importing a csv file

2011-08-28 Thread Adrian Klaver
On Saturday, August 27, 2011 10:03:53 pm planas wrote: > Hi, > > I am attempting to import a csv file into a predefined, empty table > using the following commands: > > COPY ContactUpdates > FROM '/media/Fred/Work/SQL_Server/AP/ContactUpdates.csv' > WITH DELIMITERS ',' CSV > > When testing the q

Re: [GENERAL] Using Postgresql as application server

2011-08-28 Thread Dimitri Fontaine
[edited] Merlin Moncure writes:  http://asmith.id.au/mod_libpq.html >> http://asmith.id.au/source/mod_libpq2.c > > node.js is even thinner. > > node.js is single threaded and 100% asynchronous which fits very nice > with libpq which is at heart a single threaded asynchronous library. Sure.

Re: [GENERAL] Using Postgresql as application server

2011-08-28 Thread Merlin Moncure
On Sat, Aug 27, 2011 at 11:43 PM, Andrej wrote: > On 19 August 2011 04:16, Merlin Moncure wrote: >>> It's been around for a long time already: >>> >>>  http://asmith.id.au/mod_libpq.html >> mod_libpq looks like it hasn't been updated in quite a while (apache >> 1.3 only) -- I think a node.js http

Re: [GENERAL] Problem importing a csv file

2011-08-28 Thread planas
On Sun, 2011-08-28 at 03:53 -0200, pasman pasmański wrote: > What if you run this query using psql? > > -- > > pasman > It did import the data and it gave no error messages -- Jay Lozier jsloz...@gmail.com

Re: [GENERAL] Problem importing a csv file

2011-08-28 Thread planas
On Sun, 2011-08-28 at 03:53 -0200, pasman pasmański wrote: > What if you run this query using psql? > > -- > > pasman > When I run the following: DROP Table "ContactUpdates" CREATE TABLE "ContactUpdates" ( "VendorID" integer NOT NULL, "LastName" character varying(45), "F

Re: [GENERAL] Problem importing a csv file

2011-08-28 Thread Shoaib Mir
On Mon, Aug 29, 2011 at 11:21 AM, planas wrote: > ** > > CREATE TABLE "*ContactUpdates"* > ( > "VendorID" integer NOT NULL, > "LastName" character varying(45), > "FirstName" character varying(45), > CONSTRAINT "ContactUpdates_pkey" PRIMARY KEY ("VendorID" ) > ERROR: relation "countupdates

Re: [GENERAL] pg_restore with -j fails (works without -j option)

2011-08-28 Thread Tom Lane
I wrote: > Lonni J Friedman writes: >> [ this doesn't work: ] >> $ cat 2011-08-25-1314280801-nightly.out | pg_restore -j2 -U lfriedman -v -d >> nightly >> pg_restore: [custom archiver] cannot reopen stdin >> pg_restore: *** aborted because of error > I agree though that that's not a terribly fri

Re: [GENERAL] pg_restore with -j fails (works without -j option)

2011-08-28 Thread Lonni J Friedman
On Sun, Aug 28, 2011 at 6:56 PM, Tom Lane wrote: > I wrote: >> Lonni J Friedman writes: >>> [ this doesn't work: ] >>> $ cat 2011-08-25-1314280801-nightly.out | pg_restore -j2 -U lfriedman -v -d >>> nightly >>> pg_restore: [custom archiver] cannot reopen stdin >>> pg_restore: *** aborted because

Re: [GENERAL] Whether the function exists a in pgsql table or not?

2011-08-28 Thread Greg Smith
On 08/27/2011 01:21 PM, shuaixf wrote: In Oracle, when the table has few records, used frequently, it would use "storage(buffer_pool keep)" to keep the data in cache instead of LRU algorithm. if the function exists in a pgsql table or not? There aren't any controls to pin a table into memo

[GENERAL] Get data back after drop Command

2011-08-28 Thread Adarsh Sharma
Dear all, Today by mistake I issued a drop table statement in Postgresql database. Now is it possible to get that data back through WAL. My PostgresPLus Version : 8.4 OS : Linux ( CentOs ) My postgresql.conf parameters are : # WRITE AHEAD LOG #---

Re: [GENERAL] Get data back after drop Command

2011-08-28 Thread John R Pierce
On 08/28/11 9:33 PM, Adarsh Sharma wrote: Today by mistake I issued a drop table statement in Postgresql database. Now is it possible to get that data back through WAL. when's your last full backup from? -- john r pierceN 37, W 122 santa cruz ca