Read specific fields from Postgres jsonb

I have data like

{"name": "a", "scope": "1", "items": [{"code": "x", "description": "xd"}, {"code": "x2", "description": "xd2"}]} {"name": "b", "scope": "2", "items": [{"code": "x", "description": "xd"}]} {"name": "c", "scope": "3", "items": [{"code": "x", "description": "xd"}]} {"name": "d", "scope": "4", "items": [{"code": "x", "description": "xd"}]} 

Now I want the result like:

{"name": "a","items": [{"code": "x"}, {"code": "x2"}]} {"name": "b","items": [{"code": "x"}]} {"name": "c","items": [{"code": "x"}]} {"name": "d","items": [{"code": "x"}]} 

How can I stop all files being read only to PHP? [migrated]

I’m setting up a new Centos 7 server to run some legacy sites on PHP 5.6.40 through PHP-FPM with Nginx.

However, I’m running into a problem that all files are appearing to be read only.

PHP is running under the nginx user, the site directory is owned by nginx, and I’ve tried verious file permissions through chown, including "777".

I created a simple program to illustrate:

<?php $  fileList = glob('*');  //Loop through the array that glob returned. foreach($  fileList as $  filename){    //Simply print them out onto the screen.    echo $  filename;    if (is_writable($  filename))       echo ' - Yes!';    else       echo ' - No.';    echo '<br>'; } 

This will output the files in the site directory, with "No" next to each filename.

Any tips on what might be causing this, or how I might be able to debug would be greatly appreciated.

Repeatable read: the transaction may not be serializable with respect to other transactions

The text below is from ‘Database System Concepts, Silberschatz. I can’t understand the bolded part. How the transaction may not be serializable with respect to other transactions? And also how a transaction may find some of the data inserted by a committed transaction, but may not find other data inserted by the same transaction?

Repeatable read allows only committed data to be read and further requires that, between two reads of a data item by a transaction, no other transaction is allowed to update it. However, the transaction may not be serializable with respect to other transactions. For instance, when it is searching for data satisfying some conditions, a transaction may find some of the data inserted by a committed transaction, but may not find other data inserted by the same transaction.

SQLServer: Why is a Shared lock blocking on an IX lock when Read Committed Snapshot is enabled?

Our system has randomly started deadlocking in areas where it previously had not, and an analysis of the deadlock graph looks like it should not even be happening to begin with. Here is a screenshot of the deadlock graph.

enter image description here

For reference: The left node is a basic insert into the sync_entities table, where the right node is "update sync_entities set A=B, C=D from sync_entities e join sync_revisions r on where in ()"

Based on my understanding of lock compatibility, an Requesting an S lock when an IX lock exists would block only if Read Committed Snapshot is off, but it is turned on for this database, and has been for a very long time. Am I missing something?

Read Manga WordPress based with manga update tool

Why are you selling this site?
I'm just developer for making money.

How is it monetized?
you can use adsense or other ad network such as propellerads, adsterra or others.

Does this site come with any social media accounts?

How much time does this site take to run?
the website is using laravel script to update mangas.
with one click you can add new manga with all chapters.
using gdrive unlimited as manga image storage.

no need to upload manga manually, winner…

Read Manga WordPress based with manga update tool

How exactly does PostgreSQL expect me to read in/delete the CSV log files?

I’ve been following the (very sparse and cryptic) instructions here:

  1. I’ve set up the postgres_log table exactly like it says on that page.

  2. I’ve set up my postgresql.conf like this:

    log_destination = ‘csvlog’

    logging_collector = on

    log_directory = ‘C:\pglogs’

    log_filename = ‘PG_%Y-%m-%d_%H;%M;%S’

    log_rotation_age = 1d

    log_rotation_size = 0

    log_truncate_on_rotation = on

  3. I’ve restarted PostgreSQL, and it has created a PG_2020-09-20_00;56;19.csv and PG_2020-09-20_00;56;19 file.

  4. I am able to successfully run a COPY query to import the PG_2020-09-20_00;56;19.csv into my database table, if I explicitly name it.

My problems:

  1. How am I supposed to determine which filename(s) to pick to COPY into the table from my automated, regularly run script? (Since it can’t be the "current" one.)
  2. After I have somehow determined which filename(s) are safe to COPY in, and I’ve loaded them into my table, am I expected to delete these myself?
  3. What’s with the plaintext-format PG_2020-09-20_00;56;19 file? Why is that created when I clearly tell PG to use CSV?

None of this is addressed on the page I linked to and which I’ve been following.

WordPress “Read More” Tag


I'm looking to do another WordPress Site and love the "read more" feature on this site -

If you scroll down to any of their services and click on a "read more" button, it pulls down an entirely new row of things, new photos and information.

I'm trying to figure out the best way to do that in WordPress? I know there are the "Read more" sections, but it doesn't normally pop down an entire row like that and keep the design nice…

WordPress "Read More" Tag

reading a file with other read permissions set

For this question assume a file with 604 perms in a directory with 700 permissions. Assume this file exists: /test/file

A non-root user can techincally read that file but in practice to read it the process must be given the pathname to the file, and the kernel will check that the directory /test has the executable bit set. Because it is not set, the read will fail.

If the one does a chmod o+x /test, then a non-root user can do a cat /test/file and read the file. Is there a way to read the file without setting the execute bit on the directory /test.?