Re: The Amazon CloudFront distribution is configured to block access from your country.

2021-04-11 Thread Tim Cross


Jan Wieck  writes:

> On 4/11/21 11:16 AM, Ron wrote:
>> If my software requires zlib, and I link to https://zlib.net/ on my page, 
>> then
>> your logic absolutely means that I'm responsible for supporting zlib.
>
> Let's clarify "support" in this context. If you link to zlib.net, you are not
> responsible for zlib itself. But if for whatever reason that link breaks, you
> are to some degree responsible for giving a user (who tried to follow that 
> link)
> a helping hand where to find what you linked to now.
>
> The OP did precisely that. Asking for help because a link didn't work. And I
> think it was perfectly appropriate to ask here.

I agree, especially given the postgres pages are not explicit/clear that
the download link is a 3rd party link. The OPs question was quite
reasonable and all that was required was to point them to EDB for
assistance. Thankfully, a number of community members did politely do
this and I'm sure the OP was appreciative for the pointers. It has also
highlighted an area for possible clarification/improvement on the
postgres.org site.

-- 
Tim Cross




Re: The Amazon CloudFront distribution is configured to block access from your country.

2021-04-11 Thread Jan Wieck

On 4/11/21 11:16 AM, Ron wrote:
If my software requires zlib, and I link to https://zlib.net/ on my 
page, then your logic absolutely means that I'm responsible for 
supporting zlib.


Let's clarify "support" in this context. If you link to zlib.net, you 
are not responsible for zlib itself. But if for whatever reason that 
link breaks, you are to some degree responsible for giving a user (who 
tried to follow that link) a helping hand where to find what you linked 
to now.


The OP did precisely that. Asking for help because a link didn't work. 
And I think it was perfectly appropriate to ask here.



--
Jan Wieck
Postgres User since 1994




Re: How can I insert the image as a blob in the table

2021-04-11 Thread Igor Korot
Hi, David,

On Sun, Apr 11, 2021 at 6:57 PM David G. Johnston
 wrote:
>
> On Sunday, April 11, 2021, Igor Korot  wrote:
>>
>> Hi, David,
>>
>>
>> On Sun, Apr 11, 2021 at 6:24 PM David G. Johnston
>>  wrote:
>>
>> > If you can decide on what client interface you want to use there should be 
>> > existing resources on the web walking through how to do this using that 
>> > client interface.
>>
>> Something like this:
>>
>> INSERT INTO images(image) VALES( loadfile( /home/igor/my_image) );
>>
>> Looking to run it from gAdmin in the Terminal.
>
>
> As SQL is executed on the server there is the major issue of the server being 
> unable to resolve /home on the client machine.  But maybe pgAdmin has its own 
> way to deal with this.  Have you read its documentation?

I don't know - server is running on the same OSX machine as pgAdmin will be.

Thank you.

>
> David J.
>




Re: How can I insert the image as a blob in the table

2021-04-11 Thread David G. Johnston
On Sunday, April 11, 2021, David G. Johnston 
wrote:

> On Sunday, April 11, 2021, Igor Korot  wrote:
>
>> Hi, David,
>>
>>
>> On Sun, Apr 11, 2021 at 6:24 PM David G. Johnston
>>  wrote:
>>
>> > If you can decide on what client interface you want to use there should
>> be existing resources on the web walking through how to do this using that
>> client interface.
>>
>> Something like this:
>>
>> INSERT INTO images(image) VALES( loadfile( /home/igor/my_image) );
>>
>> Looking to run it from gAdmin in the Terminal.
>>
>
> As SQL is executed on the server there is the major issue of the server
> being unable to resolve /home on the client machine.  But maybe pgAdmin has
> its own way to deal with this.  Have you read its documentation?
>
>
Or:


https://www.postgresql.org/docs/current/functions-admin.html#FUNCTIONS-ADMIN-GENFILE

David J.


Re: How can I insert the image as a blob in the table

2021-04-11 Thread David G. Johnston
On Sunday, April 11, 2021, Igor Korot  wrote:

> Hi, David,
>
>
> On Sun, Apr 11, 2021 at 6:24 PM David G. Johnston
>  wrote:
>
> > If you can decide on what client interface you want to use there should
> be existing resources on the web walking through how to do this using that
> client interface.
>
> Something like this:
>
> INSERT INTO images(image) VALES( loadfile( /home/igor/my_image) );
>
> Looking to run it from gAdmin in the Terminal.
>

As SQL is executed on the server there is the major issue of the server
being unable to resolve /home on the client machine.  But maybe pgAdmin has
its own way to deal with this.  Have you read its documentation?

David J.


Re: How can I insert the image as a blob in the table

2021-04-11 Thread Igor Korot
Hi, David,


On Sun, Apr 11, 2021 at 6:24 PM David G. Johnston
 wrote:
>
> On Sun, Apr 11, 2021 at 2:04 PM Igor Korot  wrote:
>>
>> Hi, ALL,
>> I have an image on my hard drive and I'd like to store it in the BLOB
>> column of the images table.
>>
>> Is there a simple SQL to do that in PostgreSQL?
>>
>
> SQL proper has no concept of "your hard drive".  You need to define what you 
> plan to use as an in between layer that can produce SQL AND see "your hard 
> drive" (i.e., what database client).  Also, BLOB isn't an actual thing in 
> PostgreSQL proper (though generic client APIs may use that term), so I 
> presume you mean to store the contents in a "bytea" typed column.  You could 
> also convert the binary to a encoded text compatible type (e.g., base64) and 
> use a text field instead.
>
> If you can decide on what client interface you want to use there should be 
> existing resources on the web walking through how to do this using that 
> client interface.

Something like this:

INSERT INTO images(image) VALES( loadfile( /home/igor/my_image) );

Looking to run it from gAdmin in the Terminal.

Thank you.

>
> David J.
>




Re: Prepare Statement VS Literal Values

2021-04-11 Thread Ravi Krishna
This looks like early vs late binding problem, also seen in  other products.  When you prepare the sql, the optimizer
has no way of knowing the values which is going to be supplied in future.  So it is possible that at the time of preparing
PG settles on a plan and uses it for all values, regardless of its efficiency.

 




Re: How can I insert the image as a blob in the table

2021-04-11 Thread David G. Johnston
On Sun, Apr 11, 2021 at 2:04 PM Igor Korot  wrote:

> Hi, ALL,
> I have an image on my hard drive and I'd like to store it in the BLOB
> column of the images table.
>
> Is there a simple SQL to do that in PostgreSQL?
>
>
SQL proper has no concept of "your hard drive".  You need to define what
you plan to use as an in between layer that can produce SQL AND see "your
hard drive" (i.e., what database client).  Also, BLOB isn't an actual thing
in PostgreSQL proper (though generic client APIs may use that term), so I
presume you mean to store the contents in a "bytea" typed column.  You
could also convert the binary to a encoded text compatible type (e.g.,
base64) and use a text field instead.

If you can decide on what client interface you want to use there should be
existing resources on the web walking through how to do this using that
client interface.

David J.


Prepare Statement VS Literal Values

2021-04-11 Thread Virendra Kumar
Hi Team,

I am struggling a lot on this for at least 3-4 queries. When I run explain 
analyze using literal values the query takes good plan but as soon as I use 
bind variable using the prepare statement it is going for toss and the same 
query is taking a lot of time.


testdb=# select version();
   version  
     
-
 PostgreSQL 9.6.11 on x86_64-apple-darwin19.6.0, compiled by Apple clang 
version 12.0.0 (clang-1200.0.32.29), 64-bit
(1 row)

testdb=# \d+ warehouse_costs
 Table "public.warehouse_costs"
  Column   |  Type  | Modifiers | 
Storage  | Stats target | Description
---++---+--+--+-
 warehouse_cost_id | numeric(38,0)  | not null  | main  
   |  |
 asin  | character(10)  |   | 
extended |  |
 warehouse_id  | character(4)   |   | 
extended |  |
 item_disposition_code | character varying(15)  |   | 
extended |  |
 gl_product_group  | numeric(4,0)   |   | main  
   |  |
 base_currency_code    | character varying(15)  |   | 
extended |  |
 cost_acquisition_date | timestamp(0) without time zone |   | plain 
   |  |
 cost  | numeric(12,2)  |   | main  
   |  |
 cost_reference_id | numeric(38,0)  |   | main  
   |  |
 cost_reference_id_source  | character varying(100) |   | 
extended |  |
 warehouse_txn_type_id | numeric(4,0)   |   | main  
   |  |
 original_quantity | integer    |   | plain 
   |  |
 on_hand_quantity  | integer    |   | plain 
   |  |
 creation_date | timestamp(0) without time zone |   | plain 
   |  |
 created_by    | character varying(8)   |   | 
extended |  |
 last_updated_date | timestamp(0) without time zone |   | plain 
   |  |
 last_updated_by   | character varying(8)   |   | 
extended |  |
 last_updated  | timestamp(0) without time zone |   | plain 
   |  |
 record_version_number | numeric(38,0)  |   | main  
   |  |
 warehouse_owner_group_id  | numeric(38,0)  |   | main  
   |  |
 warehouse_fiscal_owner_id | numeric(38,0)  |   | main  
   |  |
Indexes:
    "pk_inventory_costs" PRIMARY KEY, btree (warehouse_cost_id)
    "i_ic_asin_whse_disp_iog_qty" btree (asin, warehouse_id, 
item_disposition_code, warehouse_owner_group_id, on_hand_quantity)
    "i_ic_cost_date_asin_iog_id" btree (cost_acquisition_date, asin, 
warehouse_owner_group_id)
    "i_ic_inventory_txn_type_id" btree (warehouse_txn_type_id)
    "i_ic_last_updated" btree (last_updated)

testdb=# prepare fooplan(text,text,bigint,text) AS select
testdb-# this_.warehouse_cost_id , this_.asin , this_.base_currency_code,
testdb-# this_.cost , this_.cost_acquisition_date , this_.cost_reference_id ,
testdb-# this_.cost_reference_id_source , this_.created_by , 
this_.creation_date ,
testdb-# this_.gl_product_group , this_.warehouse_fiscal_owner_id ,
testdb-# this_.warehouse_owner_group_id , this_.warehouse_txn_type_id ,
testdb-# this_.item_disposition_code , this_.last_updated , 
this_.last_updated_by ,
testdb-# this_.last_updated_date , this_.on_hand_quantity , 
this_.original_quantity ,
testdb-# this_.record_version_number , this_.warehouse_id  from warehouse_costs 
this_
testdb-# where this_.warehouse_id=$1
testdb-# and this_.asin=$2
testdb-# and this_.warehouse_owner_group_id=$3
testdb-# and this_.item_disposition_code=$4
testdb-# order by this_.cost_acquisition_date asc;
ERROR:  prepared statement "fooplan" already exists
Time: 0.645 ms
testdb=#
testdb=# explain (analyze, buffers) execute 
fooplan('IMXK','B002LA1D9Y','1','SELLABLE');

explain analyze
select
this_.warehouse_cost_id , this_.asin , this_.base_currency_code ,
this_.cost , this_.cost_acquisition_date , this_.cost_reference_id ,
this_.cost_reference_id_source , this_.created_by , this_.creation_date ,
this_.gl_product_group , this_.warehouse_fiscal_owner_id ,
this_.warehouse_owner_group_id , this_.warehouse_txn_type_id ,
this_.item_disposition_code , this_.last_updated , this_.las

RE: Re: Reuse of REF Cursor

2021-04-11 Thread Abraham, Danny
I speculate that I am in the good old problem .. of a very slow plan of NOT IN 
(We used to convert it to NOT EXISTS in V8).

Is this planner issue still in V9? Has the planner fixed for it in V10?

Thanks

Danny




How can I insert the image as a blob in the table

2021-04-11 Thread Igor Korot
Hi, ALL,
I have an image on my hard drive and I'd like to store it in the BLOB
column of the images table.

Is there a simple SQL to do that in PostgreSQL?

Thank you.




Re: Reuse of REF Cursor

2021-04-11 Thread Tom Lane
"Abraham, Danny"  writes:
> 2021-04-09 08:00:08.692 IDTERROR:  canceling statement due to statement 
> timeout

I don't know why you would think that a statement timeout is somehow
the fault of the refcursor variable you used.  You need to look at
whether your timeout is a sane value, and if so, why it is that
something else is blocking your query for longer than that.
Looking into pg_locks might help identify what the "something else"
is.

regards, tom lane




RE: Re: Reuse of REF Cursor

2021-04-11 Thread Abraham, Danny
2021-04-09 08:00:08.692 IDTERROR:  canceling statement due to statement timeout
2021-04-09 08:00:08.692 IDTCONTEXT:  PL/pgSQL function 
orhpans_active_clean_table(character varying,integer) line 42 at FETCH
PL/pgSQL function orhpans_active_removal() line 31 at assignment
PL/pgSQL function ajf_backup(integer) line 39 at assignment

Can a FETCH fail if the table is locked? The FETCH is stuck for the 
 time.

Should I  lock all tables involved with the query?

Any specific time-out on the fetch? Or should I use the general 
statement-timeout?

I mean move from regular programming mode to paranoidic mode

The failure is inconsistent.. Never fails in PG 11.5, but fails in PG9.5.5 
about once a week...

I need a full understanding of the problem in order to force big,slow customers 
to migrate to PG11.5.

Thanks

Danny




Re: Reuse of REF Cursor

2021-04-11 Thread Tom Lane
"Abraham, Danny"  writes:
>   stmt := 'select count(*) from ' || table_name;
>open C1 for execute  stmt;
>fetch C1 into rc;
>close C1;
>...

That still isn't a self-contained example; perhaps more usefully,
you've not told us exactly what error you're seeing, either.

FWIW, I tried executing a fragment like the above in a loop,
and it seemed fine.

regards, tom lane




RE: Re: Reuse of REF Cursor

2021-04-11 Thread Abraham, Danny
  stmt := 'select count(*) from ' || table_name;
   open C1 for execute  stmt;
   fetch C1 into rc;
   close C1;

   if (debug_level = 1) then
  if rc > 0 then
 perform diag_print(func_name,format('Counted %s records in table 
%s',rc,table_name) );
  else
 perform diag_print(func_name,format('Table %s is empty.',table_name) );
 return 0;
  end if;
   end if;

   stmt := 'select count(*) from ' || table_name || ' where orderno not in ( 
select orderno from cmr_ajf) ' ;
   if lower(table_name) = 'cmr_setvar'  then
stmt := stmt || ' and orderno <> 0';
   end if;
   open C1 for execute  stmt;
   fetch C1 into rc;  <= Sometimes fail here
   close C1;
   if rc>0 then


Should I use a different variable for every refcursor usage ?






Re: The Amazon CloudFront distribution is configured to block access from your country.

2021-04-11 Thread Adrian Klaver

On 4/11/21 8:11 AM, felix.quin...@yahoo.com wrote:

The link https://www.postgresql.org/download/ in the PostgreSQL Downloads 
section, Windows, redirects to the page 
https://www.postgresql.org/download/windows/. There are only two links in it 
and both redirect to the EnterpriseDB site. At no time is it clarified that it 
is a third party, even the link is outside the third party section.
On the page https://www.postgresql.org/download/ there are only two more 
sections, the source code and third parties. Therefore the official source for 
downloading the installer is the link I put, I checked all the links on the 
site and nowhere is it offered to download the installer from the PostgreSQL 
site itself.
The use of vpn is not legal in some countries, it is an option that can get me 
in trouble. The only option I have left is to search for a link in google and 
download it from some dubious source.


Another option, now that you know the situation, is to contact 
EDB(https://www.enterprisedb.com/contact) and see if there are other 
ways to get the software.


There is also the option of downloading the source:

https://www.postgresql.org/ftp/source/

from the community site and building Postgres.




  On Sunday, April 11, 2021, 05:54:00 AM GMT-4, Stephan Knauss 
 wrote:

  Hello Felix,

On 11.04.2021 02:31, felix.quin...@yahoo.com wrote:

I see no reason why ask elsewhere first, the link for the installer download is 
on the Postgresql website, not elsewhere. The most logical thing to do is ask 
here first.



Because it is the Postgresql installer. 
https://www.enterprisedb.com/downloads/postgres-postgresql-downloads


It's unfortunate that your download is blocked. As indicated by others I
am also wondering why you ask here for community support.

You pointed to a download link which is controlled by a private company
selling Postgresql services:

Read about this company on an independent website:
https://en.wikipedia.org/wiki/EnterpriseDB

If you are looking for the download links of the PostgreSQL project, you
can find it here:

https://www.postgresql.org/download/


Based on your feedback, it is NOT the link listed on the PostgreSQL
website, but on a 3rd party website. This is why you got the
recommendation to check with them. You also got hints on how you could
potentially work around the download restriction by using a VPN.


Stephan





--
Adrian Klaver
adrian.kla...@aklaver.com




Re: The Amazon CloudFront distribution is configured to block access from your country.

2021-04-11 Thread Adrian Klaver

On 4/11/21 8:16 AM, Ron wrote:



That is ALL I said, and that is ALL I meant. DO NOT put words in my mouth!


If my software requires zlib, and I link to https://zlib.net/ on my 
page, then your logic absolutely means that I'm responsible for 
supporting zlib.


Except the route was:

https://www.postgresql.org/

https://www.postgresql.org/download/windows/

https://www.enterprisedb.com/downloads/postgres-postgresql-downloads

Where the download was Postgres itself not a contained package. This is 
just a matter of making it clearer at what point a user is leaving 
community supported packages and entering third party packaging.




--
Angular momentum makes the world go 'round.



--
Adrian Klaver
adrian.kla...@aklaver.com




Re: The Amazon CloudFront distribution is configured to block access from your country.

2021-04-11 Thread Adrian Klaver

On 4/11/21 2:53 AM, Stephan Knauss wrote:

Hello Felix,

On 11.04.2021 02:31, felix.quin...@yahoo.com wrote:
I see no reason why ask elsewhere first, the link for the installer 
download is on the Postgresql website, not elsewhere. The most logical 
thing to do is ask here first.


Because it is the Postgresql installer. 
https://www.enterprisedb.com/downloads/postgres-postgresql-downloads


It's unfortunate that your download is blocked. As indicated by others I 
am also wondering why you ask here for community support.


You pointed to a download link which is controlled by a private company 
selling Postgresql services:


Read about this company on an independent website: 
https://en.wikipedia.org/wiki/EnterpriseDB


If you are looking for the download links of the PostgreSQL project, you 
can find it here:


https://www.postgresql.org/download/


Which as others have pointed out links to the EDB site for certain 
downloads. As also pointed it is not entirely clear that some of the 
links are to PGDG installs and some are third party.





Based on your feedback, it is NOT the link listed on the PostgreSQL 
website, but on a 3rd party website. This is why you got the 
recommendation to check with them. You also got hints on how you could 
potentially work around the download restriction by using a VPN.



Stephan







--
Adrian Klaver
adrian.kla...@aklaver.com




Re: Reuse of REF Cursor

2021-04-11 Thread Tom Lane
"Abraham, Danny"  writes:
> Has anybody faced a problem with reusing a ref cursor?

Your fragment looks like it ought to work, but it's hard to say
where the problem is without seeing a complete example.

> PG Version 9.5.5 on Linux.

9.5.x is EOL, and the last release in that series was 9.5.25,
so you *really* oughta think about an update.

regards, tom lane




Re: The Amazon CloudFront distribution is configured to block access from your country.

2021-04-11 Thread Ron

On 4/11/21 10:07 AM, Israel Brewster wrote:
On Apr 11, 2021, at 6:52 AM, Ron > wrote:


On 4/11/21 9:12 AM, Israel Brewster wrote:
On Apr 11, 2021, at 1:53 AM, Stephan Knauss > wrote:


Hello Felix,

On 11.04.2021 02:31, felix.quin...@yahoo.com 
 wrote:
I see no reason why ask elsewhere first, the link for the installer 
download is on the Postgresql website, not elsewhere. The most logical 
thing to do is ask here first.


Because it is the Postgresql installer. 
https://www.enterprisedb.com/downloads/postgres-postgresql-downloads


It's unfortunate that your download is blocked. As indicated by others 
I am also wondering why you ask here for community support.


You pointed to a download link which is controlled by a private company 
selling Postgresql services:


Read about this company on an independent website: 
https://en.wikipedia.org/wiki/EnterpriseDB


If you are looking for the download links of the PostgreSQL project, 
you can find it here:


https://www.postgresql.org/download/


Based on your feedback, it is NOT the link listed on the PostgreSQL 
website,


With all due respect, the link he posted IS the link listed on the 
PostgreSQL website, at least for me. When I go to the link YOU posted, 
and click on MacOS, for example (giving me a URL of 
https://www.postgresql.org/download/macosx/), the FIRST option listed 
there is "Interactive installer by EDB”, which links to 
https://www.enterprisedb.com/downloads/postgres-postgresql-downloads. 
There is no indication on that page that you are linking to a 
third-party package download not supported by PostgreSQL (it does say 
“certified by EDB”, but that doesn’t mean much to a new user, and 
certainly doesn’t indicate a lack of support by PostgreSQL), so it makes 
total sense that someone would think to ask here first when experiencing 
issues.


If you don’t want to offer assistance, that’s fine, but this link most 
certainly IS the link listed on the PostgreSQL website, at least for 
MacOS. I haven’t checked for other operating systems.




Your comment means that the owners of any web page which links to a third 
party product must support that third-party product, just by virtue of 
supporting it. That's crazy.


My comment means no such thing. You are absolutely right: that would be 
crazy. What my comment means is exactly what it says:


1) The official PostgreSQL download page (for both mac and windows 
platforms) makes NO MENTION of the FACT that it is linking to an 
unsupported third-party installer, and
2) as such, it makes total sense that someone going to the official 
PostgreSQL download page and getting an error when clicking on a link on 
the official PostgreSQL download page would come here first for support.


That is ALL I said, and that is ALL I meant. DO NOT put words in my mouth!


If my software requires zlib, and I link to https://zlib.net/ on my page, 
then your logic absolutely means that I'm responsible for supporting zlib.


--
Angular momentum makes the world go 'round.


Re: The Amazon CloudFront distribution is configured to block access from your country.

2021-04-11 Thread felix . quintgz
The link https://www.postgresql.org/download/ in the PostgreSQL Downloads 
section, Windows, redirects to the page 
https://www.postgresql.org/download/windows/. There are only two links in it 
and both redirect to the EnterpriseDB site. At no time is it clarified that it 
is a third party, even the link is outside the third party section.
On the page https://www.postgresql.org/download/ there are only two more 
sections, the source code and third parties. Therefore the official source for 
downloading the installer is the link I put, I checked all the links on the 
site and nowhere is it offered to download the installer from the PostgreSQL 
site itself.
The use of vpn is not legal in some countries, it is an option that can get me 
in trouble. The only option I have left is to search for a link in google and 
download it from some dubious source. 

 On Sunday, April 11, 2021, 05:54:00 AM GMT-4, Stephan Knauss 
 wrote:

 Hello Felix,

On 11.04.2021 02:31, felix.quin...@yahoo.com wrote:
> I see no reason why ask elsewhere first, the link for the installer download 
> is on the Postgresql website, not elsewhere. The most logical thing to do is 
> ask here first.

> Because it is the Postgresql installer. 
> https://www.enterprisedb.com/downloads/postgres-postgresql-downloads
>
It's unfortunate that your download is blocked. As indicated by others I
am also wondering why you ask here for community support.

You pointed to a download link which is controlled by a private company
selling Postgresql services:

Read about this company on an independent website:
https://en.wikipedia.org/wiki/EnterpriseDB

If you are looking for the download links of the PostgreSQL project, you
can find it here:

https://www.postgresql.org/download/


Based on your feedback, it is NOT the link listed on the PostgreSQL
website, but on a 3rd party website. This is why you got the
recommendation to check with them. You also got hints on how you could
potentially work around the download restriction by using a VPN.


Stephan




Re: The Amazon CloudFront distribution is configured to block access from your country.

2021-04-11 Thread David G. Johnston
On Sunday, April 11, 2021, Ron  wrote:

>
> Your comment means that the owners of any web page which links to a third
> party product must support that third-party product, just by virtue of
> supporting it.  That's crazy.
>
>
We could do a better job on making it clear that the community project
doesn’t really support platform specific installers, and be obvious when
links go off-site to those third-parties.

David J.


Re: The Amazon CloudFront distribution is configured to block access from your country.

2021-04-11 Thread Israel Brewster
> On Apr 11, 2021, at 6:52 AM, Ron  wrote:
> 
> On 4/11/21 9:12 AM, Israel Brewster wrote:
>>> On Apr 11, 2021, at 1:53 AM, Stephan Knauss >> > wrote:
>>> 
>>> Hello Felix,
>>> 
>>> On 11.04.2021 02:31, felix.quin...@yahoo.com 
>>>  wrote:
 I see no reason why ask elsewhere first, the link for the installer 
 download is on the Postgresql website, not elsewhere. The most logical 
 thing to do is ask here first.
>>> 
 Because it is the Postgresql installer. 
 https://www.enterprisedb.com/downloads/postgres-postgresql-downloads 
 
 
>>> It's unfortunate that your download is blocked. As indicated by others I am 
>>> also wondering why you ask here for community support.
>>> 
>>> You pointed to a download link which is controlled by a private company 
>>> selling Postgresql services:
>>> 
>>> Read about this company on an independent website: 
>>> https://en.wikipedia.org/wiki/EnterpriseDB 
>>> 
>>> 
>>> If you are looking for the download links of the PostgreSQL project, you 
>>> can find it here:
>>> 
>>> https://www.postgresql.org/download/ 
>>> 
>>> 
>>> Based on your feedback, it is NOT the link listed on the PostgreSQL website,
>> 
>> With all due respect, the link he posted IS the link listed on the 
>> PostgreSQL website, at least for me. When I go to the link YOU posted, and 
>> click on MacOS, for example (giving me a URL of 
>> https://www.postgresql.org/download/macosx/ 
>> ), the FIRST option listed 
>> there is "Interactive installer by EDB”, which links to 
>> https://www.enterprisedb.com/downloads/postgres-postgresql-downloads 
>> . 
>> There is no indication on that page that you are linking to a third-party 
>> package download not supported by PostgreSQL (it does say “certified by 
>> EDB”, but that doesn’t mean much to a new user, and certainly doesn’t 
>> indicate a lack of support by PostgreSQL), so it makes total sense that 
>> someone would think to ask here first when experiencing issues.
>> 
>> If you don’t want to offer assistance, that’s fine, but this link most 
>> certainly IS the link listed on the PostgreSQL website, at least for MacOS. 
>> I haven’t checked for other operating systems.
>> 
> 
> Your comment means that the owners of any web page which links to a third 
> party product must support that third-party product, just by virtue of 
> supporting it.  That's crazy.

My comment means no such thing. You are absolutely right: that would be crazy. 
What my comment means is exactly what it says:

1) The official PostgreSQL download page (for both mac and windows platforms) 
makes NO MENTION of the FACT that it is linking to an unsupported third-party 
installer, and
2) as such, it makes total sense that someone going to the official PostgreSQL 
download page and getting an error when clicking on a link on the official 
PostgreSQL download page would come here first for support.

That is ALL I said, and that is ALL I meant. DO NOT put words in my mouth!

---
Israel Brewster
Software Engineer
Alaska Volcano Observatory 
Geophysical Institute - UAF 
2156 Koyukuk Drive 
Fairbanks AK 99775-7320
Work: 907-474-5172
cell:  907-328-9145

> 
> -- 
> Angular momentum makes the world go 'round.



Re: Reuse of REF Cursor

2021-04-11 Thread David G. Johnston
On Sunday, April 11, 2021, Abraham, Danny  wrote:

>
> PG Version 9.5.5 on Linux.


>
>
As neither your minor nor major version are supported you will find support
to find limited if you get any at all.

David J.


Re: Who altered the database?

2021-04-11 Thread Vincent Veyron
On Fri, 9 Apr 2021 13:14:17 +0200
Durumdara  wrote:
> 
> What can we do to get info about the change (who did it, from what IP, when
> it happened) in the future?
> 
> As I see we can't define precisely what we want to log... All or nothing.
> 

Create a web interface to apply the changes and have the web server log the 
info in its own logs?

Apache has this directive :

https://httpd.apache.org/docs/2.4/mod/mod_log_config.html#logformat

-- 
Bien à vous, Vincent Veyron 

https://marica.fr/ 
Logiciel de suivi des contentieux juridiques, des sinistres d'assurance et des 
contrats





Reuse of REF Cursor

2021-04-11 Thread Abraham, Danny
Has anybody faced a problem with reusing a ref cursor?

C1 refcursor;

   stmt := 'select1 ' ;
   open C1 for execute  stmt;
   fetch C1 into rc1;
   close C1;

   stmt := 'select2 ...' ;
   open C1 for execute  stmt;
   fetch C1 into rc2;
   close C1; 

???

I am getting inconsistent errors:   IDTCONTEXT:  PL/pgSQL function .. ) 
line 42 at FETCH

PG Version 9.5.5 on Linux.

Thanks

Danny




Re: The Amazon CloudFront distribution is configured to block access from your country.

2021-04-11 Thread Ron

On 4/11/21 9:12 AM, Israel Brewster wrote:
On Apr 11, 2021, at 1:53 AM, Stephan Knauss > wrote:


Hello Felix,

On 11.04.2021 02:31, felix.quin...@yahoo.com 
 wrote:
I see no reason why ask elsewhere first, the link for the installer 
download is on the Postgresql website, not elsewhere. The most logical 
thing to do is ask here first.


Because it is the Postgresql installer. 
https://www.enterprisedb.com/downloads/postgres-postgresql-downloads


It's unfortunate that your download is blocked. As indicated by others I 
am also wondering why you ask here for community support.


You pointed to a download link which is controlled by a private company 
selling Postgresql services:


Read about this company on an independent website: 
https://en.wikipedia.org/wiki/EnterpriseDB


If you are looking for the download links of the PostgreSQL project, you 
can find it here:


https://www.postgresql.org/download/


Based on your feedback, it is NOT the link listed on the PostgreSQL website,


With all due respect, the link he posted IS the link listed on the 
PostgreSQL website, at least for me. When I go to the link YOU posted, and 
click on MacOS, for example (giving me a URL of 
https://www.postgresql.org/download/macosx/), the FIRST option listed 
there is "Interactive installer by EDB”, which links to 
https://www.enterprisedb.com/downloads/postgres-postgresql-downloads. 
There is no indication on that page that you are linking to a third-party 
package download not supported by PostgreSQL (it does say “certified by 
EDB”, but that doesn’t mean much to a new user, and certainly doesn’t 
indicate a lack of support by PostgreSQL), so it makes total sense that 
someone would think to ask here first when experiencing issues.


If you don’t want to offer assistance, that’s fine, but this link most 
certainly IS the link listed on the PostgreSQL website, at least for 
MacOS. I haven’t checked for other operating systems.




Your comment means that the owners of any web page which links to a third 
party product must support that third-party product, just by virtue of 
supporting it.  That's crazy.


--
Angular momentum makes the world go 'round.


Re: The Amazon CloudFront distribution is configured to block access from your country.

2021-04-11 Thread Israel Brewster
> On Apr 11, 2021, at 1:53 AM, Stephan Knauss  wrote:
> 
> Hello Felix,
> 
> On 11.04.2021 02:31, felix.quin...@yahoo.com wrote:
>> I see no reason why ask elsewhere first, the link for the installer download 
>> is on the Postgresql website, not elsewhere. The most logical thing to do is 
>> ask here first.
> 
>> Because it is the Postgresql installer. 
>> https://www.enterprisedb.com/downloads/postgres-postgresql-downloads
>> 
> It's unfortunate that your download is blocked. As indicated by others I am 
> also wondering why you ask here for community support.
> 
> You pointed to a download link which is controlled by a private company 
> selling Postgresql services:
> 
> Read about this company on an independent website: 
> https://en.wikipedia.org/wiki/EnterpriseDB
> 
> If you are looking for the download links of the PostgreSQL project, you can 
> find it here:
> 
> https://www.postgresql.org/download/
> 
> 
> Based on your feedback, it is NOT the link listed on the PostgreSQL website,

With all due respect, the link he posted IS the link listed on the PostgreSQL 
website, at least for me. When I go to the link YOU posted, and click on MacOS, 
for example (giving me a URL of https://www.postgresql.org/download/macosx/ 
), the FIRST option listed there 
is "Interactive installer by EDB”, which links to 
https://www.enterprisedb.com/downloads/postgres-postgresql-downloads 
. There 
is no indication on that page that you are linking to a third-party package 
download not supported by PostgreSQL (it does say “certified by EDB”, but that 
doesn’t mean much to a new user, and certainly doesn’t indicate a lack of 
support by PostgreSQL), so it makes total sense that someone would think to ask 
here first when experiencing issues.

If you don’t want to offer assistance, that’s fine, but this link most 
certainly IS the link listed on the PostgreSQL website, at least for MacOS. I 
haven’t checked for other operating systems.

---
Israel Brewster
Software Engineer
Alaska Volcano Observatory 
Geophysical Institute - UAF 
2156 Koyukuk Drive 
Fairbanks AK 99775-7320
Work: 907-474-5172
cell:  907-328-9145

> but on a 3rd party website. This is why you got the recommendation to check 
> with them. You also got hints on how you could potentially work around the 
> download restriction by using a VPN.
> 
> 
> Stephan
> 
> 
> 
> 



Re: The Amazon CloudFront distribution is configured to block access from your country.

2021-04-11 Thread obi reddy
As my point of view  better to connect VPN, it's a best option for you and
you can download easily.

On Sun, 11 Apr 2021, 3:23 pm Stephan Knauss, 
wrote:

> Hello Felix,
>
> On 11.04.2021 02:31, felix.quin...@yahoo.com wrote:
> > I see no reason why ask elsewhere first, the link for the installer
> download is on the Postgresql website, not elsewhere. The most logical
> thing to do is ask here first.
>
> > Because it is the Postgresql installer.
> https://www.enterprisedb.com/downloads/postgres-postgresql-downloads
> >
> It's unfortunate that your download is blocked. As indicated by others I
> am also wondering why you ask here for community support.
>
> You pointed to a download link which is controlled by a private company
> selling Postgresql services:
>
> Read about this company on an independent website:
> https://en.wikipedia.org/wiki/EnterpriseDB
>
> If you are looking for the download links of the PostgreSQL project, you
> can find it here:
>
> https://www.postgresql.org/download/
>
>
> Based on your feedback, it is NOT the link listed on the PostgreSQL
> website, but on a 3rd party website. This is why you got the
> recommendation to check with them. You also got hints on how you could
> potentially work around the download restriction by using a VPN.
>
>
> Stephan
>
>
>
>
>


Re: The Amazon CloudFront distribution is configured to block access from your country.

2021-04-11 Thread Stephan Knauss

Hello Felix,

On 11.04.2021 02:31, felix.quin...@yahoo.com wrote:

I see no reason why ask elsewhere first, the link for the installer download is 
on the Postgresql website, not elsewhere. The most logical thing to do is ask 
here first.



Because it is the Postgresql installer. 
https://www.enterprisedb.com/downloads/postgres-postgresql-downloads

It's unfortunate that your download is blocked. As indicated by others I 
am also wondering why you ask here for community support.


You pointed to a download link which is controlled by a private company 
selling Postgresql services:


Read about this company on an independent website: 
https://en.wikipedia.org/wiki/EnterpriseDB


If you are looking for the download links of the PostgreSQL project, you 
can find it here:


https://www.postgresql.org/download/


Based on your feedback, it is NOT the link listed on the PostgreSQL 
website, but on a 3rd party website. This is why you got the 
recommendation to check with them. You also got hints on how you could 
potentially work around the download restriction by using a VPN.



Stephan