Re: Space Stalker in SQL Output

2018-06-27 Thread Susan Hurst
: Susan Hurst writes: Why would a psql statement insert a leading space into the output, which is a single integer value? The leading space caused my job call to fail elsewhere in the same shell script as the psql call. Here is the anonymized version of the psql call to assign a value to a shell

Space Stalker in SQL Output

2018-06-27 Thread Susan Hurst
Why would a psql statement insert a leading space into the output, which is a single integer value? The leading space caused my job call to fail elsewhere in the same shell script as the psql call. Here is the anonymized version of the psql call to assign a value to a shell script

Re: array must have even number of elements

2018-09-20 Thread Susan Hurst
...@brookhurstdata.com Mobile: 314-486-3261 On 2018-09-20 13:04, Pavel Stehule wrote: > Hi > > čt 20. 9. 2018 v 19:55 odesílatel Susan Hurst > napsal: > >> Why must an array have an even number of elements? I need to use a >> trigger function on any table, some of w

array must have even number of elements

2018-09-20 Thread Susan Hurst
Why must an array have an even number of elements? I need to use a trigger function on any table, some of which may have an odd number of columns that I want to cleanse before inserting/updating. Is there a workaround for this? ERROR: array must have even number of elements SQL state:

Displaying Comments in Views

2019-01-28 Thread Susan Hurst
What is the trick for displaying column comments in views? The query below works as expected when the table_schema includes tables, however it shows nothing when the table_schema contains only views. I tried putting the query into an inline statement as a column selection in a wrapper

Re: Displaying Comments in Views

2019-01-28 Thread Susan Hurst
Thx for the great info. I appreciate your pointing me in the right direction. Sue --- Susan E Hurst Principal Consultant Brookhurst Data LLC Email: susan.hu...@brookhurstdata.com Mobile: 314-486-3261 On 2019-01-28 09:27, Tom Lane wrote: Susan

TAbles/Columns missing in information schema

2019-05-10 Thread Susan Hurst
Why would schemas/tables/columns be missing from information_schema.tables/information_schema.columns? We recently promoted some new tables to production but only 2 of the 4 schemas appeared in information_schema.tables/information_schema.columns. The schemas/tables/columns do exist as

Re: TAbles/Columns missing in information schema

2019-05-10 Thread Susan Hurst
PM Susan Hurst > wrote: > >> Why would schemas/tables/columns be missing from >> information_schema.tables/information_schema.columns? > > The user you are using to check information_schema doesn't have permissions > on the objects in question? > > David J.

Re: Permissions for information_schema

2019-05-16 Thread Susan Hurst
The objects are granted SELECT to PUBLIC. --- Susan E Hurst Principal Consultant Brookhurst Data LLC Email: susan.hu...@brookhurstdata.com Mobile: 314-486-3261 On 2019-05-16 11:53, David G. Johnston wrote: > On Thu, May 16, 2019 at 9:50 AM Su

Permissions for information_schema

2019-05-16 Thread Susan Hurst
What are the correct permissions to give to a role so that all objects in the information_schema (and pg_catalog) are visible to a user? Permissions seem to make a difference but I don't know which adjustments to make without causing unintended consequences. We revoked select on all tables

Display View Columns and Their Source Tables and Columns

2019-04-21 Thread Susan Hurst
I'm so close but I can't quite figure out how to match view columns to their source columns in a query. Looks like I might need yet another table to join that makes that match, but I'm not having any success finding such a bridge. Matching views to their source tables works well enough.

Re: Missing Trigger after pgdump install

2019-08-16 Thread Susan Hurst
CREATE TRIGGER subscribers_iur_trg appears on line 5,457,362 --- Susan E Hurst Principal Consultant Brookhurst Data LLC Email: susan.hu...@brookhurstdata.com Mobile: 314-486-3261 On 2019-08-16 13:37, Adrian Klaver wrote: On 8/16/19 11:27 AM, Susan

Missing Trigger after pgdump install

2019-08-16 Thread Susan Hurst
What scenarios can cause a single trigger to be omitted when populating an empty database from a pgdump file? We have nightly backups of our production database that we load into a fresh, empty database in our sandbox using the pgdump file. psql.exe -h localhost -U mi601db -p 5432 -o

Re: Missing Trigger after pgdump install

2019-08-16 Thread Susan Hurst
On 2019-08-16 17:29, Adrian Klaver wrote: On 8/16/19 3:18 PM, Susan Hurst wrote: Production version: PostgreSQL 9.5.0 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-16), 64-bit Sandbox version: "PostgreSQL 9.5.14, compiled by Visual C++ build 1800, 64-bit&

Re: Missing Trigger after pgdump install

2019-08-16 Thread Susan Hurst
Consultant Brookhurst Data LLC Email: susan.hu...@brookhurstdata.com Mobile: 314-486-3261 On 2019-08-16 16:24, Adrian Klaver wrote: On 8/16/19 1:00 PM, Susan Hurst wrote: The dump command used by the DBA to create the pgdump file is: pg_dump --clean --if-exists --create --format=plain

Re: Posible off topic ? pgmodeler

2019-09-02 Thread Susan Hurst
Hi Stan! Don't know if you're interested in pgmodeler specifically or database modelers in general. At work, we use postgresql a lot and have found that DBeaver, which is open source, does a decent job of creating ERD diagrams. Personally, I don't like using DBeaver's interface for

Re: Help : Removal of leading spaces in all the columns of a table

2020-02-12 Thread Susan Hurst
I once wrote a trigger function to do just what you asked, however, it was a huge drain on performance so I didn't use it for long, so I dropped the trigger. Hopefully, someone has a more practical approach. I would be interested in this also. Sue ---

Re: Inexplicable duplicate rows with unique constraint

2020-01-16 Thread Susan Hurst
That's why I created a virtual_string function to squeeze out everything but alpha characters and numbers 0-9 from any varchar or text columns that I want to use as business key columns. For example, if I have a column named job_name, I will have a companion column named v_job_name. The v_

Function Speed vs UI Function Speed

2020-08-31 Thread Susan Hurst
Is there a significant difference in execution speed between similar functions that do the same DML but differ in the extra validations and messaging that are required for providing feedback to UI users? For example, a batch load script that inserts multiple rows into a table may call an

Finding description pg_description

2020-08-26 Thread Susan Hurst
How do I find the source of an objoid from pg_catalog.pg_description? I comment everything in my databases and can find most of the comments in pg_catalog.pd_description, which only gives me objoid and classoid for the source of a comment. If I could find the oid sources I could make this

Re: PG Admin 4

2020-07-10 Thread Susan Hurst
I gave up on PGAdmin4 and went back to PGAdmin3, although 3 is deprecated now. The History tab will show you what you want after executing a SQL statement. I don't use Windows any more than I have to but when I did try PGAdmin4 on windows, the feedback was sometimes there and sometimes not.

shp2pgsql is missing

2020-07-26 Thread Susan Hurst
How can I acquire or download the shp2pgsql file that I need for the tiger geocoder? All of the online searches for a solution have not been helpful. Supposedly, shp2pgsql is supposed to just be there when postgis is installed, but it's not. I even tried updating postgis with: ALTER

Re: shp2pgsql is missing

2020-07-27 Thread Susan Hurst
-Tegeder wrote: ## Susan Hurst (susan.hu...@brookhurstdata.com): OS: FreeBSD 12.1-RELEASE-p7 FreeBSD 12.1-RELEASE-p7 GENERIC amd64 There's your answer: the FreeBSD port of PostGIS 3.0 (databases/postgis30) installs shp2pgsql only if option LOADERGUI has been enabled on the port's build (the port

copy command - something not found

2020-12-29 Thread Susan Hurst
I am trying to use the copy command from a csv files using a UNIX shell script but something is 'not found'...I can't figure out what is 'not found'. Below is my command from the shell script, the executed command, the content of the csv file and the output from trying to execute the command.

Re: Foreign Data Wrapper Handler

2020-11-08 Thread Susan Hurst
~~ Susan E Hurst Principal Consultant Brookhurst Data LLC Email: susan.hu...@brookhurstdata.com Mobile: 314-486-3261 On 2020-11-07 14:51, Adrian Klaver wrote: On 11/7/20 12:44 PM, Susan Hurst wrote: Can anyone recommend a good online resource for learning how to set up a foreign data wrapper usin

Re: Foreign Data Wrapper Handler

2020-11-09 Thread Susan Hurst
?.in pg_hba.conf? --- Susan E Hurst Principal Consultant Brookhurst Data LLC Email: susan.hu...@brookhurstdata.com Mobile: 314-486-3261 On 2020-11-09 11:12, Laurenz Albe wrote: On Sun, 2020-11-08 at 13:09 -0600, Susan Hurst wrote: The first pass thru https://www.postgresql.org/doc

Foreign Data Wrapper Handler

2020-11-07 Thread Susan Hurst
Can anyone recommend a good online resource for learning how to set up a foreign data wrapper using a custom fdw name? It seems the trick is to use a handler to make it work but so far the search results have been elusive for creating a fdw with a successful outcome. I'm using 'PostgreSQL

Re: copy command - something not found

2020-12-29 Thread Susan Hurst
? --- Susan E Hurst Principal Consultant Brookhurst Data LLC Email: susan.hu...@brookhurstdata.com Mobile: 314-486-3261 On 2020-12-29 13:23, David G. Johnston wrote: > On Tuesday, December 29, 2020, Susan Hurst > wrote: > >> ##-- shell script command >> psql -c < ${CSVP

Re: copy command - something not found

2020-12-29 Thread Susan Hurst
efforts to figure out what is not the problem. Thanks for your help! Sue --- Susan E Hurst Principal Consultant Brookhurst Data LLC Email: susan.hu...@brookhurstdata.com Mobile: 314-486-3261 On 2020-12-29 13:55, Tom Lane wrote: Susan Hurst writes

Re: copy command - something not found

2020-12-29 Thread Susan Hurst
"~/mycsvscopycmd.z". Most "PATH" > environment variables don't end in a /, perhaps you need > "${CSVPATH}/copycmd.z" ? Also, as an aside. most UNIX files which end in .z > are compressed, IIRC. Make sure the contents of the file are plain text. > &

Re: FDW to postGIS Database

2022-03-07 Thread Susan Hurst
Thank you, Brent! You told me what I needed to know. --- -- Susan E Hurst Email: susan.hu...@brookhurstdata.com Mobile: 314-486-3261 On 2022-03-06 19:35, Brent Wood wrote: In line below... On Monday, March 7, 2022, 05:36:34 AM GMT+13, Susan Hurst wrote

FDW to postGIS Database

2022-03-06 Thread Susan Hurst
Let say that I have a database named stp. I also have another database named geo that is a PostGIS database for storing geopolitical and geospatial data. I want to set up a foreign data wrapper in stp to connect to geo, so that for each address in stp, I only have to store the primary key