[GENERAL] Supporting SQL/MED DATALINK

2012-01-06 Thread Damiano ALBANI
Hello, Do you plan on supporting SQL/MED features concerning DATALINKs? I've seen DATALINK mentionned on the Wiki [1] but I couldn't find it on the TODO list [2]. By the way, do you know any vendor that provides support for DATALINK? Except DB2, there seems to be very little "visibility" of this

Re: [GENERAL] using pg's internal timezone database?

2012-01-06 Thread Louis-David Mitterrand
On Tue, Dec 20, 2011 at 05:29:15AM -0700, Scott Marlowe wrote: > On Tue, Dec 20, 2011 at 2:05 AM, Louis-David Mitterrand > wrote: > > Hi, > > > > To provide my forum users with a 'timezeone' preference in their profile > > how can I use postgresql's internal table of timezones ? > > > > I found a

Re: [GENERAL] Vacuum and Large Objects

2012-01-06 Thread Igor Neyman
> -Original Message- > From: Stefan Keller [mailto:sfkel...@gmail.com] > Sent: Friday, January 06, 2012 1:12 AM > To: Igor Neyman > Cc: Simon Windsor; pgsql-general@postgresql.org > Subject: Re: Vacuum and Large Objects > > Hi Igor > 2011/12/16 Igor Neyman wrote: > But I think, > your pro

Re: [GENERAL] Vacuum and Large Objects

2012-01-06 Thread Igor Neyman
Stefan, > -Original Message- > From: Stefan Keller [mailto:sfkel...@gmail.com] > Sent: Friday, January 06, 2012 1:12 AM > To: Igor Neyman > Cc: Simon Windsor; pgsql-general@postgresql.org > Subject: Re: Vacuum and Large Objects > > Hi Igor > 2011/12/16 Igor Neyman wrote: > But I think, >

Re: [GENERAL] function return update count

2012-01-06 Thread Andreas Kretschmer
Kevin Duffy hat am 6. Januar 2012 um 00:32 geschrieben: > Hello: > > I am try to get a function to return the count of the rows updated within the > function. > As in the following, I wan the number of rows updated to be returned. > > This is a simple update, other update statements that

[GENERAL] How to code lo_creat & lo_write & lo_read in non-blocking mode

2012-01-06 Thread ChoonSoo Park
I just wonder if there is a way to program lo client interfaces (lo_creat, lo_write, lo_read) in non-blocking mode. PQsendQueryParams works perfect for executing a sql command in non-blocking mode. But I couldn't find a way for handling large objects. Do you have any example? Thank you, Choon Par

Re: [GENERAL] Running multiple versions

2012-01-06 Thread Tom Lane
praka...@uci.edu writes: > Thanks for your reply, Scott. Your suggestion sounds like it would be > fine, but I have a few more questions now. The docs at > http://www.postgresql.org/docs/9.1/interactive/upgrading.html recommend > using the new version's pg_dumpall to back up the existing cluster

[GENERAL] URGENT: temporary table not recognized?

2012-01-06 Thread Phoenix Kiula
Hi. I'm using Postgresql 9.0.5, and the connection is made via pgbouncer. I create a temporary table, and then want to import data into this table via a COPY command. Yet, this just created table is not being recognized. What's up? >From my terminal: mydb=# mydb=# create temporary table vl (

Re: [GENERAL] function return update count

2012-01-06 Thread David Johnston
In 9.1 you could use and updatable CTE and in the main query perform and return a count. I would think plpgsql would be the better option though. On Jan 6, 2012, at 2:29, Andreas Kretschmer wrote: > > Kevin Duffy hat am 6. Januar 2012 um 00:32 > geschrieben: > > Hello: > > I am try to g

Re: [GENERAL] URGENT: temporary table not recognized?

2012-01-06 Thread Tom Lane
Phoenix Kiula writes: > Hi. I'm using Postgresql 9.0.5, and the connection is made via pgbouncer. Perhaps pgbouncer is redirecting the second command to a different session? regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make

Re: [GENERAL] function return update count

2012-01-06 Thread Richard Huxton
On 06/01/12 16:33, David Johnston wrote: In 9.1 you could use and updatable CTE and in the main query perform and return a count. I would think plpgsql would be the better option though. For the SQL option, it would be this (9.1 only though - I think David's right there). CREATE FUNCTION f1

Re: [GENERAL] URGENT: temporary table not recognized?

2012-01-06 Thread Bosco Rama
Tom Lane wrote: > Phoenix Kiula writes: >> Hi. I'm using Postgresql 9.0.5, and the connection is made via pgbouncer. > > Perhaps pgbouncer is redirecting the second command to a different > session? This may be OT, but are temp tables also removed when setting a new session authorization? Bosco

[GENERAL] DROP ROLE prevented by dependency

2012-01-06 Thread Bulgrien, Kevin
psql 8.3.16 I've done some searching of mailing list, etc., but have either not searched the right way, or something. If anyone could throw a bone on this it would be appreciated. I have no idea what the procedure is for figuring out how to drop this role: DROP ROLE myuser; ERROR: role "myuser

[GENERAL] Binary Large Objects (LOB/BLOB) in Hibernate and JDBC: Unresolved issues

2012-01-06 Thread Stefan Keller
Hi, I run into a nasty behavior of current PostgreSQL JDBC. I maintain images (from Webcams). In the Java and Hibernate (JPA) code I specified a @Lob annotation on class MyData and a attribte/data type "byte[] mydata;". Hibernate then generates two tables in PostgreSQL, one called MyData with a c

[GENERAL] How PostgreSQL handles Binary Large Objects (LOB/BLOB): types BYTEA, OID/pg_largeobjects and DATALINK

2012-01-06 Thread Stefan Keller
Hi, I'd like to get more insight of how to handle (binary) Large Object Types (LOB/BLOB/CLOB) in Postgres and I think we should clarify the situation since to me there are some inconsistencies at least in the docs (or my understanding). I could try to summarize e.g. in the Postgres Wiki. In curre

Re: [GENERAL] DROP ROLE prevented by dependency

2012-01-06 Thread Tom Lane
"Bulgrien, Kevin" writes: > psql 8.3.16 > I've done some searching of mailing list, etc., but have either not searched > the right way, or something. If anyone could throw a bone on this it would > be appreciated. I have no idea what the procedure is for figuring out how > to drop this role: >

Re: [GENERAL] How PostgreSQL handles Binary Large Objects (LOB/BLOB): types BYTEA, OID/pg_largeobjects and DATALINK

2012-01-06 Thread Tom Lane
Stefan Keller writes: > The Wiki page about ORACLE and BLOBs [2] seems to me little bit > outdated. It says "Binary large object support in Postgres is very > poor and unsuitable for use in a 24/7 environment, because you can't > dump them with pg_dump." That whole page is largely obsolete, I thi

Re: [GENERAL] DROP ROLE prevented by dependency

2012-01-06 Thread Bulgrien, Kevin
> -Original Message- > From: Tom Lane [mailto:t...@sss.pgh.pa.us] > Sent: Friday, January 06, 2012 12:22 PM > To: Bulgrien, Kevin > Cc: 'pgsql-general@postgresql.org' > Subject: Re: [GENERAL] DROP ROLE prevented by dependency > > > I have no idea what the procedure is for figuring out how

[GENERAL] please help understand freeing shared buffers

2012-01-06 Thread Filip Rembiałkowski
Among following queries, only THREE runs fast enough for me. I can't understand the logic behind this. I once thought that shared buffers replacement is independent from whether the backend which used it is still alive. But is it true? Seems like shared buffers are "returned to the pool" or "fr

Re: [GENERAL] URGENT: temporary table not recognized?

2012-01-06 Thread Phoenix Kiula
On Fri, Jan 6, 2012 at 11:46 AM, Tom Lane wrote: > Phoenix Kiula writes: >> Hi. I'm using Postgresql 9.0.5, and the connection is made via pgbouncer. > > Perhaps pgbouncer is redirecting the second command to a different > session? > Thanks Tom. I'm in the exact same session in my terminal, an

Re: [GENERAL] please help understand freeing shared buffers

2012-01-06 Thread Tom Lane
=?UTF-8?Q?Filip_Rembia=C5=82kowski?= writes: > Among following queries, only THREE runs fast enough for me. > I can't understand the logic behind this. I'm not sure why you'd expect real answers when you haven't shown us what the query is doing, but my first thought is that the discrepancy comes

Re: [GENERAL] URGENT: temporary table not recognized?

2012-01-06 Thread Steve Crawford
On 01/06/2012 01:11 PM, Phoenix Kiula wrote: On Fri, Jan 6, 2012 at 11:46 AM, Tom Lane wrote: Phoenix Kiula writes: Hi. I'm using Postgresql 9.0.5, and the connection is made via pgbouncer. Perhaps pgbouncer is redirecting the second command to a different session? Thanks Tom. I'm in the

Re: [GENERAL] please help understand freeing shared buffers

2012-01-06 Thread Filip Rembiałkowski
2012/1/6 Tom Lane : > =?UTF-8?Q?Filip_Rembia=C5=82kowski?= writes: >> Among following queries, only THREE runs fast enough for me. >> I can't understand the logic behind this. > > I'm not sure why you'd expect real answers when you haven't shown us > what the query is doing, it is an UDF, encapsu

Re: [GENERAL] JOIN column maximum

2012-01-06 Thread Lee Hachadoorian
On Thu, Jan 5, 2012 at 10:19 PM, Darren Duncan wrote: > > This all being said, 23K values per row just sounds wrong, and I can't > imagine any census forms having that many details. > > Do you, by chance, have multiple values of the same type that are in > different fields, eg telephone_1, telep

Re: [GENERAL] URGENT: temporary table not recognized?

2012-01-06 Thread Marko Kreen
On Fri, Jan 6, 2012 at 11:24 PM, Steve Crawford wrote: > On 01/06/2012 01:11 PM, Phoenix Kiula wrote: >> >> On Fri, Jan 6, 2012 at 11:46 AM, Tom Lane  wrote: >>> >>> Phoenix Kiula  writes: Hi. I'm using Postgresql 9.0.5, and the connection is made via pgbouncer. >>> >>> Perhaps pgbo

Re: [GENERAL] URGENT: temporary table not recognized?

2012-01-06 Thread Tom Lane
Marko Kreen writes: > On Fri, Jan 6, 2012 at 11:24 PM, Steve Crawford > wrote: >> On 01/06/2012 01:11 PM, Phoenix Kiula wrote: >>> How can I make sure pgbouncer takes it all in the same session? I also >>> tried the two commands within a transaction. >> Sounds like you are using statement poolin

Re: [GENERAL] URGENT: temporary table not recognized?

2012-01-06 Thread Phoenix Kiula
On Fri, Jan 6, 2012 at 4:24 PM, Steve Crawford wrote: > On 01/06/2012 01:11 PM, Phoenix Kiula wrote: >> >> On Fri, Jan 6, 2012 at 11:46 AM, Tom Lane  wrote: >>> >>> Phoenix Kiula  writes: Hi. I'm using Postgresql 9.0.5, and the connection is made via pgbouncer. >>> >>> Perhaps pgbou

Re: [GENERAL] URGENT: temporary table not recognized?

2012-01-06 Thread Adrian Klaver
On 01/06/2012 03:12 PM, Phoenix Kiula wrote: On Fri, Jan 6, 2012 at 4:24 PM, Steve Crawford wrote: On 01/06/2012 01:11 PM, Phoenix Kiula wrote: Thanks Steve. YES! I changed it to transaction pooling and now it works. Another problem through. I need to COPY a huge text file into a table,

Re: [GENERAL] URGENT: temporary table not recognized?

2012-01-06 Thread Phoenix Kiula
On Fri, Jan 6, 2012 at 6:20 PM, Adrian Klaver wrote: > http://www.postgresql.org/docs/9.0/interactive/sql-copy.html > > Search for > NULL Thanks Adrian. Without examples, it's hard to predict syntax. If the value after a pipe is missing altogether, I suppose the missing value is "\n" (newline

Re: [GENERAL] URGENT: temporary table not recognized?

2012-01-06 Thread Steve Crawford
On 01/06/2012 03:42 PM, Phoenix Kiula wrote: On Fri, Jan 6, 2012 at 6:20 PM, Adrian Klaver wrote: http://www.postgresql.org/docs/9.0/interactive/sql-copy.html Search for NULL Thanks Adrian. Without examples, it's hard to predict syntax. If the value after a pipe is missing altogether, I s

Re: [GENERAL] URGENT: temporary table not recognized?

2012-01-06 Thread Adrian Klaver
On 01/06/2012 03:42 PM, Phoenix Kiula wrote: On Fri, Jan 6, 2012 at 6:20 PM, Adrian Klaver wrote: http://www.postgresql.org/docs/9.0/interactive/sql-copy.html Search for NULL Thanks Adrian. Without examples, it's hard to predict syntax. If the value after a pipe is missing altogether, I

Re: [GENERAL] URGENT: temporary table not recognized?

2012-01-06 Thread Phoenix Kiula
On Fri, Jan 6, 2012 at 6:53 PM, Steve Crawford wrote: > On 01/06/2012 03:42 PM, Phoenix Kiula wrote: >> >> On Fri, Jan 6, 2012 at 6:20 PM, Adrian Klaver >>  wrote: >> >>> http://www.postgresql.org/docs/9.0/interactive/sql-copy.html >>> >>> Search for >>> NULL >> >> >> >> Thanks Adrian. >> >> Witho

Re: [GENERAL] URGENT: temporary table not recognized?

2012-01-06 Thread Steve Crawford
On 01/06/2012 03:12 PM, Phoenix Kiula wrote: ... Sounds like you are using statement pooling - every statement can be assigned to a different server connection. You may need transaction pooling or session pooling: http://pgbouncer.projects.postgresql.org/doc/usage.html Thanks Steve. YES! I c

Re: [GENERAL] URGENT: temporary table not recognized?

2012-01-06 Thread Phoenix Kiula
On Fri, Jan 6, 2012 at 6:54 PM, Adrian Klaver wrote: > > Try: > copy vl from 'data.txt' WITH CSV DELIMITER '|'; Doesn't work. Can't see what the different in CSV is from a text file. Same errors are thrown. > If that doesn't work take a look at pgloader: > http://pgfoundry.org/projects/pgloade

Re: [GENERAL] URGENT: temporary table not recognized?

2012-01-06 Thread Steve Crawford
On 01/06/2012 03:55 PM, Phoenix Kiula wrote: ... In general, when you have data scrubbing issues like this, grep/sed/awk/... are your friends. Clean it up then import it. Thanks Steve. The file has 350 million lines. Sed, Awk etc are a little painful when the file is 18GB witht hat many lines.

Re: [GENERAL] URGENT: temporary table not recognized?

2012-01-06 Thread Adrian Klaver
On Friday, January 06, 2012 4:16:09 pm Phoenix Kiula wrote: > On Fri, Jan 6, 2012 at 6:54 PM, Adrian Klaver wrote: > > Try: > > copy vl from 'data.txt' WITH CSV DELIMITER '|'; > > Doesn't work. Can't see what the different in CSV is from a text file. > Same errors are thrown. > > > If that doesn

Re: [GENERAL] URGENT: temporary table not recognized?

2012-01-06 Thread Phoenix Kiula
On Fri, Jan 6, 2012 at 8:19 PM, Adrian Klaver wrote: > On Friday, January 06, 2012 4:16:09 pm Phoenix Kiula wrote: >> On Fri, Jan 6, 2012 at 6:54 PM, Adrian Klaver >> wrote: >> > Try: >> > copy vl from 'data.txt' WITH CSV DELIMITER '|'; >> >> Doesn't work. Can't see what the different in CSV is

Re: [GENERAL] URGENT: temporary table not recognized?

2012-01-06 Thread John R Pierce
On 01/06/12 5:33 PM, Phoenix Kiula wrote: > http://pgloader.projects.postgresql.org/ Sorry. That I already did. But where's the config file? How to configure the config file? Where's the simple doc (not on that ugly PGFoundry website, I mean in English that people can understand what to do, wi