PgAmin view

2023-10-26 Thread Shaozhong SHI
If a PgAmin view is created and tables it queries are missing, what will happen? If a PdAmin view is created, and it may take 20 hours to complete, what will happen? Would views automatically run, when you start the PgAmin? Regards, David

postgres keeps having blocks

2023-10-18 Thread Shaozhong SHI
My postgres is playing up. I terminated session that is causing blocks many time. New block appears. Endless. What should I do? Regards, David

Re: print in plpython not appearing in logs

2022-12-13 Thread Shaozhong SHI
What is brilliant about plpython? Any brilliant examples to look at? On Friday, 2 December 2022, Ludwig Isaac Lim wrote: > I'm having problems wherein my print() statements inside my plpython > stored proc are not appearing in postgresql log. I tried setting the > file=sys.stderr > > To reprodu

How to select based on the condition of a column exists

2022-08-26 Thread Shaozhong SHI
The following does not work. select count(test) from table where exists (select test from table) How to select based on the condition of a column exists? It column test is not exists, a message need to be returned. Regards, David

A function to find errors in groups in a table

2022-06-09 Thread Shaozhong SHI
There is a table full of grouped values like the following nodeid link_type primary 11 outflowlink 1 11 inflowlink 1 11 outflowlink 2 Primary of 1 indicates a primary water course. Primary of 2 indicates a secondary water course. Obvio

Set timeout just on a query?

2022-05-09 Thread Shaozhong SHI
Can timeout be set just on a query? Can we do the following? Begin do a query set timeout Exception report a record End; Regards, David

How to get value wrapped in json?

2022-05-06 Thread Shaozhong SHI
A json object is like this - {3}. How to get the value -3 out of this json object {3} David

Re: parallel-processing multiple similar query tasks - any example?

2022-04-28 Thread Shaozhong SHI
Well, I guess that does not work. Never mind. Regards, David On Thursday, 28 April 2022, Alvaro Herrera wrote: > On 2022-Apr-28, Shaozhong SHI wrote: > > > Expand and explain please. > > No, thanks. > > -- > Álvaro Herrera >

Re: parallel-processing multiple similar query tasks - any example?

2022-04-28 Thread Shaozhong SHI
Expand and explain please. Regards, David On Thursday, 28 April 2022, Alvaro Herrera wrote: > On 2022-Apr-28, Shaozhong SHI wrote: > > > Why sleep(1)? > > It is sleeping to show that they are running concurrently. If it runs > five sleeps of one second each and the wh

Re: parallel-processing multiple similar query tasks - any example?

2022-04-28 Thread Shaozhong SHI
No, No. Why sleep(1)? It should be all active - doing work concurrently. Regards, David On Thu, 28 Apr 2022 at 16:17, Alvaro Herrera wrote: > On 2022-Apr-28, Shaozhong SHI wrote: > > > multiple similar query tasks are as follows: > > > > select * from a_table where

How to set password in psql -h -d -U command line?

2022-04-28 Thread Shaozhong SHI
I tried various ways to set password in psql command line, but got no luck. Can anyone help? Regards, David

parallel-processing multiple similar query tasks - any example?

2022-04-27 Thread Shaozhong SHI
multiple similar query tasks are as follows: select * from a_table where country ='UK' select * from a_table where country='France' and so on How best to parallel-processing such types of multiple similar query tasks? Any example available? Regards, David

Configuration and performance of Postgres/PostGIS

2022-04-21 Thread Shaozhong SHI
Whenever geospatial functions such as St_intersects or recursive query used, the Postgres/PostGIS appears to spawn away to many child queries and just obliterate the CPU. Nothing finishes. That forced me to try out to do the some tasks on the FME server. I tried to use this http://blog.cleverele

Can anyone confirm the flaw of postgres and how to deal with it?

2022-04-20 Thread Shaozhong SHI
I loaded several tables onto Postgres. When you view, you can see all columns. However, there are 'ghost columns' that I remember I used before, but not now. select column_name::text from information_schema.columns where table_name=a_table keeps listing columns that I can not see in the curren

Long running processes and commit writing to disk

2022-04-08 Thread Shaozhong SHI
When long running processes got disrupted, one may not see any expected result. How to make sure that the result of each operation is saved to disk in a loop? Regards, David

how to find out field size?

2022-04-04 Thread Shaozhong SHI
Postgres documentation says: maximum field size is 1 GB. PostgreSQL: Documentation: 12: Appendix K. PostgreSQL Limits So, how to find out the size of column to see how far it from the limit? Regards, David

Re: Re: How long does iteration over 4-5 million rows usually take?

2022-04-02 Thread Shaozhong SHI
Thanks, Karsten, I would like the information to work planning purpose. Regards, David On Sat, 2 Apr 2022 at 14:47, Karsten Hilbert wrote: > > > On Apr 1, 2022, at 10:18 PM, Ron wrote: > > > > > >  On 4/1/22 20:34, Shaozhong SHI wrote: > > >> > &g

How long does iteration over 4-5 million rows usually take?

2022-04-01 Thread Shaozhong SHI
I have a script running to iterate over 4-5 million rows. It keeps showing up in red in PgAdmin. It remains active. How long does iteration over 4-5 million rows usually take? Regards, David

In what situation, a line feature could not be visible in PgAdmin?

2022-03-26 Thread Shaozhong SHI
I simply did the following: Get intersections through self-joining lines table where a.fid not equal to b.fid Put buffered intersections with geometry from lines table together to view. Some odd things were observed. Buffer turned up, but supposed lines did not show. Why does this happen?

How to explicitly lock and unlock tables in pgsql?

2022-03-16 Thread Shaozhong SHI
Table locks present a barrier for progressing queries. How to explicitly lock and unlock tables in pgsql, so that we can guarantee the progress of running scripts? Regards, David

Apparently table locks are the key issue to see red flags

2022-03-16 Thread Shaozhong SHI
Apparently table locks are the key issue to see red flags. As we observe, every time, red marking occurs, there must be some tables are locked. Can anyone shed light into this? Regards, David

Re: frequency of positive and negative numbers, sizes of numbers and frequency of alteration of polarity

2022-02-17 Thread Shaozhong SHI
On Thu, 17 Feb 2022 at 21:20, Thomas Munro wrote: > On Fri, Feb 18, 2022 at 9:11 AM Shaozhong SHI > wrote: > > How to calculate frequency of positive and negative numbers and define > and calculate frequency of alteration of polarity? > > > > Surely, we can use

Re: frequency of positive and negative numbers, sizes of numbers and frequency of alteration of polarity

2022-02-17 Thread Shaozhong SHI
On Thursday, 17 February 2022, Thomas Munro wrote: > On Fri, Feb 18, 2022 at 9:11 AM Shaozhong SHI > wrote: > > How to calculate frequency of positive and negative numbers and define > and calculate frequency of alteration of polarity? > > > > Surely, we can use

frequency of positive and negative numbers, sizes of numbers and frequency of alteration of polarity

2022-02-17 Thread Shaozhong SHI
How to calculate frequency of positive and negative numbers and define and calculate frequency of alteration of polarity? Surely, we can use frequency of alteration of polarity and level of change (e.g., size of positive and negative numbers) to measure degree and frequency of alteration. Any ide

Is there a way to automatically scan a table and determine the format of data

2022-02-15 Thread Shaozhong SHI
Is there a way to automatically scan a table and report the format of data for each column? Regards, David

Operator % and its meaning and use

2022-02-15 Thread Shaozhong SHI
Can anyone remind me of the meaning and use of operator %. It works in one of scripts like WHERE NOT (street_name % designatedname) Regards, David

Turn a json column into a table

2022-02-14 Thread Shaozhong SHI
There is a JSON column in a table. It contains key value pairs, just like a dictionary. What is the best way to turn this column into a data table? Regards, David

Re: Regular Expression For Duplicate Words

2022-02-03 Thread Shaozhong SHI
Hi, Peter, Interesting. On Thu, 3 Feb 2022 at 19:48, Peter J. Holzer wrote: > On 2022-02-02 08:00:00 +0000, Shaozhong SHI wrote: > > regex - Regular Expression For Duplicate Words - Stack Overflow > > > > Is there any example in Postgres? > > It's pretty mu

Re: Can Postgres beat Oracle for regexp_count?

2022-02-03 Thread Shaozhong SHI
Hi, David, Many thanks. I am investigating into transformation of data quality validation through automation with application of Postgres/PostGIS. Regards, David On Thu, 3 Feb 2022 at 13:00, David G. Johnston wrote: > > > On Thursday, February 3, 2022, Shaozhong SHI > wrote: &

Re: Can Postgres beat Oracle for regexp_count?

2022-02-03 Thread Shaozhong SHI
limited explanation on ?:. Is it correct to say that this ?: construction of a regex can be applied for checking whether cell values meet specifications? Regards, David On Thu, 3 Feb 2022 at 05:59, Tom Lane wrote: > Shaozhong SHI writes: > > The following has been attempted but n

Re: Can Postgres beat Oracle for regexp_count?

2022-02-02 Thread Shaozhong SHI
Hi, Tom, Lane, On Wed, 2 Feb 2022 at 22:26, Tom Lane wrote: > "David G. Johnston" writes: > > Given we don't have a regexp_count function this isn't surprising... > > FYI, it's there in HEAD. > > In the meantime, you could possibly do something like > > =# select count(*) from regexp_matches('M

Can Postgres beat Oracle for regexp_count?

2022-02-02 Thread Shaozhong SHI
It has been found that regexp_count works brilliantly in Oracle. However, it is not easy to replicate that in Postgres. The following codes have been experimented but without any luck. select regexp_matches('My High Street', '([A-Z][a-z]+[\s])', 'g') select regexp_matches('My High Street', '([A

Regular Expression For Duplicate Words

2022-02-02 Thread Shaozhong SHI
This link is interesting. regex - Regular Expression For Duplicate Words - Stack Overflow Is there any example in Postgres? Regards, David

Re: Counting the number of repeated phrases in a column

2022-02-01 Thread Shaozhong SHI
On Tue, 25 Jan 2022 at 17:10, Shaozhong SHI wrote: > There is a short of a function in the standard Postgres to do the > following: > > It is easy to count the number of occurrence of words, but it is rather > difficult to count the number of occurrence of phrases. > > For

Re: Counting the number of repeated phrases in a column

2022-02-01 Thread Shaozhong SHI
On Thursday, 27 January 2022, Merlin Moncure wrote: > On Wed, Jan 26, 2022 at 5:23 PM Merlin Moncure wrote: > > > > with s as (select 'Hello World Hello World' as sentence) > > select > > phrase, > > array_upper(string_to_array((select sentence from s), phrase), 1) - > > 1 as occurrances > >

Re: Counting the number of repeated phrases in a column

2022-01-26 Thread Shaozhong SHI
On Tue, 25 Jan 2022 at 17:10, Shaozhong SHI wrote: > There is a short of a function in the standard Postgres to do the > following: > > It is easy to count the number of occurrence of words, but it is rather > difficult to count the number of occurrence of phrases. > > For

Re: Counting the number of repeated phrases in a column

2022-01-26 Thread Shaozhong SHI
On Tue, 25 Jan 2022 at 21:33, Ivan Panchenko wrote: > > On 26.01.2022 00:21, benj@laposte.net wrote: > > Le 25/01/2022 à 18:10, Shaozhong SHI a écrit : > >> There is a short of a function in the standard Postgres to do the > >> following: > >>

Re: Counting the number of repeated phrases in a column

2022-01-25 Thread Shaozhong SHI
How about split up the value into individual words and keep their orders? add words up to form individual phrase and ensure that each phrase only consists unique/distinct words count repeated phrases afterward How about this? Regards, David On Tue, 25 Jan 2022 at 17:22, Karsten Hilbert wrote:

Counting the number of repeated phrases in a column

2022-01-25 Thread Shaozhong SHI
There is a short of a function in the standard Postgres to do the following: It is easy to count the number of occurrence of words, but it is rather difficult to count the number of occurrence of phrases. For instance: A cell of value: 'Hello World' means 1 occurrence a phrase. A cell of value

Re: Robust ways for checking allowed values in a column

2022-01-25 Thread Shaozhong SHI
How about adding null as an alteration. Would this be robust? Regards, David On Tue, 25 Jan 2022 at 14:25, David G. Johnston wrote: > On Tue, Jan 25, 2022 at 6:56 AM Shaozhong SHI > wrote: > >> select form from mytable where form ~ >> '^Canal$|^Drain$|^Fore

Robust ways for checking allowed values in a column

2022-01-25 Thread Shaozhong SHI
I tried the following: select form from mytable where form ~ '^Canal$|^Drain$|^Foreshore$|^inlandRiver$|^Lake$|^lockOrFlightOfLocks$|^Marsh$|^Researvoir$|^Sea$|^tidalRiver$|^Transfer$' I used ^ and $ to ensure checking of allowed values. However, 'Backyard' was selected. Why is that? Regards

Re: Query on postgres_fdw extension

2022-01-21 Thread Shaozhong SHI
Any functional code to be tested to confirm? Regards, David On Fri, 21 Jan 2022 at 15:55, Laurenz Albe wrote: > On Fri, 2022-01-21 at 14:33 +, Duarte Carreira wrote: > > If we just create the 2 foreign tables, one complete and one without id, > > you can simply insert into the table withou

Re: Can commands be typed in to view geometry in PgAdmin?

2022-01-21 Thread Shaozhong SHI
ection that describes how to view, and possibly edit, data > in pgAdmin4. > > David J. > > > On Fri, Jan 21, 2022 at 5:52 AM Shaozhong SHI > wrote: > >> I just wonder whether commands can be typed in PgAdmin to view geometries. >> >> Regards, >> >> David >> >

Can commands be typed in to view geometry in PgAdmin?

2022-01-21 Thread Shaozhong SHI
I just wonder whether commands can be typed in PgAdmin to view geometries. Regards, David

PgAdmin is struggling and can we configure it so that it works better

2022-01-21 Thread Shaozhong SHI
Some time, PgAdmin freezes and its response is very slow. Some time, it gives strange display of table content. Perhaps, it is related to the fact that PgAdmin is struggling with the amount of data it thinks that it has to display. I just wonder whether we can configure PgAdmin so that it will w

Re: psql does not provide proper response

2022-01-20 Thread Shaozhong SHI
Added. But only head of columns appeared. Any way to visualise? Regards, David On Thursday, 20 January 2022, Rob Sargent wrote: > On 1/20/22 10:54, Shaozhong SHI wrote: > > I do not know what happened. > > psql does not provide proper response anymore. > > I typed the foll

psql does not provide proper response

2022-01-20 Thread Shaozhong SHI
I do not know what happened. psql does not provide proper response anymore. I typed the following and see nothing. user=# select * from boundaryline.scotland_and_wales_const_region user-# Can anyone enlighten me? Regards, David

How to schedule running of a script?

2022-01-18 Thread Shaozhong SHI
Can a script be scheduled to run within Postgres? Regards, David

Re: How can a Postgres SQL script be automatically run when a new table turns up?

2022-01-13 Thread Shaozhong SHI
Hi, Jay, That looks interesting. Is there an excellent example to do the following? How to create an event trigger in Postgres? When a user finished loading a new table on to it, the trigger can start off an script 10 minutes after the event? Regards, David On Thu, 13 Jan 2022 at 10:50, Jaya

How can a Postgres SQL script be automatically run when a new table turns up?

2022-01-13 Thread Shaozhong SHI
When a user load a new table in the Postgres System? Can a script automatically detect it and run? Regards, David

Re: How best to create and use associative array type in Postgres?

2022-01-05 Thread Shaozhong SHI
Have a look at this one. GitHub - theory/kv-pair: A key/value pair data type for PostgreSQL <https://github.com/theory/kv-pair> There is no documentation on how to use it. Regards, David On Wed, 5 Jan 2022 at 16:24, Tom Lane wrote: > Shaozhong SHI writes: > > What do you thi

Re: How best to create and use associative array type in Postgres?

2022-01-05 Thread Shaozhong SHI
What do you think this attempt by using create type and create a function? Managing Key/Value Pairs in PostgreSQL (justatheory.com) <https://justatheory.com/2010/08/postgres-key-value-pairs/> Regards, David On Wed, 5 Jan 2022 at 14:54, Tom Lane wrote: > Shaozhong SHI writes: > &

Re: Create and access a dictionary type

2022-01-05 Thread Shaozhong SHI
I just checked operators. I could not find any operator to set a new value given a key. Regards, David On Wed, 5 Jan 2022 at 13:22, Tomas Vondra wrote: > On 1/5/22 14:17, Shaozhong SHI wrote: > > Any examples in Postgres to create a dictionary type to store and access > >

Create and access a dictionary type

2022-01-05 Thread Shaozhong SHI
Any examples in Postgres to create a dictionary type to store and access key value pairs? Regards, David

How best to create and use associative array type in Postgres?

2022-01-05 Thread Shaozhong SHI
In Oracle, one can create and use associative array. For instance, TYPE FID_MEASURE IS TABLE OF NUMBER INDEX BY VARCHAR2(38); NODES_WAITING FID_SET; How best to create and use associative array type in Postgres? Or, what is the best/most efficient equivalent in Postgres? Regards, David

Re: Can we use sql language to create a function in Postgres?

2022-01-05 Thread Shaozhong SHI
Any online documentation or examples for using Oracle SQL in Postgres? Regards, David On Wed, 5 Jan 2022 at 11:22, Shaozhong SHI wrote: > If so, can we use Oracle SQL script in DO block? > > Does this mean that all Oracle SQL can be used in Postgres? > > Regards, > > Da

Re: Can we use sql language to create a function in Postgres?

2022-01-05 Thread Shaozhong SHI
If so, can we use Oracle SQL script in DO block? Does this mean that all Oracle SQL can be used in Postgres? Regards, David On Wed, 5 Jan 2022 at 11:12, hubert depesz lubaczewski wrote: > On Wed, Jan 05, 2022 at 11:04:34AM +0000, Shaozhong SHI wrote: > > I was given an Oracle script

Can we use sql language to create a function in Postgres?

2022-01-05 Thread Shaozhong SHI
I was given an Oracle script. Can we use sql language to create a function in Postgres? Regards, David

How best to turn select result into options like 'a|b|c''

2021-12-20 Thread Shaozhong SHI
Is there a way to turn select result into something like 'a|b|c' . Regards, David

Re: How to ensure column names are double quoted while using execute format when building a stored procedure?

2021-12-16 Thread Shaozhong SHI
I did make it to work and have been experimenting on a number of ways. But it just does not produce expected results. Regards, David On Thu, 16 Dec 2021 at 21:25, David G. Johnston wrote: > On Thu, Dec 16, 2021 at 2:11 PM Shaozhong SHI > wrote: > >> When I used SQL identif

Re: How to ensure column names are double quoted while using execute format when building a stored procedure?

2021-12-16 Thread Shaozhong SHI
eplicated in Execute Format. Regards, David On Thu, 16 Dec 2021 at 20:24, David G. Johnston wrote: > On Thu, Dec 16, 2021 at 1:21 PM Shaozhong SHI > wrote: > >> The following command runs but does not produce results as expected. >> >> Execute Format('insert

How to ensure column names are double quoted while using execute format when building a stored procedure?

2021-12-16 Thread Shaozhong SHI
The following command runs but does not produce results as expected. Execute Format('insert into stats select %L as id, %2$L as checks, count(%3$s) from %4$s where %5$s is null', i, 'count of nulls in '||col, col, t_name, col); There should be a lot of nulls in columns, but it produces o count.

Re: Detecting repeated phrase in a string

2021-12-09 Thread Shaozhong SHI
Hi, Peter, How to define word boundary as either by using ^ , space, or $ So that the following can be done fox fox is a repeat foxfox is not a repeat but just one word. Regards, David On Thu, 9 Dec 2021 at 13:35, Peter J. Holzer wrote: > On 2021-12-09 12:38:15 +0000, Shaozhong SHI wr

Detecting repeated phrase in a string

2021-12-09 Thread Shaozhong SHI
Does anyone know how to detect repeated phrase in a string? Is there any such function? Regards, David

Use tsquery to check out occurrence of the same phrase in a cell

2021-12-09 Thread Shaozhong SHI
Are there good examples for using tsquery to check out occurrence of the same phrase in a cell? Regards, David

Re: How to allow null as an option when using regexp_matches?

2021-12-08 Thread Shaozhong SHI
Hi, Karsten, That sounds interesting. Any good example? Regards, David On Wed, 8 Dec 2021 at 12:10, Karsten Hilbert wrote: > Am Wed, Dec 08, 2021 at 12:07:13PM + schrieb Shaozhong SHI: > > > We can do this: > > select count(*) from regexp_matches('Great Lon

How to allow null as an option when using regexp_matches?

2021-12-08 Thread Shaozhong SHI
We can do this: select count(*) from regexp_matches('Great London', 'Great London|Information Centre|Department for Transport', 'g'); Is it possible to allow null as an option? something like this select count(*) from regexp_matches('Great London', 'null|Great London|Information Centre|Department

Re: How to reveal the codes of functions properly?

2021-11-30 Thread Shaozhong SHI
In what environment, that did not work. On Tuesday, 30 November 2021, Rob Sargent wrote: > On 11/30/21 9:30 AM, Shaozhong SHI wrote: > > Any one can shed the light on this? > > Regards, > > David > > \sf+ function_name >

How to reveal the codes of functions properly?

2021-11-30 Thread Shaozhong SHI
Any one can shed the light on this? Regards, David

Match 2 words and more

2021-11-27 Thread Shaozhong SHI
this is supposed to find those to have 2 words and more. select name FROM a_table where "STREET_NAME" ~ '^[[:alpha:]+ ]+[:alpha:]+$'; But, it finds only one word as well. It appears that regex is not robust. Can anyone shed light on this? Regards, David

Merge into does not work

2021-11-26 Thread Shaozhong SHI
CREATE TABLE Stock(item_id int UNIQUE, balance int); INSERT INTO Stock VALUES (10, 2200); INSERT INTO Stock VALUES (20, 1900); CREATE TABLE Buy(item_id int, volume int); INSERT INTO Buy values(10, 1000); INSERT INTO Buy values(30, 300); MERGE INTO Stock USING Buy ON Stock.item_id = Buy.item_id

Re: Best examples of cardinality check and associated functions

2021-11-25 Thread Shaozhong SHI
Hi, Rob, I am reviewing robust automation to do so and promote the best practice. Regards, David D On Thu, 25 Nov 2021 at 22:24, Rob Sargent wrote: > > > > On Nov 25, 2021, at 3:16 PM, Shaozhong SHI > wrote: > > > >  > > I wonder whether the Postgres commu

Best examples of cardinality check and associated functions

2021-11-25 Thread Shaozhong SHI
I wonder whether the Postgres community has got the best examples of cardinality check and associated functions. Regards, David

function difference not found

2021-11-25 Thread Shaozhong SHI
Function difference not found. Should an extension created for finding it? Regards, David

How to set alias data type?

2021-11-24 Thread Shaozhong SHI
select 'Total' as Total generate result that set Total as a column name with unknown type When trying to cast select 'Total' as Total:: text It simply does not work. Regards, David

Re: Regex for Word space Word space Word ....

2021-11-23 Thread Shaozhong SHI
Hi, David J, Any good example of doing test on array? Regards, David On Tuesday, 23 November 2021, David G. Johnston wrote: > On Tue, Nov 23, 2021 at 2:58 AM Shaozhong SHI > wrote: > >> Is there any regex for Word space Word space Word and more? >> >> > What p

Re: Regex for Word space Word space Word ....

2021-11-23 Thread Shaozhong SHI
It only matches First Street from 'My First Street'. I was trying to make it to match words starting capital letter only. Regards, David On Tue, 23 Nov 2021 at 10:59, chlor wrote: > On Tue, Nov 23, 2021 at 11:51 AM Shaozhong SHI > wrote: > >> I tried nested regex

Re: Regex for Word space Word space Word ....

2021-11-23 Thread Shaozhong SHI
I tried nested regex '[[A-Z][a-z] ]+[[A-Z][a-z]]' but it did not work. Regards, David On Tue, 23 Nov 2021 at 09:58, Shaozhong SHI wrote: > Is there any regex for Word space Word space Word and more? > > Regards, > > David >

Regex for Word space Word space Word ....

2021-11-23 Thread Shaozhong SHI
Is there any regex for Word space Word space Word and more? Regards, David

Why swirling circles in pgAdmin?

2021-11-22 Thread Shaozhong SHI
Why there are swirling circles in pgAdmin and no expansion to view details? Regards, David

Why in pgAdmin an active session is marked/highlighted in Red

2021-11-11 Thread Shaozhong SHI
I never came across this before and wonder why? Regards, David

Regex for (A) and (B) to find in Bus Stop (A) or (B)

2021-11-03 Thread Shaozhong SHI
What is the regex for (A) and (B) to find in Bus Stop (A) or (B)? Regards, David

Regex for (A) and (B) to find in Bus Stop (A) or (B)

2021-11-03 Thread Shaozhong SHI
What is the regex for (A) and (B) to find in Bus Stop (A) or (B)? Regards, David

Re: DBeaver does not show all tables in a Schema

2021-10-29 Thread Shaozhong SHI
On Fri, 29 Oct 2021 at 14:53, Ryan Booz wrote: > In a recent update (not sure when), the default for DBeaver seems to have > changed so that the navigator view is set to "simple", rather than > "advanced" which shows all objects. > > Right-click the server -> edit connection -> Select "General" -

Re: DBeaver does not show all tables in a Schema

2021-10-29 Thread Shaozhong SHI
apply a filter for certain database, I > forget to remove it, then open another database, and some or all tables > do not appear in the navigator. > > > On 29/10/2021 12:46, Shaozhong SHI wrote: > > I used a DBeaver to connect to postgres but it does not show all > > tab

DBeaver does not show all tables in a Schema

2021-10-29 Thread Shaozhong SHI
I used a DBeaver to connect to postgres but it does not show all tables in a schema. Can anyone shed light on this? Regards, David

Re: Fault with initcap

2021-10-12 Thread Shaozhong SHI
On Tue, 12 Oct 2021 at 23:02, Adrian Klaver wrote: > On 10/12/21 13:50, Shaozhong SHI wrote: > > > > > > On Tue, 12 Oct 2021 at 20:34, Adrian Klaver > > > > Which follows the definition here: > > > > https://www.postgresql.org

Re: Fault with initcap

2021-10-12 Thread Shaozhong SHI
On Tue, 12 Oct 2021 at 20:34, Adrian Klaver wrote: > On 10/12/21 09:31, Shaozhong SHI wrote: > > I tried initcap and found a major problem with it. > > What Postgres version? > > In version 12 and 14 I get: > > > > > Initcap of notemachine is NoteMach

Fault with initcap

2021-10-12 Thread Shaozhong SHI
I tried initcap and found a major problem with it. Initcap of notemachine is NoteMachine. Initcap of Sainsbury's Bank is Sainsbury'S bank. This is not expected. Anyway to get around this problem? Regards, David

Re: Testing of a fast method to bulk insert a Pandas DataFrame into Postgres

2021-10-04 Thread Shaozhong SHI
Hello, Adrian Klaver, What is the robust way to upgrade Pandas? Regards, David On Monday, 4 October 2021, Adrian Klaver wrote: > On 10/4/21 9:20 AM, Shaozhong SHI wrote: > >> Hello, Adrian Klaver, >> >> Pandas version is 0.23.0. >> > > The reason the below

Re: Testing of a fast method to bulk insert a Pandas DataFrame into Postgres

2021-10-04 Thread Shaozhong SHI
public', if_exists='append', index=False, method=psql_insert_copy) I could not find obvious reasons. Regards, David On Mon, 4 Oct 2021 at 17:06, Adrian Klaver wrote: > On 10/4/21 8:44 AM, Shaozhong SHI wrote: > > > > Has anyone tested this one? > > A Fast Me

Testing of a fast method to bulk insert a Pandas DataFrame into Postgres

2021-10-04 Thread Shaozhong SHI
Has anyone tested this one? A Fast Method to Bulk Insert a Pandas DataFrame into Postgres · Ellis Valentiner I tried psql_insert_copy method, but I got the following error message. to_sql() got an unexpec

How to set up temporary path for starting up psql in any folder?

2021-10-04 Thread Shaozhong SHI
How to set up temporary path for starting up psql in any folder? I do not want to disrupt existing settings of paths. Regards, David

Re: PostgreSQL CHECK Constraint

2021-10-03 Thread Shaozhong SHI
> forwarding options, you can read about them here: > > On 03.10.21 20:16, Shaozhong SHI wrote: > > Hi, Christian, > > That is interesting. Can errors be captured and saved as data with > > scripting? > > Yes that works quite the same, e.g. in Pyt

Re: PostgreSQL CHECK Constraint

2021-10-03 Thread Shaozhong SHI
Hi, Kirsten, That sounds brilliant. Are there any examples on the web these days? Regards, David On Sunday, 3 October 2021, Karsten Hilbert wrote: > Am Sun, Oct 03, 2021 at 07:16:32PM +0100 schrieb Shaozhong SHI: > > > That is interesting. Can errors be captured and saved

Re: PostgreSQL CHECK Constraint

2021-10-03 Thread Shaozhong SHI
Hi, Christian, That is interesting. Can errors be captured and saved as data with scripting? Regards, David On Sunday, 3 October 2021, Christian Ramseyer wrote: > > > On 03.10.21 09:31, Shaozhong SHI wrote: > > > > Has anyone got experience with data quality che

PostgreSQL CHECK Constraint

2021-10-03 Thread Shaozhong SHI
Has anyone got experience with data quality checking, validation and reporting within PostgreSQL? How best to use PostgreSQL CHECK Constraint for data quality checking, validation and reporting? Can we report on errors in a detailed and specific way? For instance, can we produce report on specif

Is it possible to compare a long text string and fuzzy match only phrases contained in?

2021-01-17 Thread Shaozhong SHI
We are looking for working examples of comparing a long text string and fuzzy-matching multiple words (namely, phrases) contained in. Any such work examples? Regards, David

Postgres as a service for supporting common application users

2020-09-17 Thread Shaozhong SHI
Dear All, To further promote the use of PostgreSQL as a service, we need working examples for common application users to understand what to do, and to prepare data resources for them. These users may use PowerBI, Excel, graphical packages and more specialist applications such as ArcGIS. Are ther

Re: Most effective and fast way to load few Tbyte of data from flat files into postgresql

2020-08-27 Thread Shaozhong SHI
On Tue, 25 Aug 2020 at 12:24, Peter J. Holzer wrote: > On 2020-08-24 21:17:36 +, Dirk Krautschick wrote: > > what would be the fastest or most effective way to load few (5-10) TB > > of data from flat files into a postgresql database, including some 1TB > > tables and blobs? > > > > There is

  1   2   >