Re: md5 issues Postgres14 on OL7

2022-01-06 Thread Michael Paquier
On Thu, Jan 06, 2022 at 11:40:04AM -0500, Tom Lane wrote: > 1. It draws a cast-away-const warning. We'd have to make the result > of pg_cryptohash_error be "const char *", which would be better > practice anyway, but that propagates into some other APIs and I didn't > take the trouble to chase it

Re: md5 issues Postgres14 on OL7

2022-01-06 Thread Tom Lane
Michael Paquier writes: > I have been looking at that, and finished with the attached. It is > close to the end of the day, so this needs an extra lookup, but I have > finished by using the idea of an extra routine, called > pg_cryptohash_error(), able to grab the error saved in the private >

Re: Getting json-value as varchar

2022-01-06 Thread Thomas Kellerer
Andreas Joseph Krogh schrieb am 06.01.2022 um 13:28: Hi, in PG-14 this query returns "value" (with double-quotes): SELECT ('{"key":"value"}'::jsonb)['key']; ┌─┐ │  jsonb  │ ├─┤ │ "value" │ └─┘ (1 row) and this returns 'value' (without the quotes): SELECT

Re: pg_dump parameter

2022-01-06 Thread David G. Johnston
On Thursday, January 6, 2022, Augusto Mossambani wrote: > Hi. > > Is there a way when using pg_dump, inform a parameter to "clean" a certain > column (ByteA) of a table, similar to oracle(Blob)? > > Oracle Example: > Remap_data=TABLE.COLUMN_NAME:clear_blob_pack.clear_blob > > Not that I’m aware

pg_dump parameter

2022-01-06 Thread Augusto Mossambani
Hi. Is there a way when using pg_dump, inform a parameter to "clean" a certain column (ByteA) of a table, similar to oracle(Blob)? Oracle Example: Remap_data=TABLE.COLUMN_NAME:clear_blob_pack.clear_blob

Re: Getting json-value as varchar

2022-01-06 Thread Andreas Joseph Krogh
På torsdag 06. januar 2022 kl. 14:42:21, skrev Pavel Stehule < pavel.steh...@gmail.com >: Hi čt 6. 1. 2022 v 14:33 odesílatel Andreas Joseph Krogh mailto:andr...@visena.com>> napsal: På torsdag 06. januar 2022 kl. 14:29:12, skrev David G. Johnston <

Re: Getting json-value as varchar

2022-01-06 Thread Pavel Stehule
Hi čt 6. 1. 2022 v 14:33 odesílatel Andreas Joseph Krogh napsal: > På torsdag 06. januar 2022 kl. 14:29:12, skrev David G. Johnston < > david.g.johns...@gmail.com>: > > [..] > The fact is that the ‘ - - > ‘ operator gives you the needed output. > > David J. > > > Yeah, I think that's the

Re: Getting json-value as varchar

2022-01-06 Thread Andreas Joseph Krogh
På torsdag 06. januar 2022 kl. 14:29:12, skrev David G. Johnston < david.g.johns...@gmail.com >: [..] The fact is that the ‘ - - > ‘ operator gives you the needed output. David J. Yeah, I think that's the correct answer for this use-case. -- Andreas

Re: Getting json-value as varchar

2022-01-06 Thread David G. Johnston
On Thursday, January 6, 2022, Andreas Joseph Krogh wrote: > > Apparently I'm after a solution which either casts this to varchar or a > function that takes JSONB as argument and outputs the first field-value as > varchar. > > You can try casting the value though IIRC it doesn’t actually work

Re: Getting json-value as varchar

2022-01-06 Thread Thomas Markus
Hi, Am 06.01.22 um 13:36 schrieb Andreas Joseph Krogh: På torsdag 06. januar 2022 kl. 13:31:19, skrev Thomas Markus : Hi, Am 06.01.22 um 13:28 schrieb Andreas Joseph Krogh: Hi, in PG-14 this query returns "value" (with double-quotes): SELECT ('{"key":"value"}'::jsonb)['key'];

Re: Getting json-value as varchar

2022-01-06 Thread Andreas Joseph Krogh
På torsdag 06. januar 2022 kl. 14:13:40, skrev David G. Johnston < david.g.johns...@gmail.com >: On Thursday, January 6, 2022, Andreas Joseph Krogh mailto:andr...@visena.com>> wrote: I think you misread my message. What I want is for the subscript-version:

Sv: Recommended storage hardware

2022-01-06 Thread Andreas Joseph Krogh
På torsdag 06. januar 2022 kl. 13:53:21, skrev Levente Birta < blevi.li...@gmail.com >: Hi all What storage is recommended nowdays? Currently I'm using two of SSD DC P3700 Series add in card (SSDPEDMD400G4) in soft raid 1, but it's pretty old and I have to

Re: Getting json-value as varchar

2022-01-06 Thread David G. Johnston
On Thursday, January 6, 2022, Andreas Joseph Krogh wrote: > > > I think you misread my message. What I want is for the subscript-version: > > ('{"key":"value"}'::jsonb)['key'] > > to return: > > ┌──┐ > │ ?column? │ > ├──┤ > │ value│ > └──┘ > > instead of > >

Recommended storage hardware

2022-01-06 Thread Levente Birta
Hi all What storage is recommended nowdays? Currently I'm using two of SSD DC P3700 Series add in card (SSDPEDMD400G4) in soft raid 1, but it's pretty old and I have to replace the whole server. Before, I used Intel too and I'm very satisfied, but now that intel sold the ssd business looks

Re: Getting json-value as varchar

2022-01-06 Thread Andreas Joseph Krogh
På torsdag 06. januar 2022 kl. 13:31:19, skrev Thomas Markus < t.mar...@proventis.net >: Hi, Am 06.01.22 um 13:28 schrieb Andreas Joseph Krogh: Hi, in PG-14 this query returns "value" (with double-quotes): SELECT ('{"key":"value"}'::jsonb)['key']; ┌─┐

Re: Getting json-value as varchar

2022-01-06 Thread Thomas Markus
Hi, Am 06.01.22 um 13:28 schrieb Andreas Joseph Krogh: Hi, in PG-14 this query returns "value" (with double-quotes): SELECT ('{"key":"value"}'::jsonb)['key']; ┌─┐ │  jsonb  │ ├─┤ │ "value" │ └─┘ (1 row) and this returns 'value' (without the quotes): SELECT

Getting json-value as varchar

2022-01-06 Thread Andreas Joseph Krogh
Hi, in PG-14 this query returns "value" (with double-quotes): SELECT ('{"key":"value"}'::jsonb)['key']; ┌─┐ │ jsonb │ ├─┤ │ "value" │ └─┘ (1 row) and this returns 'value' (without the quotes): SELECT ('{"key":"value"}'::jsonb)->> 'key'; ┌──┐ │

Re: md5 issues Postgres14 on OL7

2022-01-06 Thread Michael Paquier
On Wed, Jan 05, 2022 at 04:09:12PM +0900, Michael Paquier wrote: > In order to make things portable with 14 in cryptohash.c, we don't > have any need to change the existing cryptohash APIs. We could just > store in each implementation context a location to a static string, > and add a new routine

Re: How to write such a query?

2022-01-06 Thread Dmitry Igrishin
On Thu, Jan 6, 2022, 09:40 Igor Korot wrote: > Hi, ALL, > In SQLite you can write: > > SELECT a, b, c FROM foo WHERE id = :id; > > where ":id" is the named parameter. > > The query above is similar to > > SELECT a,b,c FROM foo WHERE id = ?; > > except that the parameter has a name. > > Is there