Re: [GENERAL] Error: absolute path not allowed

2013-01-09 Thread Raghavendra
On Thu, Jan 10, 2013 at 1:20 AM, wschwurack wrote: > How do I find what is calling pg_read_file > > As said, check the log's to find DB,Host,User etc. from where its been called. If log_line_prefix not set to appropriate to all those details then change it as shown below which just need RELOAD of

Re: [GENERAL] Database connections seemingly hanging

2013-01-09 Thread Tom Lane
fredrik.huitfeldtmad...@schneider-electric.com writes: > We have a setup where 2 JBoss (5.1) servers communicate with 1 instance of > PgPool (3.04), which again communicates with 2 Postgresql (8.4) servers. > The JBoss servers host some Java code for us and as part of that they run > some quartz

Re: [GENERAL] Bug: dblink_send_query not work on 9.2?

2013-01-09 Thread Tom Lane
aasat writes: > This work > do $$ > begin > perform dblink.dblink_connect('internal'); I believe that creates an unnamed connection referencing a foreign server definition named "internal". > perform dblink.dblink_exec('internal', 'set application_name=''dblink'';', > true); This is goin

[GENERAL] Custom JDBC wrapper for DB2 Fed Server

2013-01-09 Thread Alexander Gataric
I was wondering if there is a Postgres JDBC Type 4 wrapper for DB2 Federated Server. The default wrapper from IBM has a number of issues with Postgres which a better wrapper could solve. I will attempt to modify the IBM wrapper if I can get my hands on the source code. -- Sent via pgsql-general

Re: [GENERAL] How can I detect if a schema exists?

2013-01-09 Thread felix
On Thu, Jan 10, 2013 at 09:11:59AM +0900, Ian Lawrence Barwick wrote: > How about: > > SELECT TRUE FROM information_schema.schemata WHERE schema_name = 'xyzzy' > > ? (Though I notice this table only seems to show the schemas owned by the > user if the user is not a superuser). I'll have to pl

Re: [GENERAL] currval of sequence xxx_seq is not yet defined in this session?

2013-01-09 Thread Adrian Klaver
On 01/08/2013 05:58 PM, kenyon wrote: Thanks for your reply! yeath,I quite accept your opinion,once i guess the drive adds savepoint between the two SQL,but not sure Off hand I would say the drive has nothing to do with it. The issue would seem to be that as originally written ibatis was issu

Re: [GENERAL] Error: absolute path not allowed

2013-01-09 Thread Scott Marlowe
Look at your log line prefix setting in postgresql.conf. Specifically log things like db, host, username, etc. On Wed, Jan 9, 2013 at 12:50 PM, wschwurack wrote: > How do I find what is calling pg_read_file > > > > -- > View this message in context: > http://postgresql.1045698.n5.nabble.com/Err

Re: [GENERAL] How can I detect if a schema exists?

2013-01-09 Thread Ian Lawrence Barwick
2013/1/10 > I was reviving an old test program which hasn't been used since 9.1 and > found that "SET search_path = xyzzy" no longer fails if the schema "xyzzy" > doesn't exist. > > Is there an approved or recommended way to tell if a schema exists? I can > think of lots of ways, but none as eas

[GENERAL] Database connections seemingly hanging

2013-01-09 Thread Fredrik . HuitfeldtMadsen
Hi All, We have a setup where 2 JBoss (5.1) servers communicate with 1 instance of PgPool (3.04), which again communicates with 2 Postgresql (8.4) servers. The JBoss servers host some Java code for us and as part of that they run some quartz jobs. These jobs are triggered right after startup

[GENERAL] Bug: dblink_send_query not work on 9.2?

2013-01-09 Thread aasat
I have problem with dblink_send_query function on Postgres 9.2.2 This work do $$ begin perform dblink.dblink_connect('internal'); perform dblink.dblink_exec('internal', 'set application_name=''dblink'';', true); perform dblink.dblink_disconnect(); end; $$ But this not do $$ begin perf

Re: [GENERAL] Error: absolute path not allowed

2013-01-09 Thread wschwurack
How do I find what is calling pg_read_file -- View this message in context: http://postgresql.1045698.n5.nabble.com/Error-absolute-path-not-allowed-tp5739320p5739424.html Sent from the PostgreSQL - general mailing list archive at Nabble.com. -- Sent via pgsql-general mailing list (pgsql-gene

Re: [GENERAL] How to store clickmap points?

2013-01-09 Thread David Johnston
aasat wrote > Hi, > > I want to store clickmap points (X, Y and hits value) for website > > I currently have table like this > > CREATE TABLE clickmap ( > page_id integer, > date date, > x smallint, > y smallint, > hits integer > ) > > But this generated about 1M rows per day. > > C

[GENERAL] How can I detect if a schema exists?

2013-01-09 Thread felix
I was reviving an old test program which hasn't been used since 9.1 and found that "SET search_path = xyzzy" no longer fails if the schema "xyzzy" doesn't exist. Is there an approved or recommended way to tell if a schema exists? I can think of lots of ways, but none as easy as the 9.1 search_

Re: [GENERAL] [Solved] Corrupt indexes on slave when using pg_bulkload on master

2013-01-09 Thread Tom Lane
James Cowell writes: > But pg_bulkload only puts the index updates into WAL if you also have > > archive_mode = on > > I guess it needs to test wal_level rather than archive mode now? It looks > like changes to the project have been minimal for some time, which is a shame > because it's a

Re: [GENERAL] How to store clickmap points?

2013-01-09 Thread Ben Chobot
On Jan 8, 2013, at 2:12 AM, aasat wrote: > Hi, > > I want to store clickmap points (X, Y and hits value) for website > > I currently have table like this > > CREATE TABLE clickmap ( > page_id integer, > date date, > x smallint, > y smallint, > hits integer > ) > > But this generated abou

Re: [GENERAL] query by partial timestamp

2013-01-09 Thread hubert depesz lubaczewski
On Tue, Jan 08, 2013 at 04:19:59PM -0600, Kirk Wythers wrote: > I have a column of type TIMESTAMP, I'd like to query all records from 2011. > If it were text I could use a partial such as: > > WHERE > text ~ '2011' > > There must be a simple way to pull the year part out of a timestamp for

Re: [GENERAL] query by partial timestamp

2013-01-09 Thread Michael Nolan
It is probably not the most efficient, but I often use this syntax, which reads better. Select . where col_type_timestamp::date between '2011-01-01' and '2011-12-31' This will use a timestamp index. -- Mike Nolan -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make

Re: [GENERAL] query by partial timestamp

2013-01-09 Thread Michael Nolan
On 1/8/13, Gavan Schneider wrote: > 2. SELECT ... WHERE > '2011-01-01'::TIMESTAMP <= col_of_type_timestamp > ANDcol_of_type_timestamp <= > '2011-12-31'::TIMESTAMP; This won't quite work, because '2011-12-31'::TIMESTAMP is the same as 2011-12-31 00:00:0

[GENERAL] PostgreSQL hackfest @ Developer Conference 2013, Brno, CZ

2013-01-09 Thread Honza Horak
Hi guys, let me announce PostgreSQL hackfest, which is held during Developer Conference 2013. Everyone from users, admins to hackers is welcome. Few words about Developer Conference: Developer Conference is an yearly conference for all Linux and JBoss Developers, Admins and Linux users organi

Re: [GENERAL] query by partial timestamp

2013-01-09 Thread Steve Crawford
On 01/08/2013 06:15 PM, Kirk Wythers wrote: On Jan 8, 2013, at 6:48 PM, Tom Lane > wrote: The OP didn't suggest how many years his data covers, but it's quite possible that pulling a full year's worth of data will read enough of the table that there's no point in wo

Re: [GENERAL] query by partial timestamp

2013-01-09 Thread Nathan Clayton
On Jan 8, 2013 6:15 PM, "Kirk Wythers" wrote: > > > On Jan 8, 2013, at 6:48 PM, Tom Lane wrote: > >> The OP didn't >> suggest how many years his data covers, but it's quite possible that >> pulling a full year's worth of data will read enough of the table that >> there's no point in worrying abou

Re: [GENERAL] Getting PLPython to work with PostgreSQL 9.2

2013-01-09 Thread Adrian Klaver
On 01/08/2013 10:38 AM, ledocf wrote: Hi, I have recently installed PostgreSQL 9.2 on my Windows 7 64bit computer. In addition I have installed Python 3.3. I am new to PostgreSQL, and wish to play with its support for Python. I tried to run the command: CREATE EXTENSION plpython3u Only to rec

Re: [GENERAL] [Solved] Corrupt indexes on slave when using pg_bulkload on master

2013-01-09 Thread James Cowell
Hi Tom,   I had replication enabled and it was working fine but I hadn't turned archive mode on yet (it was on the todo list but needed a log location).   I had WAL settings:   wal_level = hot_standby max_wal_senders = 5 wal_keep_segments = 32 wal_buffers = 32MB   And checkpoint settings:   checkp