[GENERAL] PL/PgSQL and pg_temp pseudo-schema

2015-02-20 Thread Vincenzo Romano
PL/PgSQL doesn't know the pg_temp meta schema in case you need to really work on that TEMP TABLE. At the moment I had to move those DDL/DML queries within a plain SQL function. Is this a feature or a bug? (Seriously, I mean! :-) TIA. -- Vincenzo Romano - NotOrAnd.IT Information Technologies --

Re: [GENERAL] PL/PgSQL and pg_temp pseudo-schema

2015-02-20 Thread Pavel Stehule
Hi It is little bit strange, it works for me postgres=# create temp table foo(a int); CREATE TABLE postgres=# do $$ begin insert into foo values(10); end $$; -- plpgsql DO postgres=# select * from foo; a 10 (1 row) Regards Pavel 2015-02-20 9:07 GMT+01:00 Vincenzo Romano

Re: [GENERAL] Cluster seems broken after pg_basebackup

2015-02-20 Thread Guillaume Drolet
2015-02-09 16:10 GMT-05:00 Jim Nasby jim.na...@bluetreble.com: On 2/9/15 11:51 AM, Guillaume Lelarge wrote: According to this page https://msdn.microsoft.com/en-ca/library/cc704588.aspx, exception 0xC005 means STATUS_ACCESS_VIOLATION - The instruction at 0x%08lx referenced memory at

Re: [GENERAL] Re: How to convert output deleted/inserted into in MySQL to Postgres

2015-02-20 Thread Adrian Klaver
On 02/20/2015 01:41 PM, Michael_LT wrote: hey, john, i did as you said like: update db.user set deleted= 1, updateterminal = UpdateTerminal, updateuser = UpdateUser, updatedate = UpdateDate returning

[GENERAL] How to convert output deleted/inserted into in MySQL to Postgres

2015-02-20 Thread Tong Michael
hey guys, I'm kinda new to Postgres and I'm learning it now. I have work to convert some stored procedures in MySQL to Postgres and I came across an issue here that I can't solve: update db.user set Deleted= 1 , UpdateTerminal = @UpdateTerminal ,

[GENERAL] Re: How to convert output deleted/inserted into in MySQL to Postgres

2015-02-20 Thread Michael_LT
hey, john, i did as you said like: update db.user set deleted= 1, updateterminal = UpdateTerminal, updateuser = UpdateUser, updatedate = UpdateDate returning credittypeid, creditid,

Re: [GENERAL] How to convert output deleted/inserted into in MySQL to Postgres

2015-02-20 Thread Thomas Kellerer
Tong Michael wrote on 20.02.2015 21:59: hey guys, I'm kinda new to Postgres and I'm learning it now. I have work to convert some stored procedures in MySQL to Postgres and I came across an issue here that I can't solve: update db.user set Deleted= 1 ,

Re: [GENERAL] How to convert output deleted/inserted into in MySQL to Postgres

2015-02-20 Thread John R Pierce
On 2/20/2015 12:59 PM, Tong Michael wrote: I think it tried to update a couple of columns in table user and insert values in other 3 columns into another table ReconDeleted at the same time. I have issues converting OUTPUT INTO and deleted items, with my limited knowledge about Postgres, I

Re: [GENERAL] Re: How to convert output deleted/inserted into in MySQL to Postgres

2015-02-20 Thread Paul Jungwirth
Hi Michael, hey, john, i did as you said like: update db.user set deleted= 1, updateterminal = UpdateTerminal, updateuser = UpdateUser, updatedate = UpdateDate returning credittypeid,

Re: [GENERAL] parallel dump fails to dump large tables

2015-02-20 Thread Shanker Singh
I tried turning off ssl renegotiation by setting ssl_renegotiation_limit = 0 in postgresql.conf but it had no effect. The parallel dump still fails on large tables consistently. Thanks Shanker -Original Message- From: Tom Lane [mailto:t...@sss.pgh.pa.us] Sent: Saturday, February 14,

Re: [GENERAL] Array string casts with SELECT but not SELECT DISTINCT

2015-02-20 Thread sridhar bamandlapally
ERROR: column my_array is of type character varying[] but expression is of type text please try this below, may be this should help CREATE CAST (text AS varchar) WITH INOUT AS IMPLICIT; just for info: actually this should be available in default On Fri, Feb 20, 2015 at 9:48 AM, Ken Tanzer

Re: [GENERAL] Array string casts with SELECT but not SELECT DISTINCT

2015-02-20 Thread Ken Tanzer
I'm not able to run this unless I'm the Postgres super user. But if I run it as such, it tells me that cast already exists anyway. CREATE CAST (text AS varchar) WITH INOUT AS IMPLICIT; ERROR: cast from type text to type character varying already exists Of course this will work fine: INSERT

Re: [GENERAL] Array string casts with SELECT but not SELECT DISTINCT

2015-02-20 Thread David G Johnston
On Fri, Feb 20, 2015 at 7:31 PM, sridhar bamandlapally [via PostgreSQL] ml-node+s1045698n5838807...@n5.nabble.com wrote: ERROR: column my_array is of type character varying[] but expression is of type text please try this below, may be this should help CREATE CAST (text AS varchar) WITH

[GENERAL] Oracle to PostgreSQL migration

2015-02-20 Thread sridhar bamandlapally
Hi With minimal application code changes we are able to migrate database from Oracle to PostgreSQL successfully (including performance issues) on production This we did on high read intensive database sized 900+GB Thanks to PostgreSQL Thanks Sridhar BN

Re: [GENERAL] stored procedure variable names

2015-02-20 Thread Igor Neyman
From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of inspector morse Sent: Thursday, February 19, 2015 7:58 PM To: pgsql-general@postgresql.org Subject: [GENERAL] stored procedure variable names In all other DBMS, the variable names have a

Re: [GENERAL] rollback in C functions

2015-02-20 Thread Juan Pablo L
Just an update, it was making a mistake, the execution of PQexecute, to execute the query, was wrapped in a function called PGresult *db_execute() that was returning the PGresult as NULL, i completely forgot this, inside that function the exception was being caught and discarded so by the time

Re: [GENERAL] PL/PgSQL and pg_temp pseudo-schema

2015-02-20 Thread Melvin Davidson
Take note. Temp tables are only visable, available to the sessions that created them. You cannot access them from a different session. Is that the problem you experience If not, please provide a specific example of what your problem is. On Fri, Feb 20, 2015 at 3:34 AM, Pavel Stehule

[GENERAL] how to convert output deleted/inserted into in My SQL to Postgres

2015-02-20 Thread Michael_LT
hey guys, I'm kinda new to Postgres and I'm learning it now. I have work to convert some stored procedures in MySQL to Postgres and I came across an issue here that I can't solve: update db.user set Deleted= 1 , UpdateTerminal = @UpdateTerminal ,