2017-11-19 18:57 GMT+01:00 Brahmam Eswar :
> Hi ,
>
> System is migrating from Oracle to Postgre SQL.
> Oracle is providing BULK COLLECT INTO function to collect the multiple
> records from table .
>
> Select COL1,COL2 ,COL3 BULK COLLECT INTO LINES from Distinct_Records.
>
> LINES IS TABLE OF TA
2017-11-16 21:16 GMT+01:00 Matt Zagrabelny :
> Thanks for the reply, Pavel!
>
> On Thu, Nov 16, 2017 at 1:01 AM, Pavel Stehule
> wrote:
>
>> Hi
>>
>> 2017-11-15 23:37 GMT+01:00 Matt Zagrabelny :
>>
>>> Greetings,
>>>
>>> Usin
Hi
2017-11-16 8:56 GMT+01:00 Nick Dro :
> I beleieve that every information system has the needs to send emails.
> Currently PostgreSQL doesn't have a function which gets TEXT and return
> true if it's valid email address (x...@yyy.com / .co.ZZ)
> Do you believe such function should exist in Post
Hi
2017-11-15 23:37 GMT+01:00 Matt Zagrabelny :
> Greetings,
>
> Using PG 10.1.
>
> In my .psqlrc I have:
>
> \x auto
> \pset linestyle 'unicode'
> \pset unicode_header_linestyle double
>
> and when the output is expanded, I do not see a double line for the first
> record, but I do for all subseq
.
>
> I still think that using server side variable is a much easier and
> intuitive way of doing this. All of the alternatives have major flaws.
>
> On 10/19/2017 8:40 AM, Pavel Stehule wrote:
>
> There was lot of discussion about server side variables
> https://w
Hi
2017-10-19 17:21 GMT+02:00 Igal @ Lucee.org :
> Hello,
>
> In other database servers, which I'm finally dropping in favor of
> Postgres, I can do the following (mind you that this is for illustration
> only, I do not actually write queries like that):
>
> DECLARE @query varchar(64) = 'red widg
2017-09-28 10:08 GMT+02:00 Denisa Cirstescu :
> Hi Tom,
>
>
>
> You said that trapping an *arbitrary* exception is a “fairly expensive
> mechanism”.
>
> What if the:
>
>
>
> begin
>
> ….
>
> exception when others
>
> then null;
>
> end;
>
>
>
> would be replaced with
>
>
>
> begin
>
>
2017-09-23 5:10 GMT+02:00 Paul A Jungwirth :
> On Fri, Sep 22, 2017 at 8:05 PM, Pavel Stehule
> wrote:
> > yes, it is 8 bytes on 64-bit.
>
> Thanks!
>
> > I don't think so it is good idea to write 64bit only extensions.
>
> I agree, but how ab
2017-09-23 4:52 GMT+02:00 Paul A Jungwirth :
> The docs say that a Datum can be 4 bytes or 8 depending on the machine:
>
> https://www.postgresql.org/docs/9.5/static/sql-createtype.html
>
> Is a Datum always 8 bytes for 64-bit architectures?
>
> And if so, can my C extension skip a loop like this
DECLARE
>>
>>
>> v_msg TEXT := '''SOMETHING IS WRONG''';
>>
>> v_sqlstate TEXT := '''E0001''';
>>
>> v1 TEXT ;
>>
>>
>> BEGIN
>>
>> v1 := v_msg || ' USING errcode = ' || v_sqlstate;
>>
>> RAISE NOTICE '%', v1;
>>
>> RAISE EXCEPTION '%', v1;
>>
>>
>> EXCEPTION
>>
>> WHEN SQLSTATE 'E0001' THE
2017-09-22 1:40 GMT+02:00 mike davis :
> I’m trying to get dynamic version of the RAISE command working so that I
> can use a table of custom application error messages and codes for use by
> all developed plpgsql functions. In this way the customer error codes and
> message are not hard coded int
2017-09-20 5:36 GMT+02:00 Igor Korot :
> Hi, ALL,
>
> draft=# SELECT 1 FROM abcattbl WHERE abt_tnam = 'leagues';
> ?column?
> --
> (0 rows)
>
>
> However running it thru the PQexecParam() I am getting "PGRES_TUPLES_OK"
> which means that the such record exist.
>
That means so this comman
2017-09-14 15:09 GMT+02:00 Pavel Stehule :
>
>
> 2017-09-14 14:59 GMT+02:00 Frank Millman :
>
>> Pavel Stehule wrote:
>>
>> 2017-09-14 10:14 GMT+02:00 Frank Millman :
>>
>>> Hi all
>>>
>>> This is a follow-up to a recent question I
2017-09-14 14:59 GMT+02:00 Frank Millman :
> Pavel Stehule wrote:
>
> 2017-09-14 10:14 GMT+02:00 Frank Millman :
>
>> Hi all
>>
>> This is a follow-up to a recent question I posted regarding a slow query.
>> I thought that the slowness was caused by the numbe
2017-09-14 10:14 GMT+02:00 Frank Millman :
> Hi all
>
> This is a follow-up to a recent question I posted regarding a slow query.
> I thought that the slowness was caused by the number of JOINs in the query,
> but with your assistance I have found the true reason. I said in the
> previous thread t
2017-09-12 14:01 GMT+02:00 Tom Lane :
> "Frank Millman" writes:
> > Pavel Stehule wrote:
> >> 2017-09-12 8:45 GMT+02:00 Frank Millman :
> >>> I am experimenting with optimising a SQL statement. One version uses
> 4 LEFT JOIN’s and a 5-way CASE
2017-09-12 12:39 GMT+02:00 Pavel Stehule :
>
>
> 2017-09-12 12:25 GMT+02:00 Frank Millman :
>
>> Pavel Stehule wrote:
>>
>> 2017-09-12 9:36 GMT+02:00 Frank Millman :
>>
>>> Pavel Stehule wrote:
>>> >
>>> > 2017-09-12
2017-09-12 12:25 GMT+02:00 Frank Millman :
> Pavel Stehule wrote:
>
> 2017-09-12 9:36 GMT+02:00 Frank Millman :
>
>> Pavel Stehule wrote:
>> >
>> > 2017-09-12 8:45 GMT+02:00 Frank Millman :
>>
>>> I am using 9.4.4 on Fedora 22.
>>>
2017-09-12 9:36 GMT+02:00 Frank Millman :
> Pavel Stehule wrote:
> >
> > 2017-09-12 8:45 GMT+02:00 Frank Millman :
>
>> I am using 9.4.4 on Fedora 22.
>>
>> I am experimenting with optimising a SQL statement. One version uses 4
>> LEFT JOIN’s and a 5-
hi
2017-09-12 8:45 GMT+02:00 Frank Millman :
> Hi all
>
> I am using 9.4.4 on Fedora 22.
>
> I am experimenting with optimising a SQL statement. One version uses 4
> LEFT JOIN’s and a 5-way CASE statement in the body. The second moves the
> filtering into the JOIN section, and I end up with 16 LE
2017-08-24 11:46 GMT+02:00 Vincenzo Romano :
> 2017-08-24 11:04 GMT+02:00 Pavel Stehule :
> >
> >
> > 2017-08-24 9:11 GMT+02:00 Vincenzo Romano :
> >>
> >> 2017-08-24 3:08 GMT+02:00 Tom Lane :
> >> > "David G. Johnston" writes:
&g
2017-08-24 9:11 GMT+02:00 Vincenzo Romano :
> 2017-08-24 3:08 GMT+02:00 Tom Lane :
> > "David G. Johnston" writes:
> >> I'm wondering if there is anything technical preventing someone from
> making:
> >
> >> DROP TEMP TABLE tablename;
> >
> > There is no great need for that because you can get th
Hi
2017-08-24 7:08 GMT+02:00 Kevin Golding :
> Hi all
> I'm currently migrating a legacy Informix 4gl application to run on
> PostgreSQL (v9.5.8)
>
> There are errors occurring because sometimes the application tries to
> insert/update values longer than the definition of the database column.
> T
Hi
you have to build tuple first. Later you can got a HeapTupleHeader
pl_toolbox has some functions for composite types
https://github.com/okbob/pltoolbox
Regards
Pavel Stehule
>
> Why do you want to convert this to HeapTupleHeader since this is *not* a
> tuple but a string value
2017-07-13 14:40 GMT+02:00 Simon Ruderich :
> Hello,
>
> I'm using the following minimal ~/.psqlrc:
>
> \pset expanded on
>
> Now when I select rows from a table which are too long to fit the
> screen then I get this output:
>
> simon=> table test;
> -[ RECORD 1 ]--
2017-07-06 2:10 GMT+02:00 Tim Uckun :
> I am curious about the stored proc languages inside of postgres. When I
> write a stored proc is it compiled to some internal representation or just
> interpreted? How does this work with other languages?
>
The PLpgSQL proc are saved in original form - you
2017-06-11 18:34 GMT+02:00 Steven Grimm :
> On Sun, Jun 11, 2017 at 8:21 AM, Tom Lane wrote:
>
>> Yeah, I've been watching this thread and trying to figure out how to
>> explain that part; I suspected a cause of this form but couldn't
>> make that theory match the 9-iterations observation. (I st
2017-06-02 11:15 GMT+02:00 PAWAN SHARMA :
>
> On Fri, Jun 2, 2017 at 2:13 PM, Pavel Stehule
> wrote:
>
>> Hi
>>
>> 2017-06-02 10:16 GMT+02:00 PAWAN SHARMA :
>>
>>> Hi All,
>>>
>>> I am migrating Oracle database into PostgreSQL us
Hi
2017-06-02 10:16 GMT+02:00 PAWAN SHARMA :
> Hi All,
>
> I am migrating Oracle database into PostgreSQL using Ora2PG tool.
>
> So, I am facing one issue with trigger after generating script output of
> Oracle database.
>
> *Oracle : *
>
> CREATE OR REPLACE TRIGGER UPDATE_JOB_HISTORY
> AFTER
2017-05-24 15:02 GMT+02:00 stevenchang1213 :
> hello,
> at most 40% total memory, official doc also says so.
> you can testify it using pg_prewarm and pgfincore .
>
There are strong dependency on use case. 40% total memory is related to low
memory servers .. 64GB max.
High SB requires tuning oth
2017-05-18 22:39 GMT+02:00 Rob Brucks :
> Thanks.
>
>
>
> I can code an exception block to handle the table problem, and probably
> one for the index collision too.
>
Creating partitions dynamically is pretty bad idea. You have to handle a
exceptions - it enforces implicit subtransaction (some sl
Hi
2017-05-17 18:03 GMT+02:00 Adrian Myers :
> Is there a way to speed up the actual line-by-line display of the psql
> console in version 8.4?
>
> Queries which perform in a few milliseconds through a driver (psycopg2 in
> this case) can take several seconds or minutes to complete in the console
;updated"
> that contain objected to be added and updated inside it. I think this kind
> of branching should be safe though?
>
> On Wed, Apr 26, 2017 at 12:41 PM, Pavel Stehule
> wrote:
>
>>
>>
>> 2017-04-26 6:21 GMT+02:00 Glen Huang :
>>
>>&g
Hi
2017-04-26 13:33 GMT+02:00 Andreas Kretschmer :
>
>
> Am 26.04.2017 um 13:24 schrieb VENKTESH GUTTEDAR:
>
>> Hello All,
>>
>> How do i check if any one element of one array exists in another
>> array.
>> Eg:
>> array1 = [1,2,3,4]
>> array2 = [1,4,5,7]
>> Now i expec
2017-04-26 6:21 GMT+02:00 Glen Huang :
> Hi all,
>
> I have a RESTful API server that sends and receives JSON strings. I'm
> wondering what might be the best way to leverage PostgreSQL's JSON
> capability.
>
> For sending JSON responses to clients. I believe the best way is to ask
> PostgreSQL to
2017-04-19 12:14 GMT+02:00 Karsten Hilbert :
> On Wed, Apr 19, 2017 at 12:00:04PM +0200, Pavel Stehule wrote:
>
> > > Hence I wonder whether an approach along these lines:
> > >
> > > select
> > > row_number()
Hi
2017-04-19 11:55 GMT+02:00 Karsten Hilbert :
> Hi all !
>
> Every so often, when working with functions, errors get
> reported with context information similar to this:
>
> Context: PL/pgSQL function "test_function" line 5 at SQL statement
>
> Often, the function source is kept under v
2017-04-05 10:33 GMT+02:00 Daniel Westermann <
daniel.westerm...@dbi-services.com>:
> 2017-04-05 10:13 GMT+02:00 Daniel Westermann services.com>:
>
>> 2017-04-05 9:28 GMT+02:00 Daniel Westermann > services.com>:
>>
>>> >>what is result of EXPLAIN statement for slow and fast cases?
>>> >>
>>> >>re
2017-04-05 10:13 GMT+02:00 Daniel Westermann <
daniel.westerm...@dbi-services.com>:
> 2017-04-05 9:28 GMT+02:00 Daniel Westermann services.com>:
>
>> >>what is result of EXPLAIN statement for slow and fast cases?
>> >>
>> >>regards
>> >>
>> >>Pavel
>>
>> For work_mem=32MB
>>
>> explain (analyze,v
2017-04-05 9:28 GMT+02:00 Daniel Westermann <
daniel.westerm...@dbi-services.com>:
> >>what is result of EXPLAIN statement for slow and fast cases?
> >>
> >>regards
> >>
> >>Pavel
>
> For work_mem=32MB
>
> explain (analyze,verbose,buffers) select count(user_id) from users where
> user_id not in (
2017-04-05 8:57 GMT+02:00 Daniel Westermann <
daniel.westerm...@dbi-services.com>:
> >> I have set work_mem to a very low value intentionally for demonstration
> >> purposes:
> >>
> >> postgres=# show work_mem;
> >> work_mem
> >> --
> >> 16MB
> >> (1 row)
> >>
> >> postgres=# show shared
Hi
2017-03-25 5:49 GMT+01:00 Yuri Budilov :
> Hello everyone
> Can these forums be moved to internet ?
>
It is on internet
> All these emails is so 1990s.
>
And it is working well - there is not spam and ballast
> So hard to follow, so hard to search for historical answers.
> We really need
2017-03-12 7:25 GMT+01:00 Pavel Stehule :
>
>
> 2017-03-12 7:14 GMT+01:00 vod vos :
>
>>
>> Hi everyone,
>>
>> How to define the exact limit length of numeric type? For example,
>>
>> CREATE TABLE test (id serial, goose numeric(4,1));
>>
>
2017-03-12 7:14 GMT+01:00 vod vos :
>
> Hi everyone,
>
> How to define the exact limit length of numeric type? For example,
>
> CREATE TABLE test (id serial, goose numeric(4,1));
>
> 300.2 and 30.2 can be inserted into COLUMN goose, but I want 30.2 or 3.2
> can not be inserted, how to do this?
>
Any documentation enhancing is good. If you have a idea, please, send a
text.
Regards
Pavel
>
>
> On Tue, Feb 21, 2017 at 12:35 PM Pavel Stehule
> wrote:
>
>> Hi
>>
>> 2017-02-21 15:19 GMT+01:00 Caleb Cushing :
>>
>> recently while exploring
Hi
2017-03-02 7:01 GMT+01:00 priyanka raghav :
> Hi,
>
> I am trying to load a csv file of approx 500mb to remote postgres
> database. Earlier when the app server and db server were co-located,
> COPY command was working fine but ever since the db server is moved to
> a different box, the command
Hi
2017-02-22 6:00 GMT+01:00 Torsten Förtsch :
> Hi,
>
> I have a psql script relying on variables passed in on the command line
> with -v.
>
> Is there any way to assign a default value in case the -v option is
> forgotten?
>
> Here is an example with pgtap:
>
> select diag('should be printed on
Hi
2017-02-21 15:19 GMT+01:00 Caleb Cushing :
> recently while exploring this problem http://stackoverflow.com/q/
> 40945277/206466. I decided to go with the docker container approach of a
> shell script.
>
> I realized that postgres' variables aren't quoted either, which results
> in me quoting
2017-02-16 5:38 GMT+01:00 Teddy Schmitz :
> As a quick follow up I just did an explain on the query,
>
>
> Aggregate (cost=258007258.87..258007258.88 rows=1 width=8)
> -> Nested Loop (cost=0.00..184292254.83 rows=14743000807 width=16)
> -> Seq Scan on t1 (cost=0.00..3796.41 rows=263141 width=
2017-02-14 18:47 GMT+01:00 Mimiko :
> On 14.02.2017 17:30, Adrian Klaver wrote:
>
>> Is there a way to change postgres behavior to name database folders by
>>> the database name? And table files in them by table's name? And not
>>> using OIDs.
>>>
>>
>> No.
>>
>> Is there a particular problem you
Hi
2017-02-13 18:40 GMT+01:00 David Hinkle :
> I'm having trouble with purges related to a large table. The delete
> query consumes ram until postgres crashes due to OOM. I have a very
> large table called log_raw. There are half a dozen related tables,
> such as 'urls' and 'titles'. log_r
2017-02-11 19:51 GMT+01:00 Alexander Farber :
> At the same time this advice from
> http://stackoverflow.com/questions/42179012/how-to-
> shuffle-array-in-postgresql-9-6-and-also-lower-versions
> works, don't know why though:
>
> words=> select array_agg(u order by random())
> words-> from unnest(
Hi
2017-02-11 17:37 GMT+01:00 Alexander Farber :
> Good evening,
>
> after switching to 9.6.2 from 9.5.3 the following custom function has
> stopped working:
>
> CREATE OR REPLACE FUNCTION words_shuffle(in_array varchar[])
> RETURNS varchar[] AS
> $func$
> SELECT array_agg(letters
2017-02-03 17:17 GMT+01:00 Pavel Stehule :
> Hi
>
> 2017-02-03 16:14 GMT+01:00 PAWAN SHARMA :
>
>> Hi All,
>>
>> Is this possible to create trigger in postgres to check the password
>> strength( like char should be min 8 character) while to creating user o
Hi
2017-02-03 16:14 GMT+01:00 PAWAN SHARMA :
> Hi All,
>
> Is this possible to create trigger in postgres to check the password
> strength( like char should be min 8 character) while to creating user or
> role with password.
>
> If it possible can you please share the script with me..
>
yes, i
2017-01-17 19:23 GMT+01:00 Rich Shepard :
> Running -9.6.1. I have a database created and owned by me, but cannot
> copy
> a table to my home directory. Postgres tells me it cannot write to that
> directory. The only way to copy tables to files is by doing so as the
> superuser (postgres).
>
>
Hi
2017-01-15 10:58 GMT+01:00 Nicolas Paris :
> Hello,
>
> In postgresl order of columns does have an non negligeable impact on table
> size[1].
> Table are in many cases dynamic, and new fields can appear in the database
> life.
> I suspect re-ordering columns based on types would be an automati
Hi
2017-01-14 17:29 GMT+01:00 ProPAAS DBA :
> Is it possible to execute a raise notice without the "Notice" keyword
> being part of the output, or is there another construct that allows writing
> to output as simple informational text (without any sort of NOTICE,
> WARNING, etc being part of the
*
>
> *$$ language sql;*
>
You cannot do it in plain text language.
The identifier of column or table have not be a variable ever.
You can use dynamic SQL in PLpgSQL - where SQL command is created in
run-time and there you can do what you want.
Use plpgsql and EXECUTE statement
https://www.postgresql.org/docs/current/static/plpgsql-statements.html#PLPGSQL-STATEMENTS-EXECUTING-DYN
Regards
Pavel Stehule
Hi
2017-01-12 10:06 GMT+01:00 Karsten Hilbert :
> On Wed, Jan 11, 2017 at 05:54:11PM -0700, David G. Johnston wrote:
>
> > I don't see where "call a setup function immediately after connecting"
>
> Sounds like a "login trigger", more generally an ON CONNECT
> event trigger, which we don't have at
2017-01-05 13:44 GMT+01:00 vod vos :
> I finally figured it out as follows:
>
> 1. modified the corresponding data type of the columns to the csv file
>
> 2. if null values existed, defined the data type to varchar. The null
> values cause problem too.
>
int, float, double can be null too - null
>
>
>> >
>> > This is irrelevant of amount of data restored, i am seeing the same
>> behavior with just schema restore, as well as with schema+data restores.
>> >
>> > If anyone is interested i may upload the schema data + my benchmarking
>> script with collected whisper data from my test run (i've
2017-01-04 20:22 GMT+01:00 Jerry Sievers :
> marcin kowalski writes:
>
> > I am experiencing an odd issue, i've noticed it on 9.3 , but i can
> reproduce it on 9.6.
> >
> > Basically, i have a database with a lot of schemas, but not that much
> data. Each schema is maybe 2-4 GB in size, and often
2017-01-04 16:11 GMT+01:00 Adrian Klaver :
> On 01/04/2017 06:54 AM, Pavel Stehule wrote:
>
>> Hi
>>
>> 2017-01-04 14:00 GMT+01:00 vod vos > <mailto:vod...@zoho.com>>:
>>
>> __
>> Now I am confused about I can create 1100 columns
Hi
2017-01-04 14:00 GMT+01:00 vod vos :
> Now I am confused about I can create 1100 columns in a table in
> postgresql, but I can't copy 1100 values into the table. And I really dont
> want to split the csv file to pieces to avoid mistakes after this action.
>
The PostgreSQL limit is "Maximum Co
2016-12-30 8:04 GMT+01:00 Guyren Howe :
>
> > On Dec 29, 2016, at 23:01 , Regina Obe wrote:
> >
> >
> >> As an aside from my last question about my LYDB effort:
> >
> >> https://medium.com/@gisborne/love-your-database-lydb-
> 23c69f480a1d#.4jngp2rcb
> >
> >> I would like to find a book or other r
2016-12-29 10:03 GMT+01:00 Tim Uckun :
> I think it's awesome that postgres allows you to code in different
> languages like this. It really is a unique development environment and one
> that is overlooked as a development platform. It would be nice if more
> languages were delivered in the defau
be good.
More you can use a "format" function - implemented in C.
Regards
Pavel
>
> On Thu, Dec 29, 2016 at 10:00 PM, Pavel Stehule
> wrote:
>
>>
>>
>> 2016-12-29 9:23 GMT+01:00 Tim Uckun :
>>
>>> I am not doubting the efficacy of stored
2016-12-29 9:23 GMT+01:00 Tim Uckun :
> I am not doubting the efficacy of stored procs, just wondering which
> language is better. From the sound of it string manupilation is slow in
> PL-PGSQL but looking at my procs there does seem to be a lot of string
> manipulation going on so maybe I better
Hi
2016-12-27 19:05 GMT+01:00 Арсен Арутюнян :
> Hello.
>
> I have a few questions:
>
> 1) JobStatusTest1 function has only one request and JobStatusTest2
> function has as many as six requests.
>
> Why function JobStatusTest2 is faster?
>
>
> JobStatusTest1 : 981.596 ms
>
> JobStatusTest2 : 849
2016-12-28 16:12 GMT+01:00 Christoph Moench-Tegeder :
> ## Guyren Howe (guy...@gmail.com):
>
> > I am inclined to advise folks to use PL/V8 on Postgres, because it is
> > a reasonable language, everyone knows it, it has good string functions,
> > decent performance and it tends to be installed eve
2016-12-28 10:46 GMT+01:00 Pavel Stehule :
> Hi
>
> 2016-12-28 10:15 GMT+01:00 Tim Uckun :
>
>> I have seen various links on the internet which indicate that PLV8 is
>> significantly faster than PL-PGSQL sometimes an order of magnitude faster.
>>
>> Is this uni
Hi
2016-12-28 10:15 GMT+01:00 Tim Uckun :
> I have seen various links on the internet which indicate that PLV8 is
> significantly faster than PL-PGSQL sometimes an order of magnitude faster.
>
> Is this uniformly true or is it just in certain circumstances?
>
It depends on usage
>
> Is there a
Hi
2016-12-16 7:07 GMT+01:00 nidhi raina :
> Dear Sir/Mam,
>
> I am also trying to send emails with attachments.please help me out with
> this.
>
You can use a untrusted Perl or Python functions
http://www.perlmonks.org/?node_id=603769
here is one example
http://postgres.cz/wiki/PL/Perlu_-_Untr
2016-12-13 17:38 GMT+01:00 Thomas Kellerer :
> Inspired by this question:
>
>http://dba.stackexchange.com/q/158044/1822
>
> I tried that for myself, and it seems that pg_dump indeed can not parse
> quoted identifiers:
>
> psql (9.6.1)
> Type "help" for help.
>
> postgres=# create t
2016-12-10 20:43 GMT+01:00 Pavel Stehule :
>
>
> 2016-12-10 20:32 GMT+01:00 Igor Korot :
>
>> Hi, guys,
>> I'm working thru my script and I hit a following issue:
>>
>> In the script I have a following command:
>>
>> CREATE TABLE playersinleagu
2016-12-10 20:32 GMT+01:00 Igor Korot :
> Hi, guys,
> I'm working thru my script and I hit a following issue:
>
> In the script I have a following command:
>
> CREATE TABLE playersinleague(id integer, playerid integer, ishitter
> char, age integer, value decimal, currvalue decimal, draft boolean,
Hi
2016-12-09 16:05 GMT+01:00 VENKTESH GUTTEDAR :
> Hello,
>
> I want to get the inner array in a multi dimentional array in a
> pl/pgsql procedure.
>
> Eg : {{1,2,3,4,5,6,7},{11,22,33,44,55,66,77}}
>
> for i in array_lower(Eg, 1) .. array_upper(Eg, 1)
> LOOP
> array_value
2016-12-07 16:57 GMT+01:00 Rich Shepard :
> I have used '-- ' to enter comments about tables or columns and am
> curious
> about the value of storing comments in tables using the COMMENT key word.
> When is the latter more appropriate than the former?
>
Description entered with COMMENT statemen
2016-12-04 23:12 GMT+01:00 Peter Geoghegan :
> On Sat, Dec 3, 2016 at 5:20 PM, Tomas Vondra
> wrote:
> > So the sort is probably slow because of CPU, as it compares strings. In
> > some locales that may be very expensive - not sure which locale is used
> > in this case, as it was not mentioned.
>
2016-11-20 20:18 GMT+01:00 Jeff Janes :
> On Sun, Nov 20, 2016 at 2:45 AM, Pavel Stehule
> wrote:
>
>>
>>
>> 2016-11-19 22:12 GMT+01:00 Jeff Janes :
>>
>>> I need "strict" MIN and MAX aggregate functions, meaning they return
>>> NULL
2016-11-19 22:12 GMT+01:00 Jeff Janes :
> I need "strict" MIN and MAX aggregate functions, meaning they return NULL
> upon any NULL input, and behave like the built-in aggregates if none of the
> input values are NULL.
>
> This doesn't seem like an outlandish thing to want, and I'm surprised I
> c
2016-11-09 11:19 GMT+01:00 Pierre Ducroquet :
> On Wednesday, November 9, 2016 10:40:10 AM CET Francisco Olarte wrote:
> > Pierre:
> >
> > On Wed, Nov 9, 2016 at 10:22 AM, Pierre Ducroquet
> >
> > wrote:
> > > The query does a few joins «after» running a FTS query on a main table.
> > > The FTS q
2016-11-09 10:40 GMT+01:00 Francisco Olarte :
> Pierre:
>
> On Wed, Nov 9, 2016 at 10:22 AM, Pierre Ducroquet
> wrote:
> > The query does a few joins «after» running a FTS query on a main table.
> > The FTS query returns a few thousand rows, but the estimations are wrong,
> > leading the optimize
2016-10-26 15:06 GMT+02:00 jaroet :
> Internally we upgraded from 9.2 to 9.5 en we had defined an median
> function.
> This became about 7 to 8 times slower using the same functions.
>
> They are defined like this:
>
>
> CREATE OR REPLACE FUNCTION public._final_median(anyarray)
> RETURNS double
2016-10-18 16:42 GMT+02:00 Saïd Assemlal :
> I am writing database functions with plpgsql. (I am using Postgresql 9.4
> with centos 6)
>
> Here an example on what I would like to improve:
>
> CREATE OR REPLACE FUNCTION usp_locking_trial(p_trial_code VARCHAR(50),
> p_trial_key VARCHAR(500))
> RETUR
Hi
2016-10-17 21:09 GMT+02:00 Raymond O'Donnell :
> On 17/10/16 16:40, said assemlal wrote:
>
>> Hello,
>>
>> I am looking for a way to test generically input arguments to raise an
>> exception if one is either null or empty.
>>
>> I was thinking to create a function who takes an array to check t
s://www.odoo.com/forum/help-1/question/reduce-memory-usage-54636
http://www.vionblog.com/openerp-server-conf-for-openerp-7-explained/
Regards
Pavel
> Thanks.
>
> On Mon, Oct 10, 2016 at 12:25 PM, Pavel Stehule
> wrote:
>
>>
>>
>> 2016-10-10 21:12 GMT+02:00 Periko Su
2016-10-10 21:12 GMT+02:00 Periko Support :
> Andreo u got a good observation here.
>
> I got a script that run every hour why?
>
> Odoo got some issues with IDLE connections, if we don't check our current
> psql connections after a while the system eat all connections and a lot of
> them are IDLE
hard to say if cluster helps - depends on data size - but odoo
produces really strange queries - I am little bit sceptic. But I am sure,
so cluster increase significantly maintenance costs.
Regards
Pavel
>
> On Sun, Oct 9, 2016 at 9:29 PM, Pavel Stehule
> wrote:
> > Hi
> >
Hi
2016-10-10 6:22 GMT+02:00 Periko Support :
> Hi.
>
> We are searching for a cluster solutions for postgresql, we need to
> increase our current psql server performance running under ubuntu 14
> v9.3.
>
>The db is for odoo 7.x
>
I have some experience with odoo 7.x - there are lot of p
2016-09-28 14:34 GMT+02:00 Mike Sofen :
> *From:* Pavel Stehule*Sent:* Tuesday, September 27, 2016 9:18 PM
> 2016-09-28 6:13 GMT+02:00 Pavel Stehule :
>
> Hi
>
> 2016-09-27 23:03 GMT+02:00 Mike Sofen :
>
> Hi gang,
>
> how to view the state of a transaction i
2016-09-28 6:13 GMT+02:00 Pavel Stehule :
> Hi
>
> 2016-09-27 23:03 GMT+02:00 Mike Sofen :
>
>> Hi gang,
>>
>>
>>
>> On PG 9.5.1, linux, I’m running some large ETL operations, migrate data
>> from a legacy mysql system into PG, upwards of 250m row
Hi
2016-09-27 23:03 GMT+02:00 Mike Sofen :
> Hi gang,
>
>
>
> On PG 9.5.1, linux, I’m running some large ETL operations, migrate data
> from a legacy mysql system into PG, upwards of 250m rows in a transaction
> (it’s on a big box). It’s always a 2 step operation – extract raw mysql
> data and p
Hi
2016-09-26 20:22 GMT+02:00 Alexander Farber :
> Good evening!
>
> For a 2-player game I am trying to create a custom SQL function, which
> stores a new message (if not empty) into words_chat table and then return
> all messages from that table for a given game:
>
> CREATE OR REPLACE FUNCTION
2016-09-26 17:39 GMT+02:00 dby...@163.com :
> test:
> create type h3 as (id int,name char(10));
>
> CREATE or replace FUNCTION proc17()
> RETURNS SETOF h3 AS $$
> DECLARE
> v_rec h3;
> BEGIN
> create temp table abc(id int,name varchar) on commit drop;
> insert into abc select 1,'lw';
> inser
2016-09-18 19:15 GMT+02:00 Pavel Stehule :
>
>
> 2016-09-18 19:12 GMT+02:00 Pavel Stehule :
>
>> Hi
>>
>>
>> 2016-09-18 18:46 GMT+02:00 Tjibbe :
>>
>>> '{{4,5},{8,3}}' + '{3,6}'
>>
>>
>> postgres=# se
2016-09-18 19:12 GMT+02:00 Pavel Stehule :
> Hi
>
>
> 2016-09-18 18:46 GMT+02:00 Tjibbe :
>
>> '{{4,5},{8,3}}' + '{3,6}'
>
>
> postgres=# select '{{4,5},{8,3}}'::int[] || ARRAY[[3,6]];
> +-+
> |
Hi
2016-09-18 18:46 GMT+02:00 Tjibbe :
> '{{4,5},{8,3}}' + '{3,6}'
postgres=# select '{{4,5},{8,3}}'::int[] || ARRAY[[3,6]];
+-+
| ?column? |
+-+
| {{4,5},{8,3},{3,6}} |
+-+
(1 row)
regards
Pavel
2016-09-11 9:23 GMT+02:00 dandl :
> *From:* pgsql-general-ow...@postgresql.org [mailto:pgsql-general-owner@
> postgresql.org] *On Behalf Of *Pavel Stehule
>
> I guess my question then is: how much do you pay for that durability? If
> you benchmark Postgres configured for pure in-me
1 - 100 of 1346 matches
Mail list logo