Re: syntax error with alter type

2018-12-07 Thread Tom Lane
Kevin Brannen writes: > So, can you (or anyone) help me understand what "alter type drop > attribute" is meant to do? I don't see "attribute" on the page you reference. IIRC, that drops a column from a composite type; it's more or less a variant spelling of ALTER TABLE DROP COLUMN.

RE: syntax error with alter type

2018-12-07 Thread Kevin Brannen
On 12/7/18 3:17 PM, Kevin Brannen wrote: > I'm running Pg 9.6.5 if it matters... > > I'm trying to drop a value from an ENUM (type) and it seems like I'm > following the fine manual yet I still get an error. For example: > > nms=# create type alphabet as enum ('a', 'b', 'c', 'd'); > > CREATE TYPE >

Re: syntax error with alter type

2018-12-07 Thread Adrian Klaver
On 12/7/18 3:17 PM, Kevin Brannen wrote: I’m running Pg 9.6.5 if it matters… I’m trying to drop a value from an ENUM (type) and it seems like I’m following the fine manual yet I still get an error. For example: nms=# create type alphabet as enum ('a', 'b', 'c', 'd'); CREATE TYPE nms=# alter

syntax error with alter type

2018-12-07 Thread Kevin Brannen
I'm running Pg 9.6.5 if it matters... I'm trying to drop a value from an ENUM (type) and it seems like I'm following the fine manual yet I still get an error. For example: nms=# create type alphabet as enum ('a', 'b', 'c', 'd'); CREATE TYPE nms=# alter type alphabet drop attribute if exists 'c'

Re: Importing tab delimited text file using phpPgAdmin 5.1 GUI

2018-12-07 Thread Adrian Klaver
On 12/7/18 9:04 AM, s4...@yahoo.co.jp wrote: I didn't specify any schema, so it was created in public schema. The error message also says "public"... //-- ERROR: column "rec_id" of relation "spec" does not exist LINE 1: INSERT INTO

Re: != ANY(array) does not behave as expected

2018-12-07 Thread Andrew Gierth
> "Chris" == Chris Wilson writes: Chris> However, if we try to invert it by using the != operator, then Chris> we get unexpected results: Mr. De Morgan would like a word. https://en.wikipedia.org/wiki/De_Morgan%27s_laws In short, if you have a condition of the form (a OR b) and you want t

Re: != ANY(array) does not behave as expected

2018-12-07 Thread Ken Tanzer
On Fri, Dec 7, 2018 at 5:21 AM Thomas Kellerer wrote: > Thomas Kellerer schrieb am 07.12.2018 um 13:48: > > Chris Wilson schrieb am 07.12.2018 um 13:39: > >> However, if we try to invert it by using the != operator, then we get > unexpected results: > >> > >> select * from foo where id NOT IN (1,

Re: psql profiles?

2018-12-07 Thread Ron
On 12/07/2018 10:45 AM, Matt Zagrabelny wrote: On Fri, Dec 7, 2018 at 7:42 AM Arthur Zakirov > wrote: On 07.12.2018 01:34, Matt Zagrabelny wrote: > > > On Thu, Dec 6, 2018 at 4:24 PM Alvaro Herrera mailto:alvhe...@2ndquadrant.com> >

Re: Importing tab delimited text file using phpPgAdmin 5.1 GUI

2018-12-07 Thread s400t
I didn't specify any schema, so it was created in public schema.The error message also says "public"...//--ERROR: column "rec_id" of relation "spec" does not existLINE 1: INSERT INTO "public"."spec" ("rec_id","title_c...//--

Re: psql profiles?

2018-12-07 Thread Matt Zagrabelny
On Fri, Dec 7, 2018 at 7:42 AM Arthur Zakirov wrote: > On 07.12.2018 01:34, Matt Zagrabelny wrote: > > > > > > On Thu, Dec 6, 2018 at 4:24 PM Alvaro Herrera > > wrote: > > > > Sure, just define a pg_service.conf file. > > https://www.postgresql.org/docs/1

Re: Importing tab delimited text file using phpPgAdmin 5.1 GUI

2018-12-07 Thread Adrian Klaver
On 12/7/18 12:28 AM, s4...@yahoo.co.jp wrote: Hello Adrian, Rob! Thank you for the comments. Oh, yes, I forgot to mention that I am using Postgresql version 9.6. I had read somewhere that last supported version was 9.3 or something, could be 9.2 as you say. I wanted to use phpPgAdmin, that's

Re: PL/pgSQL HTTP Request

2018-12-07 Thread Pavel Stehule
pá 7. 12. 2018 v 14:58 odesílatel Sathish Kumar napsal: > Hi Pavel, > > We would like to use with Google Cloud Sql where third party extensions > are not supported. > Then it easy - you cannot to do from Postgres. Pavel > > On Fri, Dec 7, 2018, 9:55 PM Pavel Stehule >> Hi >> >> pá 7. 12. 201

Re: PL/pgSQL HTTP Request

2018-12-07 Thread Sathish Kumar
Hi Pavel, We would like to use with Google Cloud Sql where third party extensions are not supported. On Fri, Dec 7, 2018, 9:55 PM Pavel Stehule Hi > > pá 7. 12. 2018 v 14:48 odesílatel Sathish Kumar > napsal: > >> Hi Team, >> >> Do PL/pgSQL support to create a function to make HTTP request. We

Re: PL/pgSQL HTTP Request

2018-12-07 Thread Pavel Stehule
Hi pá 7. 12. 2018 v 14:48 odesílatel Sathish Kumar napsal: > Hi Team, > > Do PL/pgSQL support to create a function to make HTTP request. We have a > requirement to send data to external server from Postgres DB using > HTTP/HTTPS Post Method. > Surely It doesn't support it. You can use some unt

PL/pgSQL HTTP Request

2018-12-07 Thread Sathish Kumar
Hi Team, Do PL/pgSQL support to create a function to make HTTP request. We have a requirement to send data to external server from Postgres DB using HTTP/HTTPS Post Method.

Re: psql profiles?

2018-12-07 Thread Arthur Zakirov
On 07.12.2018 01:34, Matt Zagrabelny wrote: On Thu, Dec 6, 2018 at 4:24 PM Alvaro Herrera > wrote: Sure, just define a pg_service.conf file. https://www.postgresql.org/docs/11/libpq-pgservice.html Thanks Alvaro! Is there any shorter version than: p

Re: != ANY(array) does not behave as expected

2018-12-07 Thread Thomas Kellerer
Thomas Kellerer schrieb am 07.12.2018 um 13:48: > Chris Wilson schrieb am 07.12.2018 um 13:39: >> However, if we try to invert it by using the != operator, then we get >> unexpected results: >> >> select * from foo where id NOT IN (1, 2); /* returns row 3 only, as expected >> */ >> select * from

Re: != ANY(array) does not behave as expected

2018-12-07 Thread Thomas Kellerer
Chris Wilson schrieb am 07.12.2018 um 13:39: > However, if we try to invert it by using the != operator, then we get > unexpected results: > > select * from foo where id NOT IN (1, 2); /* returns row 3 only, as expected > */ > select * from foo where id != ANY (ARRAY[1, 2]); /* returns all rows,

!= ANY(array) does not behave as expected

2018-12-07 Thread Chris Wilson
Dear Postgres users, I like using ANY(array) instead of IN (...), as we can pass the array as binary data, avoiding the need to render its contents (which might be integers) into a SQL string, for Postgres to parse them back into integers again, and it also works with an empty list

Re: Importing tab delimited text file using phpPgAdmin 5.1 GUI

2018-12-07 Thread s400t
Hello Adrian, Rob! Thank you for the comments. Oh, yes, I forgot to mention that I am using Postgresql version 9.6.I had read somewhere that last supported version was 9.3 or something, could be 9.2 as you say. I wanted to use phpPgAdmin, that's why I went back to 9.6 even if I had installed ve