Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 31 2019 21:30
    roji commented #2307
  • Jan 31 2019 20:35
    YohDeadfall commented #2307
  • Jan 31 2019 10:20
    capan starred npgsql/npgsql
  • Jan 31 2019 06:10
    SeanFarrow synchronize #2308
  • Jan 30 2019 20:37
    austindrenski commented #2308
  • Jan 30 2019 20:37
    pentagra commented #1445
  • Jan 30 2019 20:33
    SeanFarrow commented #2308
  • Jan 30 2019 20:31
    austindrenski commented #2308
  • Jan 30 2019 20:27
    SeanFarrow commented #2308
  • Jan 30 2019 20:09
    austindrenski labeled #2308
  • Jan 30 2019 20:05
    roji commented #1520
  • Jan 30 2019 19:50
    gyzod commented #1445
  • Jan 30 2019 19:06
    SeanFarrow commented #1520
  • Jan 30 2019 18:54
    roji commented #1520
  • Jan 30 2019 18:53
    roji commented #1520
  • Jan 30 2019 18:52
    roji commented #2050
  • Jan 30 2019 18:45
    Trolldemorted commented #2050
  • Jan 30 2019 18:21
    SeanFarrow commented #1520
  • Jan 30 2019 18:16
    SeanFarrow review_requested #2308
  • Jan 30 2019 18:16
    SeanFarrow review_requested #2308
Filip Makowski
@fmakowski
what am I doing wrong? any advice?
Filip Makowski
@fmakowski
obviously I can make POCO out of those JsonDocuments, but I have to admit, I think this is quite limiting
Filip Makowski
@fmakowski
removing reference to Newtonsoft.Json is not helping either
Emill
@Emill
@roji do you have some quick start guide to set up the dev environment?
I get this:
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(1175,5): error MSB3644: The reference assemblies for .NETFramework,Version=v5.0 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks
but I'm not sure which one to download
Emill
@Emill
nevermind got it working by installing VS 2019 Preview 3
Shay Rojansky
@roji
@fmakowski yeah, as discussed in npgsql/doc#58 are incorrect - GetProperty is a method on JsonElement, so you need to call JsonDocument.RootElement. But you're saying you have issues using JsonElement too?
jberzy
@jberzy
@Brar Hi, are you still planning to ship replication in the 5.0 timeframe?
Skeferstat
@Skeferstat

Hi, I get an exception

Detail = "Detail redacted as it may contain sensitive data. Specify 'Include Error Detail' in the connection string to include this information."

How I can enable this? I Use asp.net core. Thanks!

Yoh Deadfall
@YohDeadfall
@Skeferstat, the exception already point you what you should do: add Include Error Detail=true to the connection string.
pm64
@pm64
Is there an issue with EDB Stack Builder right now? Have tried running it several times today .. it hangs on "Connecting to server..." when initiating the Language Pack download.
2 replies
Shay Rojansky
@roji
@jberzy yeah, that is the plan - though we're definitely cutting it very short :)
jberzy
@jberzy
@roji fingers crossed. Let me know if I can be of any assistance with testing. Thanks
Shay Rojansky
@roji
@jberzy will do. Please follow npgsql/npgsql#1520 and post there.
Björn Harrtell
@bjornharrtell
Does efcore.pg fully support System.Transactions? (getting some unexpected results)
Björn Harrtell
@bjornharrtell
Also tried with ambient transaction but still getting unexpected results. Perhaps I'm expectation/logic is wrong, will dig deeper...
Shay Rojansky
@roji
@bjornharrtell yeah, EFCore.PG should support System.Transactions (same as the SQL Server provider, for example). If you come up with a code sample that shows weird behavior, please open an issue and we'll investigate.
Björn Harrtell
@bjornharrtell
@roji: Thanks for confirming. I've been able to determine that it was indeed faulty logic/assumptions in the actual data and fixed it now.
pm64
@pm64
Once an NpgsqlConnection is open, is it possible to modify its search path?
Shay Rojansky
@roji
Yes, you can simply send a command that does SET search_path=...
Hai Nguyen
@hainguyen0011
image.png
Hello guys, I'm in a project at my university that need to work with spatial data which is geometry type (linestring). And I chose ASP .Net core 3.1 mvc to work with.
I have connected to postgres successfully. my database have 1 table which has fields as above
and now I dont know how to put that data in my view. I've try to get the geometry directly but it throw an exception about CordinateSystem type
Robert Karlsson
@Robban1980
@hainguyen0011 a tip for when asking for help is to provide the error you get
Hai Nguyen
@hainguyen0011
So guys please tell me how can I put that geometry linestring type to view
Thank you very much, I'm appriciate
P/s: sorry about my bad english
Robert Karlsson
@Robban1980
CREATE OR REPLACE VIEW public.my_new_view AS SELECT my_columns FROM table;
thats how you create a view
Hai Nguyen
@hainguyen0011
so for each id I'will have a view right ?
Robert Karlsson
@Robban1980
If that is your requirement sure, but it does not make sense
Hai Nguyen
@hainguyen0011
anyway an exception I told about is
image.png
and I cant find it on internet
I dont know my direction is right or wrong I just try to do it on asp.net core 3.1
Robert Karlsson
@Robban1980
@hainguyen0011 did you read the manual?
Hai Nguyen
@hainguyen0011
I have read manual on npgsql .org
Robert Karlsson
@Robban1980
https://www.npgsql.org/doc/types/geojson.html even the part about how to read an write that type of value?
Hai Nguyen
@hainguyen0011
I found it cant help me so I dont follow the guide
thank you for spending time response me
Yoh Deadfall
@YohDeadfall
Have you set up the plugin? Any code?
ruslanen
@ruslanen
image.png

Hello! Tell me please. I have the following situation:

  1. I open a connection to server A and send a test request
  2. After server B starts to process the request, I simulate a loss of connection with server B
    (just setting up a rule for iptables on server B that does something like iptables -A OUTPUT -p tcp --dport {ephemeral_port_number} -j DROP)
  3. After 10 seconds in a separate thread, I close the connection (in the hope that the ExecuteReader will stop executing). But in the end, the ExecuteReader is waiting for the Command Timeout allocated for it.

Is this considered normal behavior of a synchronous ExecuteReader?
In my scenario, I cannot use the asynchronous API (a lot of legacy code), so my task is to reverse the synchronous operation without waiting for the Command Timeout.
I will be glad to hear advice on which direction to move to solve the problem.

Yoh Deadfall
@YohDeadfall
There is a graceful cancellation of the reader, so it should consume all data before closing the connection. To cancel the running command immediately, use NpgsqlCommand.Cancel which will open a new connection and send a request to stop the current command running on the first connection.
ruslanen
@ruslanen
@YohDeadfall after calling Cancel, it will be similarly expected ExecuteReader (with Command Timeout), and I need to terminate the ExecuteReader immediately
Yoh Deadfall
@YohDeadfall
Which version is used?
ruslanen
@ruslanen
npgsql 4.1.3.1
Shay Rojansky
@roji
@ruslanen to add to what @YohDeadfall wrote, you can indeed trigger PG cancellation (via a separate command) by calling NpgsqlCommand.Cancel. For 5.0 (to be released in two weeks) we've redone the whole cancellation/timeout mechanism to be much better; if the PG cancellation isn't successful after 2 seconds (by default), the socket will be closed and the connection will be broken.
ruslanen
@ruslanen
@roji thanks a lot, I'll try to check with version 5.0