Re: How to find the hits on the databases and tables in Postgres

2018-05-04 Thread Adrian Klaver
On 05/04/2018 09:45 AM, nikhil raj wrote: Hi Adrian Klaver, Thanks for the fast response . But here is the issue is here we have 200+ databases and 5 servers so cannot manually runs this command all ways is there any 3rd party tool for that which would give me the hits on DB and tables

Re: statement_timeout issue

2018-05-04 Thread Adrian Klaver
ut 2018-05-04 04:05:20 PDT [62028]: [83-1] CONTEXT:  SQL statement "SELECT 1 FROM ONLY "public"."clients" x WHERE "c_id" OPERATOR(pg_catalog.=) $1 FOR KEY SHARE OF x" 2018-05-04 04:05:20 PDT [62028]: [84-1] STATEMENT:  INSERT /* Is there anything I'm no

Re: psycopg2.DataError: invalid input syntax for integer: ""

2018-05-07 Thread Adrian Klaver
May I also ask if there's a limitation for the number of timestamp with timezone fields in a table? Not one that is likely to matter in practice.  There's a page discussing limitations on the website/docs somewhere if you wish to find out more. David J. -- Adrian Klaver adrian.kla...@aklaver.com

Re: Is it possible to get username information while writingtrigger?

2018-05-07 Thread Adrian Klaver
s to check which column values are different in OLD and NEW. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com -- Adrian Klaver adrian.kla...@aklaver.com

Re: psycopg2.DataError: invalid input syntax for integer: ""

2018-05-07 Thread Adrian Klaver
ey do not need to be quoted: http://initd.org/psycopg/docs/usage.html#passing-parameters-to-sql-queries David J. -- Adrian Klaver adrian.kla...@aklaver.com

Re: Error creating plpython3u extension

2018-05-08 Thread Adrian Klaver
nks Bruce -- Adrian Klaver adrian.kla...@aklaver.com

Re: 10.4 upgrade, function markings, and template0

2018-05-14 Thread Adrian Klaver
s nice about the news release is you can cut and past the entire list of commands and do the updates en masse. regards, tom lane -- Adrian Klaver adrian.kla...@aklaver.com

Re: 10.4 upgrade, function markings, and template0

2018-05-14 Thread Adrian Klaver
On 05/14/2018 02:22 PM, Tom Lane wrote: Adrian Klaver <adrian.kla...@aklaver.com> writes: On 05/14/2018 02:02 PM, Tom Lane wrote: I didn't bother with spelling it all out in full detail this time, which maybe was a mistake, but I felt that probably most users wouldn't need to

Re: Run external command as part of an sql statement ?

2018-05-07 Thread Adrian Klaver
r. Thanks -- Adrian Klaver adrian.kla...@aklaver.com

Re: KeyError: self._index[x]

2018-05-07 Thread Adrian Klaver
''); translate --- test # This works fine for row in cur_t: print row[0] Above you are using as a sequence, so the indexing works. Sorry again. I would really appreciate any suggestions. Thanks, J -- Adrian Klaver adrian.kla...@aklaver.com

Re: KeyError: self._index[x]

2018-05-07 Thread Adrian Klaver
single function call should be the name of the function.  So "translate", not "snumber" - the latter being consumed by the function. You can as use "as " to give it a different fixed name and refer to that. David J. -- Adrian Klaver adrian.kla...@aklaver.com

Re: Concatenate 2 Column Values For One Column

2018-05-08 Thread Adrian Klaver
stname']) is making a Python tuple for entry into the last %s. Not tested but try: (row['firstname'] + ', ' + row['lastname']) How can I remove the ( ) in the DB? I can't call the row['firstname'] and row['lastname'] as values without using ( ). Any suggestion is highly appreciated. Thanks, J -- Adrian Klaver adrian.kla...@aklaver.com

Re: New install of 9.5.12 missing default PostgreSQL DB

2018-05-09 Thread Adrian Klaver
to make sure that the PostgreSQL service (PostgreSQL 9.5 Server) was running. I restarted the service too. What an I missing?  Appreciate any help on this. Thanks, Chandru -- Adrian Klaver adrian.kla...@aklaver.com

Re: issues when installing postgres

2018-05-09 Thread Adrian Klaver
appreciate any help. Thanks in advance. All the best -- Antônio Olinto Ávila da Silva -- Adrian Klaver adrian.kla...@aklaver.com

Re: Parameter passing in trigger function write in C

2018-04-27 Thread Adrian Klaver
_user nameuser name of current execution context" Password?: https://www.postgresql.org/docs/10/static/view-pg-shadow.html Though if you are using password encryption it will be encrypted. -- Original ------ *From:* "Adrian Klaver"; *Date:*

Re: Parameter passing in trigger function write in C

2018-04-27 Thread Adrian Klaver
about what parameters you are looking to pass in? -- Original -- *From:* "Adrian Klaver"; *Date:* Friday, Apr 27, 2018 9:36 AM *To:* "a"<372660...@qq.com>; "pgsql-general"; *Subject:* Re: Parameter passing in trigger functio

Re: Error creating plpython3u extension

2018-05-09 Thread Adrian Klaver
. Not sure how to solve this. I don't run Windows enough anymore to offer any suggestions. Maybe someone from EDB will chime in. -Original Message- From: Bruce Harold Sent: Wednesday, May 9, 2018 9:46 AM To: 'Adrian Klaver' <adrian.kla...@aklaver.com>; pgsql-g

Re: Why is my Postgre server went in recovery mode all in sudden

2018-05-09 Thread Adrian Klaver
 Current Config max_connections = 5000|| shared_buffers = 7680MB effective_cache_size = 23040MB ||| |maintenance_work_mem = 1920MB min_wal_size = 1GB max_wal_size = 2GB checkpoint_completion_target = 0.7 wal_buffers = 16MB default_statistics_target = 100 random_page_cost = 1.1 effective_io_concurrency = 200 max_worker_processes = 16 max_parallel_workers_per_gather = 8 max_parallel_workers = 16 work_mem = 196kB| Thanks -- Adrian Klaver adrian.kla...@aklaver.com

Re: New install of 9.5.12 missing default PostgreSQL DB

2018-05-09 Thread Adrian Klaver
/pgadmin4/3.x/connecting.html Contents: The Server Dialog Inline image On Wednesday, May 9, 2018, 8:28:44 AM CDT, Adrian Klaver <adrian.kla...@aklaver.com> wrote: On 05/08/2018 06:12 PM, chandru.ar...@yahoo.com <mailto:chandru.ar...@yahoo.com> wrote: > I installed P

Re: issues when installing postgres

2018-05-09 Thread Adrian Klaver
Thanks Antonio 2018-05-09 10:36 GMT-03:00 Adrian Klaver <adrian.kla...@aklaver.com <mailto:adrian.kla...@aklaver.com>>: On 05/08/2018 05:54 PM, Antonio Silva wrote: Hello! Comments inline. I bought a new computer and I installed Ubuntu 18.04 and after

Re: ON CONFLICT DO UPDATE

2018-05-10 Thread Adrian Klaver
. These are the duplicate fields. -- Adrian Klaver adrian.kla...@aklaver.com

Re: Why is my Postgre server went in recovery mode all in sudden

2018-05-10 Thread Adrian Klaver
, what is it doing? ans : query running from an agent if any processing is going on the front end some of the query will run So there is process that opens a connection, leaves it open and then periodically runs queries? Has the database shutdown happened again? -- Adrian Klaver adrian.kla

Re: Domain based on TIMEZONE WITH TIME ZONE

2018-05-10 Thread Adrian Klaver
is purpose? …..maybe I’ve just got a subjective prejudice for using domains to refine and tighten built in data types…. -- Adrian Klaver adrian.kla...@aklaver.com

Re: ON CONFLICT DO UPDATE

2018-05-09 Thread Adrian Klaver
2) The ON CONFLICT DO UPDATE clause you created on the table. Thanks, J -- Adrian Klaver adrian.kla...@aklaver.com

Re: Domain based on TIMEZONE WITH TIME ZONE

2018-05-10 Thread Adrian Klaver
On 05/10/2018 09:09 AM, Ben Hood wrote: On 10 May 2018, at 14:41, Adrian Klaver <adrian.kla...@aklaver.com> wrote: OK, so by using TIMESTAMP WITH TIME ZONE, you force all apps to submit timezone qualified timestamps in what language they are written in. Not really:

Re: Domain based on TIMEZONE WITH TIME ZONE

2018-05-10 Thread Adrian Klaver
ambiguity into the app. Namely just from looking at the database values you still do not know what the original timezone the app lives in is. -- Adrian Klaver adrian.kla...@aklaver.com

Re: Domain based on TIMEZONE WITH TIME ZONE

2018-05-10 Thread Adrian Klaver
does is to enforce that the client's time zone is set to UTC. hp -- Adrian Klaver adrian.kla...@aklaver.com

Re: Domain based on TIMEZONE WITH TIME ZONE

2018-05-10 Thread Adrian Klaver
+00'); ERROR: value for domain utc_timestamp violates check constraint "utc_timestamp_check" -- Adrian Klaver adrian.kla...@aklaver.com

Re: Domain based on TIMEZONE WITH TIME ZONE

2018-05-12 Thread Adrian Klaver
0:20:30'); INSERT 0 1 cdrs=# insert into t values (current_timestamp); INSERT 0 1 cdrs=# select * from t; ts --- 2015-05-11 10:20:30+00 2015-05-11 08:20:30+00 2015-05-11 10:20:30+00 2018-05-12 10:59:54.289827+00 (4 rows) cdrs=# rollback; ROLLBACK

Re: Best conception of a table

2018-05-12 Thread Adrian Klaver
d. I want to know if it's a good practice to use temporary tables (when should temporary tables will be used) or I use CTE and keep the first solution (despite the long query that I should to write in order to select the data)? Every solution, tip or advice will be welcome. Thanks. ** -- Adri

Re: Domain based on TIMEZONE WITH TIME ZONE

2018-05-12 Thread Adrian Klaver
On 05/12/2018 10:22 AM, Francisco Olarte wrote: Adrian: On Sat, May 12, 2018 at 6:42 PM, Adrian Klaver <adrian.kla...@aklaver.com> wrote: On 05/12/2018 04:04 AM, Francisco Olarte wrote: ... Can you post an example ( correct, error inputs, preferrably done with psql ) ? At this poin

Re: Domain based on TIMEZONE WITH TIME ZONE

2018-05-13 Thread Adrian Klaver
On 05/13/2018 01:55 AM, Francisco Olarte wrote: On Sat, May 12, 2018 at 8:19 PM, Adrian Klaver <adrian.kla...@aklaver.com> wrote: I would agree that timestamp and timestamptz are both stored as numbers. Well, after reading source that is a fact. I was trying to say they are like real n

Re: Domain based on TIMEZONE WITH TIME ZONE

2018-05-13 Thread Adrian Klaver
On 05/13/2018 03:45 PM, Peter J. Holzer wrote: On 2018-05-13 12:46:42 -0700, Adrian Klaver wrote: Not trying to trick anyone and no magic. The difference in the represented values between ts_tz and ts_naive is the heart of my argument. Timestamptz values are stored in manner that allows you

Re: Why is my Postgre server went in recovery mode all in sudden

2018-05-11 Thread Adrian Klaver
On 05/11/2018 03:30 AM, nikhil raj wrote: Hi Adrian Klaver, No its like it opens  connection and once the query gets execute it goes to idle connection and again idle connection time out i kept it for 2 mins . It never happen again. need few answers why will share buffer crashes ? From

Re: cursor empty

2018-05-08 Thread Adrian Klaver
esult. ..." ^^^ Thanks Phil -- Adrian Klaver adrian.kla...@aklaver.com

Re: comparison between 2 execution plans

2018-05-05 Thread Adrian Klaver
nd l_orderkey = o_orderkey     and o_orderdate < date '1995-03-21'     and l_shipdate > date '1995-03-21' group by     l_orderkey,     o_orderdate,     o_shippriority order by     revenue desc,     o_orderdate -- best regards Neto -- Adrian Klaver adrian.kla...@aklaver.com

Re: comparison between 2 execution plans

2018-05-05 Thread Adrian Klaver
On 05/05/2018 10:51 AM, Neto pr wrote: Dear, 2018-05-05 9:57 GMT-07:00 Adrian Klaver <adrian.kla...@aklaver.com <mailto:adrian.kla...@aklaver.com>>: On 05/05/2018 06:26 AM, Neto pr wrote: It might help if you explained what 'version with source code changed

Re: pg_dump with compressible and non-compressible tables

2018-05-05 Thread Adrian Klaver
On 05/05/2018 12:41 PM, Ron wrote: On 05/05/2018 12:13 PM, Adrian Klaver wrote: On 05/05/2018 07:14 AM, Ron wrote: Hi, v9.6 We've got big databases where some of the tables are highly compressible, but some have many bytea fields containing PDF files. Can you see a demonstrable difference

Re: Known Bugs on Postgres 9.5

2018-05-05 Thread Adrian Klaver
://www.postgresql.org/message-id/20180429222104.GA25267%40fetter.org Scroll down to the the Applied Patches and/or Pending Patches section(s). Thank you, Anudeep -- Adrian Klaver adrian.kla...@aklaver.com

Re: Known Bugs on Postgres 9.5

2018-05-05 Thread Adrian Klaver
uled dates . Thank you, Anudeep -- Adrian Klaver adrian.kla...@aklaver.com

Re: ERROR: there is no unique or exclusion constraint matching the ON CONFLICT specification

2018-05-05 Thread Adrian Klaver
r is stored in the player1 column. How to add "the second half", when the player had a single Q left, while she was player2? Should I use SELECT UNION or maybe CASE WHEN ... END? Thank you Alex -- Adrian Klaver adrian.kla...@aklaver.com

Re: pg_dump with compressible and non-compressible tables

2018-05-05 Thread Adrian Klaver
a and therefore will be included when --data-only is used, but not when --schema-only is. " These are different critters then bytea. Thanks -- Adrian Klaver adrian.kla...@aklaver.com

Re: ERROR: there is no unique or exclusion constraint matching the ON CONFLICT specification

2018-05-05 Thread Adrian Klaver
T work you need to trip the following: https://www.postgresql.org/docs/10/static/sql-insert.html#SQL-ON-CONFLICT "The optional ON CONFLICT clause specifies an alternative action to raising a unique violation or exclusion constraint violation error." Regards Alex -- Adri

Re: How to find the hits on the databases and tables in Postgres

2018-05-04 Thread Adrian Klaver
, -- Adrian Klaver adrian.kla...@aklaver.com

Re: initdb failing (10.4 centos7)

2018-05-19 Thread Adrian Klaver
l (as root). Then setting up the $DATADIR is on you: https://www.postgresql.org/docs/10/static/install-short.html -- Mike Nolan -- Adrian Klaver adrian.kla...@aklaver.com

Re: Fwd: postgresql is down in whm status page

2018-05-20 Thread Adrian Klaver
WHM and do they show anything relevant to this problem? Thank you -- Adrian Klaver adrian.kla...@aklaver.com

Re: postgresql is down in whm status page

2018-05-20 Thread Adrian Klaver
Install+or+Update+PostgreSQL+on+Your+cPanel+Server *Yes, I used this doc.* Thank you 5) Are there logs for WHM and do they show anything relevant to this problem? On May 20, 2018, at 5:19 PM, Adrian Klaver <adrian.kla...@aklaver.com <mailto:adrian.kla...@aklaver.com>> wrote: On 05/1

Re: initdb failing (10.4 centos7)

2018-05-19 Thread Adrian Klaver
On 05/19/2018 03:44 PM, Michael Nolan wrote: On Sat, May 19, 2018 at 5:23 PM, Adrian Klaver <adrian.kla...@aklaver.com <mailto:adrian.kla...@aklaver.com>> wrote: On 05/19/2018 03:16 PM, Michael Nolan wrote: On Sat, May 19, 2018 at 2:16 PM, Don Seiler <

Re: initdb failing (10.4 centos7)

2018-05-19 Thread Adrian Klaver
On 05/19/2018 03:44 PM, Michael Nolan wrote: On Sat, May 19, 2018 at 5:23 PM, Adrian Klaver <adrian.kla...@aklaver.com <mailto:adrian.kla...@aklaver.com>> wrote: Then setting up the $DATADIR is on you: https://www.postgresql.org/docs/10/static/install-short.htm

Re: initdb failing (10.4 centos7)

2018-05-19 Thread Adrian Klaver
On 05/19/2018 04:06 PM, David G. Johnston wrote: On Saturday, May 19, 2018, Adrian Klaver <adrian.kla...@aklaver.com <mailto:adrian.kla...@aklaver.com>> wrote: On 05/19/2018 03:44 PM, Michael Nolan wrote: On Sat, May 19, 2018 at 5:23 PM, Adrian Klaver

Re: Query ID Values

2018-05-15 Thread Adrian Klaver
On 05/14/2018 10:04 PM, Ian Zimmerman wrote: On 2018-05-14 21:12, Adrian Klaver wrote: Because you are doing fetchall(). That is going to fetch a list of row tuples. Either iterate over that list or iterate over the cursor: for row in cur_p: print(row) For more info see: http

Re: Function to set up variable inside it

2018-05-15 Thread Adrian Klaver
On 05/15/2018 05:28 AM, Łukasz Jarych wrote: Hi Guys, I am using postgres 10.3 (or 4?). IT is possible to set up variable inside function? Like this?: https://www.postgresql.org/docs/10/static/plpgsql-declarations.html Best, Jacek -- Adrian Klaver adrian.kla...@aklaver.com

Re: sql function with empty row

2018-05-16 Thread Adrian Klaver
to NULL. Ignore my previous post I got turned around on what was being returned. If I run the join query directly it returns an empty record set on a non-existing trivial name. I expected equal behavior on my function, so my question is, how can I fix this? Thanks Phil -- Adrian Klaver

Re: sql function with empty row

2018-05-16 Thread Adrian Klaver
equal behavior on my function, so my question is, how can I fix this? Thanks Phil -- Adrian Klaver adrian.kla...@aklaver.com

Re: sql function with empty row

2018-05-16 Thread Adrian Klaver
on my function, so my question is, how can I fix this? Thanks Phil -- Adrian Klaver adrian.kla...@aklaver.com

Re: When use triggers?

2018-05-16 Thread Adrian Klaver
use Sqitch(http://sqitch.org/) which allows me to deploy and revert changes. I use a dev database to test and troubleshoot triggers and functions. -- Adrian Klaver adrian.kla...@aklaver.com

Re: Aggregate functions with FROM clause and ROW_COUNT diagnostics

2018-05-21 Thread Adrian Klaver
? Thanks, Off the top of my head: SELECT count(*) as ct, foo, bar, baz ... retcode = result ->'ct' ./danfe -- Adrian Klaver adrian.kla...@aklaver.com

Re: posgresql.log

2018-05-21 Thread Adrian Klaver
other servers… Could you be so kind and explain me what is it? I am afraid my postgres has been hacekd. Best Regards */Bartosz Dmytrak/* -- Adrian Klaver adrian.kla...@aklaver.com

Re: source of connection fails at pg startup?

2018-05-22 Thread Adrian Klaver
sql itself or is this likely from some Ubuntu- specific configuration? Thanks. -- Adrian Klaver adrian.kla...@aklaver.com

Re: Insert data if it is not existing

2018-05-23 Thread Adrian Klaver
On 05/23/2018 06:03 PM, tango ward wrote: On Thu, May 24, 2018 at 8:19 AM, Adrian Klaver <adrian.kla...@aklaver.com <mailto:adrian.kla...@aklaver.com>> wrote: On 05/23/2018 05:11 PM, tango ward wrote: Sorry, i forgot the values. curr.pgsql.execute('''

Re: Insert data if it is not existing

2018-05-23 Thread Adrian Klaver
On 05/23/2018 07:59 PM, tango ward wrote: On Thu, May 24, 2018 at 10:51 AM, Adrian Klaver Try the example I showed previously. If you do not want to use the the named parameters e.g %(name)s then use use %s and a tuple like: ''' INSERT INTO my_table(%s, %s) WHERE

Re: Insert data if it is not existing

2018-05-23 Thread Adrian Klaver
On 05/23/2018 08:04 PM, tango ward wrote: On Thu, May 24, 2018 at 10:55 AM, David G. Johnston <david.g.johns...@gmail.com <mailto:david.g.johns...@gmail.com>> wrote: On Wednesday, May 23, 2018, Adrian Klaver <adrian.kla...@aklaver.com <mailto:adrian.kla...@a

Re: [GENERAL] Postgre compatible version with RHEL 7.5

2018-05-23 Thread Adrian Klaver
at are shown on the home page). David J. -- Adrian Klaver adrian.kla...@aklaver.com

Re: Insert data if it is not existing

2018-05-23 Thread Adrian Klaver
this doesn't give me error but it doesn't insert data either. I'm doubting your assertion that it doesn't error.   How do you run that query such that age and name are recognized given the main query doesn't have a from clause? David J. -- Adrian Klaver adrian.kla...@aklaver.com

Re: Insert data if it is not existing

2018-05-23 Thread Adrian Klaver
olumn appearing within index_expression is required. " I take this to mean something like: ON CONFLICT UNIQUE INDEX name_idx ON my_table(name) On Thu, May 24, 2018 at 8:04 AM, Adrian Klaver <adrian.kla...@aklaver.com <mailto:adrian.kla...@aklaver.com>> wrote: On 05/23/201

Re: case statement within insert

2018-05-25 Thread Adrian Klaver
On 05/25/2018 06:52 AM, Adrian Klaver wrote: On 05/25/2018 02:04 AM, tango ward wrote: I want to insert data from mysql into a table in postgresql. I want to check when the subjectcode contains PE or NSTP so I can assign True or False to another column in destination DB. # Source data

Re: case statement within insert

2018-05-25 Thread Adrian Klaver
On 05/25/2018 07:05 AM, Adrian Klaver wrote: On 05/25/2018 06:52 AM, Adrian Klaver wrote: On 05/25/2018 02:04 AM, tango ward wrote: I want to insert data from mysql into a table in postgresql. I want to check when the subjectcode contains PE or NSTP so I can assign True or False to another

Re: case statement within insert

2018-05-25 Thread Adrian Klaver
? -- Adrian Klaver adrian.kla...@aklaver.com

Re: Syndicating PostgreSQL mailing list to Discourse

2018-05-25 Thread Adrian Klaver
of software! Sincerely, Erlend -- Adrian Klaver adrian.kla...@aklaver.com

Re: Fast logical replication jump start with PG 10

2018-05-25 Thread Adrian Klaver
for that. Thanks in advance Olivier Gautherot http://www.linkedin.com/in/ogautherot -- Adrian Klaver adrian.kla...@aklaver.com

Re: Fast logical replication jump start with PG 10

2018-05-25 Thread Adrian Klaver
autherot oliv...@gautherot.net <mailto:oliv...@gautherot.net> Cel:+56 98 730 9361 Skype: ogautherot www.gautherot.net <http://www.gautherot.net> http://www.linkedin.com/in/ogautherot On Fri, May 25, 2018 at 7:51 PM, Adrian Klaver <adrian.kla...@aklaver.com <mailto:adrian.kla...@aklaver.com&g

Re: Extension/Language of plPerl in PostgreSQL

2018-05-24 Thread Adrian Klaver
/Language_Pack_v10/EDB_Postgres_Language_Pack_Guide.1.09.html# Will get back to you in case of any queries. Thanks, Karthick -Original Message- From: Adrian Klaver [mailto:adrian.kla...@aklaver.com] Sent: Thursday, May 24, 2018 7:31 PM To: Karthick Damodar; pgsql-gene...@postgresql.org Subject

Re: Insert data if it is not existing

2018-05-24 Thread Adrian Klaver
: psycopg2.ProgrammingError: syntax error at or near "WHERE" LINE 12: WHERE NOT EXISTS Trying to coordinate with Lead Dev about adding Index On The Fly I tried to figure how to make this work and could not, so I led you down a false path. -- Adrian Klaver

Re: Extension/Language of plPerl in PostgreSQL

2018-05-24 Thread Adrian Klaver
de secret or privileged information. Any unauthorized review, use, disclosure or distribution is prohibited and may be a violation of law. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. -- Adrian Klaver adrian.kla...@aklaver.com

Re: Insert data if it is not existing

2018-05-24 Thread Adrian Klaver
On 05/23/2018 09:39 PM, David G. Johnston wrote: On Wednesday, May 23, 2018, Adrian Klaver <adrian.kla...@aklaver.com <mailto:adrian.kla...@aklaver.com>> wrote: '''INSERT INTO my_table(name, age) SELECT %s, %s WHERE NOT EXISTS(SELECT name FROM my_table W

Re: Extension/Language of plPerl in PostgreSQL

2018-05-24 Thread Adrian Klaver
Postgres install. Thanks, Karthick -Original Message- From: Adrian Klaver [mailto:adrian.kla...@aklaver.com] Sent: Thursday, May 24, 2018 7:50 PM To: Karthick Damodar Cc: pgsql-general Subject: Re: Extension/Language of plPerl in PostgreSQL On 05/24/2018 07:11 AM, Karthick Damodar wrote

Re: sql function with empty row

2018-05-16 Thread Adrian Klaver
On 05/16/2018 11:49 AM, Philipp Kraus wrote: Am 16.05.2018 um 20:40 schrieb Adrian Klaver <adrian.kla...@aklaver.com>: I have tested it on my data and it works also, but that is a little bit confusing, because imho setof is >= 0 rows and without setof it is [0,1]. On th

Re: Fwd: compressed bits in sql table

2018-06-09 Thread Adrian Klaver
is the field type? 3) Are you referring to the TOAST table? Thanks, Sandeep -- Adrian Klaver adrian.kla...@aklaver.com

Re: Fwd: compressed bits in sql table

2018-06-09 Thread Adrian Klaver
? it is related to my application. thanks, Sandeep On Sun, Jun 10, 2018 at 4:04 AM Adrian Klaver <mailto:adrian.kla...@aklaver.com>> wrote: On 06/09/2018 02:40 PM, SANDEEP GOURNENI wrote: > > Hi all, > > How can we read compressed bits in postgr

Re: pg_upgrade and wraparound

2018-06-09 Thread Adrian Klaver
similar parameters from older versions (at least 2 times, something like 9.1 -> 9.3, 9.3 -> 9.6). The database is around 700 GB and has very many pg_largeobjects in it. What could be the reason of this and how can I perform my upgrade? Thanks in advance, Alexander -- Adrian Klaver adri

Re: (2^63 - 1)::bigint => out of range? (because of the double precision)

2018-06-09 Thread Adrian Klaver
On 06/09/2018 05:24 AM, Alexey Dokuchaev wrote: On Fri, Jun 08, 2018 at 10:30:45AM -0700, Adrian Klaver wrote: My guess is because sequences are often used to provide numbers for a PRIMARY KEY and NO CYCLE is a heads up for key duplication before the PK code kicks in. OK, but what about

Re: pg_upgrade and wraparound

2018-06-10 Thread Adrian Klaver
tname from pg_database;   oid  |  datname ---+---  13011 | template0  16400 | bof  13012 | postgres  16401 | sslentry      1 | template1 (5 rows) -- Adrian Klaver adrian.kla...@aklaver.com

Re: Sort is generating rows

2018-06-10 Thread Adrian Klaver
COALESCE(s.date_order::timestamp with time zone, now()) AND (res_currency_rate.date_end IS NULL OR res_currency_rate.date_end > COALESCE(s.date_order::timestamp with time zone, now())) -- Adrian Klaver adrian.kla...@aklaver.com

Re: Microsoft buys GitHub, is this a threat to open-source

2018-06-07 Thread Adrian Klaver
/ -- Adrian Klaver adrian.kla...@aklaver.com

Re: Can you make a simple view non-updatable?

2018-06-08 Thread Adrian Klaver
this:  It will help me encode into my schema the distinction between views that are supposed to behave like full-fledged "subtypes" of a larger relation and need to be updatable, vs those that are merely a report / literally just a "view". Thanks! Ryan -- Adrian Klaver adrian.kla...@aklaver.com

Re: Code of Conduct plan

2018-06-08 Thread Adrian Klaver
Americans together as we come from many paths and often disagree on what is correct, which is what motivates my reservations about the CoC. Cheers, Gavin -- Adrian Klaver adrian.kla...@aklaver.com

Re: (2^63 - 1)::bigint => out of range? (because of the double precision)

2018-06-08 Thread Adrian Klaver
is not supported." Another "why is it so?" question, btw. ;-) Where in the docs are you seeing this? -- Adrian Klaver adrian.kla...@aklaver.com

Re: (2^63 - 1)::bigint => out of range? (because of the double precision)

2018-06-08 Thread Adrian Klaver
gint is the default. The data type determines the default minimum and maximum values of the sequence. " -- Adrian Klaver adrian.kla...@aklaver.com

json_populate_recordset

2018-06-07 Thread Adrian Klaver
From here: https://www.postgresql.org/docs/10/static/functions-json.html select * from json_populate_record(null::myrowtype, '{"a": 1, "b": ["2", "a b"], "c": {"d": 4, "e": "a b c"}}') What is the null::myrowtype doing? Thanks, -- Adrian Klaver adrian.kla...@aklaver.com

Re: Query hitting empty tables taking 48 minutes

2018-06-07 Thread Adrian Klaver
ase keep my CC of my work e-mail present. Best, Robert -- Adrian Klaver adrian.kla...@aklaver.com

Re: Service pgpool

2018-06-07 Thread Adrian Klaver
to me like a start script using SYSV init in a systemd system and systemd not liking it. Thanks a lot -- Adrian Klaver adrian.kla...@aklaver.com

Re: json_populate_recordset

2018-06-07 Thread Adrian Klaver
On 06/07/2018 09:56 AM, Pavel Stehule wrote: 2018-06-07 18:51 GMT+02:00 Adrian Klaver <mailto:adrian.kla...@aklaver.com>>: From here: https://www.postgresql.org/docs/10/static/functions-json.html <https://www.postgresql.org/docs/10/static/functions-json.html>

Re: Query hitting empty tables taking 48 minutes

2018-06-07 Thread Adrian Klaver
On 06/07/2018 12:11 PM, Rob Sargent wrote: What's the url doing in "blob_id = ds3.blob.id <http://ds3.blob.id;? I have run into this before, it is an email artifact. -- Adrian Klaver adrian.kla...@aklaver.com

Re: Query hitting empty tables taking 48 minutes

2018-06-07 Thread Adrian Klaver
On 06/07/2018 11:55 AM, Robert Creager wrote: On Jun 7, 2018, at 12:40 PM, Adrian Klaver <mailto:adrian.kla...@aklaver.com>> wrote: On 06/07/2018 11:17 AM, Robert Creager wrote: I have a system running FreeBSD 11.1-STABLE, PostgreSQL 9.6.8,Java OpenJDK 1.8.0_131, jdbc 9.3-1104-jdb

Re: Multiple PostgreSQL instances on one machine

2018-06-08 Thread Adrian Klaver
r| 10 relam | 0 relfilenode | 1836555 reltablespace | 1836554 -- Adrian Klaver adrian.kla...@aklaver.com

Re: Clarifying "timestamp with time zone"

2018-06-18 Thread Adrian Klaver
On 06/18/2018 06:24 AM, Jeremy Finzel wrote: On Fri, Jun 15, 2018 at 2:57 PM, Adrian Klaver mailto:adrian.kla...@aklaver.com>> wrote: On 06/15/2018 12:24 PM, Jeremy Finzel wrote: Hello! We often prefer to use timestamptz or "timestamp with time zone"

Re: pg_upgrade 10.2

2018-06-12 Thread Adrian Klaver
at attempt. Is that possible? I don't so because it exited before it got the upgrading part. -- Adrian Klaver adrian.kla...@aklaver.com

Re: Logging

2018-06-12 Thread Adrian Klaver
ements = 'mod' and I see statements in the logs. David J. -- Adrian Klaver adrian.kla...@aklaver.com

Re: pg_upgrade 10.2

2018-06-12 Thread Adrian Klaver
that there is a bug that is not finding it when it's at the end. -- Adrian Klaver adrian.kla...@aklaver.com

Re: Transparent partitioning

2018-06-12 Thread Adrian Klaver
e new row, an error will be reported. Partitioned tables do not support UNIQUE, PRIMARY KEY, EXCLUDE, or FOREIGN KEY constraints; however, you can define these constraints on individual partitions. " Best regards, Braulio Oliveira -- Adrian Klaver adrian.kla...@aklaver.com

  1   2   3   4   5   6   7   8   9   10   >