SV: compiling postgres on windows - how to deal with unmatched file extension?

2022-12-13 Thread Niels Jespersen
>I'm trying to build postgresql from source code on windows. The build ran into >a bunch of errors like > >'src/backend/bootstrap/bootparse.c': No such file or directory >src/backend/parser/gram.c': No such file or directory > >These .c files are referenced in postgres.vcxproj. They actual exist

SV: GSSAPI authentication

2022-06-06 Thread Niels Jespersen
Thank you for your suggestion. I arrived at the same suspicion. And that was it. Reverse DNS was not set up correctly. Fra: Michael van der Kolff Sendt: 6. juni 2022 15:50 Til: Niels Jespersen Cc: pgsql-general list Emne: Re: GSSAPI authentication From the tiny bit I know about

SV: GSSAPI authentication

2022-06-06 Thread Niels Jespersen
Fra: Michael van der Kolff Sendt: 6. juni 2022 14:26 Til: Niels Jespersen Cc: pgsql-general list Emne: Re: GSSAPI authentication >This sounds like your PG service was unable to authenticate itself to AD. > >There's probably a trick to that somewhere - AD doesn't really want to be a

GSSAPI authentication

2022-06-06 Thread Niels Jespersen
xxxlocal include_realm=0 krb_realm=""XXX.LOCAL""""""","client backend",,-3382135431624836920 We are a bit lost here. What are we missing? Regards Niels Jespersen

Logon via GSSAPI from Linux fails, but works from Windows

2022-05-13 Thread Niels Jespersen
"authentication",2022-05-13 18:14:01 CEST,2/14544,0,FATAL,28000,"GSSAPI authentication failed for user ""yyy""","Connection matched pg_hba.conf line 15: ""hostall all 172.0.0.0/8 gss map=xxxlocal include_realm=0 krb_realm=""XXX.LOCAL""""""","client backend",,-3382135431624836920 Are we forgetting to set something up? Regards Niels Jespersen

Folding of case of identifiers

2022-01-11 Thread Niels Jespersen
f these three create tables, the two first succeed, the last one does not (G and g is equivalent, Æ and æ is not). create table æblegrød (a int, køn text); create table ÆblegrØd (a int, køn text); create table ÆbleGrØd (a int, køn text); Can anyone explain the logic that rules this. Regards Niels Jespersen

SV: Possibilities for optimizing inserts across oracle_fdw foreign data wrapper

2021-09-21 Thread Niels Jespersen
-Oprindelig meddelelse- >Fra: Laurenz Albe >Sendt: 20. september 2021 15:18 >Til: Niels Jespersen ; pgsql-gene...@postgresql.org >Emne: Re: Possibilities for optimizing inserts across oracle_fdw foreign data >wrapper > >On Sun, 2021-09-19 at 10:28 +, Niels J

Possibilities for optimizing inserts across oracle_fdw foreign data wrapper

2021-09-19 Thread Niels Jespersen
that? If I could make the Oracle insert direct load, that would usually also increase throughput. But, is that possible here. There are no constraints defined on the destinaton tables. Regards Niels Jespersen

SV: cpu-intensive immutable function and parallel scan

2021-06-22 Thread Niels Jespersen
>Fra: David Rowley Sendt: 22. juni 2021 09:10 >Emne: Re: cpu-intensive immutable function and parallel scan >On Tue, 22 Jun 2021 at 19:06, Niels Jespersen wrote: >> I think I could achieve some speedup by parallelizing further, distributing >> the cpu-work among additional

cpu-intensive immutable function and parallel scan

2021-06-22 Thread Niels Jespersen
Hello all I have a cpu-intensive plpython3u function that computes a result on the value from a single column value from a simple select.This looks largely like this. select function_name (t1.val1, 'constant1') from t1 where t1.p = '202012_1' and t1.val1 is not null; The function is marked

SV: force partition pruning

2021-05-11 Thread Niels Jespersen
Fra: David Rowley Sendt: 12. maj 2021 02:34 >> >> ok i think i just may be there is very less data , hence no index scan, no >> pruning. >> >> when i try to force seq_scan off, >> > >Unfortunately, no run-time pruning occurred in the above plan. > >The fact that the above plan uses Append

SV: force partition pruning

2021-05-11 Thread Niels Jespersen
> >Sorry, > >I made a major mistake. I somehow saw the period and period_version as the >same. >so, yes partitions are not pruned here. So my suggestion makes no sense. Thats quite ok. I think my plan now is to have a table returning function that executes a query dynamically. The query has a

force partition pruning

2021-05-10 Thread Niels Jespersen
a table returning function since that must list the columns present. Best regards Niels Jespersen Chief Adviser IT Center Mobile phone:+45 42 42 93 73 Email: n...@dst.dk Statistics Denmark, Sejrøgade 11, DK-2100 Copenhagen www.dst.dk/en<https://www.dst.dk/en> | Twitter<https://twitter.

SV: where clauses including timstamptz and intervals

2021-04-16 Thread Niels Jespersen
>-Oprindelig meddelelse- >Fra: Francisco Olarte >Sendt: 10. april 2021 09:31 >Til: Niels Jespersen > >Although it is equivalent I would suggest to use: > >f.r_time< ('2020-10-01 00:00:00+00'::timestamptz at time zone 'utc' + interval >'1 month') at time zo

SV: where clauses including timstamptz and intervals

2021-04-09 Thread Niels Jespersen
>-Oprindelig meddelelse- >Fra: Tom Lane >Emne: Re: where clauses including timstamptz and intervals > >Ron writes: >> On 4/9/21 5:24 AM, hubert depesz lubaczewski wrote: >>> For example, in my timezone: >>> >>> (1 row) >>> >>> Please note that there is 1 hour difference. >>> The

where clauses including timstamptz and intervals

2021-04-09 Thread Niels Jespersen
ptz and f.r_time < ('2020-10-01 00:00:00+00'::timestamptz + interval '1 month'); select f.xx from f where f.r_time >= '2020-10-01 00:00:00+00'::timestamptz and f.r_time < ('2020-11-01 00:00:00+00'::timestamptz); Regards Niels Jespersen

SV: design partioning scheme for selecting from latest partition

2021-03-22 Thread Niels Jespersen
>Fra: Francisco Olarte >Sendt: 22. marts 2021 20:04 >Til: Niels Jespersen >Cc: pgsql-general@lists.postgresql.org >Emne: Re: design partioning scheme for selecting from latest partition > >Niels: > >On Mon, Mar 22, 2021 at 3:40 PM Niels Jespersen wrote: >..

design partioning scheme for selecting from latest partition

2021-03-22 Thread Niels Jespersen
. Is there another way to do this in a cheaper way. For now I have created a materialized view based on the select above, thus only scanning for max partition only once. Niels Jespersen

SV: Log files polluted with permission denied error messages after every 10 seconds

2021-03-08 Thread Niels Jespersen
> > >Fra: Andrus >Sendt: 8. marts 2021 23:24 >Emne: Re: Log files polluted with permission denied error messages after every >10 seconds > >Permission denied error occur in Windows. Debian logs doesnt contain it. >In Windows also pg_database_size('mydb') and similar ones fail frequently >with

SV: Insertion time is very high for inserting data in postgres

2021-02-10 Thread Niels Jespersen
py-to-and-copy-from This is THE way of high-performant inserts using Postgres. Regards Niels Jespersen

SV: table returning function for each row in other resultset

2021-02-03 Thread Niels Jespersen
Fra: David G. Johnston Sendt: 3. februar 2021 16:08 >On Wed, Feb 3, 2021 at 8:01 AM Niels Jespersen wrote: >Hello all > >I have som data in a resultset. E.g: > >id date_begin date_end amount >1 2021-01-04 2021-02-06 100 >2 2021-03-17 2021-05-11 234 > >I h

SV: SV: Npgsql and the Connection Service File

2021-02-03 Thread Niels Jespersen
hers manage this? >> >>Either they don't or they write their own class that does that. >> >>Perhaps you should contact Npgsql and suggest such a feature. >> >Yes, thank you. >I did just that. It turns out there is already an existing pull request with >exactly th

table returning function for each row in other resultset

2021-02-03 Thread Niels Jespersen
-17,2021-03-31,63.818182 2,2021-04-01,2021-04-30,127.636364 2,2021-05-01,2021-05-11,46.8 How can I accomplish this, please. Regards Niels Jespersen

SV: SV: Npgsql and the Connection Service File

2021-02-01 Thread Niels Jespersen
>On Sat, 2021-01-30 at 15:56 +0000, Niels Jespersen wrote: >> It would be nice if Npgsql (and jdbc and others) emulated the libpq >> behaviour. >> Because in my mind, abstracting hostname, portnumber and databasename >> away is a really useful feature.

SV: Npgsql and the Connection Service File

2021-01-30 Thread Niels Jespersen
> > >-Oprindelig meddelelse- >Fra: Laurenz Albe >Sendt: 29. januar 2021 20:14 >Til: Niels Jespersen ; pgsql-general@lists.postgresql.org >Emne: Re: Npgsql and the Connection Service File > >On Fri, 2021-01-29 at 14:13 +, Niels Jespersen wrote: >

Npgsql and the Connection Service File

2021-01-29 Thread Niels Jespersen
Hello all Is there a way to get Npgsql understand the Connection Service File (https://www.postgresql.org/docs/13/libpq-pgservice.html). ? The purpose is to abstract physical details such as hostname, portnumber away from the application. Regards Niels Jespersen

Re: time-based range partitioning and truncate/delete different timezones

2021-01-15 Thread Niels Jespersen
Fra: Michael Lewis Dato: 15. januar 2021 kl. 19.49.32 CET Til: Niels Jespersen Cc: pgsql-gene...@postgresql.org Emne: Re: time-based range partitioning and truncate/delete different timezones What version are you using? How long are you keeping data

time-based range partitioning and truncate/delete different timezones

2021-01-15 Thread Niels Jespersen
? Delete from t where t.timecolumn between a and b, and reinsert the new data. My instinct says no, but I cannot really think of a good alternative. It is 100 million rows with 5 or 6 numeric columns. Regards Niels Jespersen

SV: Tools showing table partitions as tables in listings of tables

2020-12-09 Thread Niels Jespersen
>> A small irritation point is that some tools decide that partitions >> under a table are to be shown in a list of tables, sometimes drowning the >> main table in a sea of partitions. > >While this doesn't answer your question directly, but when I had this problem, >I simply moved partitions

Tools showing table partitions as tables in listings of tables

2020-12-09 Thread Niels Jespersen
and these queries are naive in respect to table partitions. Any ideas for working around this? Naming partitions in a special manner, something else. It's not the end of the world, but quite irritating for some users. Regards Niels Jespersen

SV: PostgreSQL on Windows' state

2020-09-23 Thread Niels Jespersen
-Oprindelig meddelelse- >Fra: Alessandro Dentella >Sendt: 23. september 2020 10:38 >Til: pgsql-general >Emne: PostgreSQL on Windows' state > >Hi, > >disclaimer: I've never been a Windows user and I send this email just on >behalf of a friend that has problems convincing his team to use

SV: Foreign tables, user mappings and privilege setup

2020-09-22 Thread Niels Jespersen
>>On Mon, 2020-09-21 at 08:21 +, Niels Jespersen wrote: >> create user mapping for current_user server s... (user 'remoteuser', >> password 'remotepassword'); >> >> create foreign table t ( a int) server s... options (table_name >> 't_remote');

Foreign tables, user mappings and privilege setup

2020-09-21 Thread Niels Jespersen
it. Shoot. Regards Niels Jespersen

SV: Kerberos-Postgresql implementation for user authentication

2020-07-09 Thread Niels Jespersen
Fra: Brajendra Pratap Singh Sendt: 9. juli 2020 09:05 Til: pgsql-gene...@postgresql.org Emne: Kerberos-Postgresql implementation for user authentication Hi, Please share the steps to implement the Kerberos with postgresql for user authentication purpose. Also share the document if any.

SV: SV: Using Postgres jdbc driver with Oracle SQL Developer

2020-07-07 Thread Niels Jespersen
-Oprindelig meddelelse- >Fra: legrand legrand >Sendt: 6. juli 2020 17:36 >Til: pgsql-gene...@postgresql.org >Emne: Re: SV: Using Postgres jdbc driver with Oracle SQL Developer > >Try Replacing hostname by hostname/Database? >Don’t Forget ? > >Regards >Pascal Ha! Thats it!. Almost. Its

SV: Using Postgres jdbc driver with Oracle SQL Developer

2020-07-06 Thread Niels Jespersen
Sorry, "way to provide a default username" should have been "way to provide a default databasename" Fra: Niels Jespersen Sendt: 6. juli 2020 13:20 Til: pgsql-general@lists.postgresql.org Emne: Using Postgres jdbc driver with Oracle SQL Developer Hello all Oracle SQL

Using Postgres jdbc driver with Oracle SQL Developer

2020-07-06 Thread Niels Jespersen
meters is says "If a property is specified both in URL and in Properties object, the value from Properties object is ignored." How can I inject a property object into the gap between Oracle and Postgres jdbc? Regards Niels Jespersen

SV: SV: pg_service.conf and client support

2020-06-15 Thread Niels Jespersen
Fra: Laurenz Albe Sendt: 15. juni 2020 15:36 Til: Niels Jespersen ; pgsql-gene...@postgresql.org Emne: Re: SV: pg_service.conf and client support On Mon, 2020-06-15 at 11:58 +, Niels Jespersen wrote: > > For your examples that means: > > - The PostgreSQL ODBC server can use pg_

SV: pg_service.conf and client support

2020-06-15 Thread Niels Jespersen
-Oprindelig meddelelse- Fra: Laurenz Albe Sendt: 15. juni 2020 11:24 Til: Niels Jespersen ; pgsql-gene...@postgresql.org Emne: Re: pg_service.conf and client support On Sun, 2020-06-14 at 05:03 +, Niels Jespersen wrote: > I just found out about the pg service file. >

pg_service.conf and client support

2020-06-13 Thread Niels Jespersen
, that can be used instead of pg_service.conf (if support is scarce beyond what builds on libpq)? Thank you. Regards Niels Jespersen

SV: what to log in csvlogs

2020-05-10 Thread Niels Jespersen
? Thanks, Mary The Pgaudit extension will let you audit specific actions to specific tables. Regard Niels Jespersen

SV: timestamp and timestamptz

2020-04-16 Thread Niels Jespersen
Fra: Magnus Hagander Sendt: 16. april 2020 10:28 Til: Niels Jespersen Cc: pgsql-general@lists.postgresql.org Emne: Re: timestamp and timestamptz On Thu, Apr 16, 2020 at 6:12 AM Niels Jespersen mailto:n...@dst.dk>> wrote: Fra: Magnus Hagander mailto:mag...@hagander.net>> Send

SV: timestamp and timestamptz

2020-04-15 Thread Niels Jespersen
Fra: Magnus Hagander Sendt: 15. april 2020 20:05 Til: Niels Jespersen Cc: pgsql-general@lists.postgresql.org Emne: Re: timestamp and timestamptz On Wed, Apr 15, 2020 at 7:50 PM Niels Jespersen mailto:n...@dst.dk>> wrote: Hello all We have some data that have entered a timestamp

timestamp and timestamptz

2020-04-15 Thread Niels Jespersen
'utc')::timestamp read_time_cet, (read_time at time zone 'utc')::timestamptz read_time_tz from t limit 10; We are on Postgres 12. Regards Niels Jespersen

SV: Writing Postgres Extensions in C on Windows

2020-01-08 Thread Niels Jespersen
Nothing special with the code for the extension itself. Same as other platforms. Building is another matter. I have written about compiling pgaudit on Windows on recent Postgres releases here. This could perhaps supplement the below blog. https://github.com/njesp/build_pgaudit_on_windows

Re: SSPI auth and mixed case usernames

2019-08-30 Thread Niels Jespersen
: 30. august 2019 kl. 16.21.39 CEST Til: Niels Jespersen Cc: Magnus Hagander , pgsql-general@lists.postgresql.org Emne: Re: SSPI auth and mixed case usernames Greetings, * Niels Jespersen (n...@dst.dk) wrote: >    Hello Magnus >    Thank you for your prompt reply.  >    I’m n

Re: SSPI auth and mixed case usernames

2019-08-30 Thread Niels Jespersen
entered as XYz, the next day entered as xYz, should logon to Postgres user xyz. Niels Fra: Magnus Hagander Dato: 30. august 2019 kl. 13.31.33 CEST Til: Niels Jespersen Cc: pgsql-general@lists.postgresql.org Emne: Re: SSPI auth and mixed case usernames On Fri, Aug 30, 2019 at 1

SSPI auth and mixed case usernames

2019-08-30 Thread Niels Jespersen
, and if so, how? Regards Niels Jespersen

SV: Oracle to postgres migration via ora2pg (blob data)

2019-07-31 Thread Niels Jespersen
I would look at the source table in Oracle first. It looks a lot like audit data. Perhaps all content is not needed in Postgres. If it is, then the table and lobs may benefit from being reorganised in oracle. Alter table CLIENT_DB_AUDIT_LOG move; Alter table CLIENT_DB_AUDIT_LOG move lob

RE: Implementing pgaudit extension on Microsoft Windows

2019-02-20 Thread Niels Jespersen
is good. Perhaps my experiences could be added to the project. I am willing to write a short markdown document describing this, if there is interest. Regards Niels -Oprindelig meddelelse- Fra: Joe Conway Sendt: 14. februar 2019 00:34 Til: Niels Jespersen ; 'Tom Lane' Cc: 'Pavel

SV: SV: SV: Implementing pgaudit extension on Microsoft Windows

2019-02-14 Thread Niels Jespersen
Will do. -Oprindelig meddelelse- Fra: Joe Conway Sendt: 14. februar 2019 00:34 Til: Niels Jespersen ; 'Tom Lane' Cc: 'Pavel Stehule' ; pgsql-general@lists.postgresql.org Emne: Re: SV: SV: Implementing pgaudit extension on Microsoft Windows On 2/13/19 9:17 AM, Joe Conway wrote

SV: SV: SV: Implementing pgaudit extension on Microsoft Windows

2019-02-14 Thread Niels Jespersen
15:18 Til: Niels Jespersen ; 'Tom Lane' Cc: 'Pavel Stehule' ; pgsql-general@lists.postgresql.org Emne: Re: SV: SV: Implementing pgaudit extension on Microsoft Windows On 2/13/19 3:32 AM, Niels Jespersen wrote: > Dive into the source for pgaudit and try to understand how it works, > p

SV: SV: Implementing pgaudit extension on Microsoft Windows

2019-02-13 Thread Niels Jespersen
15:14 Til: Niels Jespersen Cc: 'Pavel Stehule' ; pgsql-general@lists.postgresql.org Emne: Re: SV: Implementing pgaudit extension on Microsoft Windows Niels Jespersen writes: > Same result from > pgaudit.log = 'all' > in postgresql.conf and after both select pg_reload_conf(); and afte

SV: Implementing pgaudit extension on Microsoft Windows

2019-02-12 Thread Niels Jespersen
Same result from pgaudit.log = 'all' in postgresql.conf and after both select pg_reload_conf(); and after service restart. No entries in the log from audit. Regards Niels Fra: Pavel Stehule Sendt: 12. februar 2019 09:01 Til: Niels Jespersen Cc: Tom Lane ; pgsql-general

SV: Implementing pgaudit extension on Microsoft Windows

2019-02-11 Thread Niels Jespersen
e Sendt: 11. februar 2019 15:44 Til: Niels Jespersen Cc: 'pgsql-general@lists.postgresql.org' Emne: Re: Implementing pgaudit extension on Microsoft Windows Niels Jespersen writes: > Copied pgaudit.dll to C:\Program Files\PostgreSQL\11\lib Copied > pgaudit.control and pgaudit--1.3.sql

Implementing pgaudit extension on Microsoft Windows

2019-02-11 Thread Niels Jespersen
so postgreSQL knows it is there, but nothing in the log-file. I need some advice regarding the next steps in my troubleshooting. Regards Niels Jespersen