Re: range of composite types!

2022-04-26 Thread David G. Johnston
On Tuesday, April 26, 2022, Jian He wrote: > > -- composite type range. >> create type mytype as (t1 int, t2 date); >> -- create type my_interval as (t1 int, t2 interval); >> select (2,'2022-01-02')::mytype ; >> create type mytyperange as range(subtype = mytype); >> > > I am thinking construct a

Re: Fresh eyeballs needed: input into error [FIXED]

2022-04-26 Thread Adrian Klaver
On 4/26/22 20:11, Bruce Momjian wrote: On Tue, Apr 26, 2022 at 06:09:42PM -0700, Rich Shepard wrote: On Tue, 26 Apr 2022, Rich Shepard wrote: I am curious what OS psql was using that was fixed by a re-login? Rich uses Slackware. -- Adrian Klaver adrian.kla...@aklaver.com

Re: "create function... depends on extension..." not supported. Why?

2022-04-26 Thread Bryn Llewellyn
> t...@sss.pgh.pa.us wrote: > >> b...@yugabyte.com wrote: >> >> The discussion has diverging threads and very many turns. I think that I >> managed to skim through the entire tree. As I read it, the discussion was >> entirely about the semantics of the proposed dependency of a function (or >>

Re: Fresh eyeballs needed: input into error [FIXED]

2022-04-26 Thread Bruce Momjian
On Tue, Apr 26, 2022 at 06:09:42PM -0700, Rich Shepard wrote: > On Tue, 26 Apr 2022, Rich Shepard wrote: > > > It's probably a transient glitch that will go away after I log out. > > Yep. I logged out and back in just now. The insert script worked as it > always had before and both rows were adde

Re: "create function... depends on extension..." not supported. Why?

2022-04-26 Thread Tom Lane
Bryn Llewellyn writes: > The discussion has diverging threads and very many turns. I think that I > managed to skim through the entire tree. As I read it, the discussion was > entirely about the semantics of the proposed dependency of a function (or > procedure) upon an extension. The idea to e

Re: "create function... depends on extension..." not supported. Why?

2022-04-26 Thread Bryn Llewellyn
> david.g.johns...@gmail.com wrote: > >> b...@yugabyte.com wrote: >> >> Note: I’m asking because the answer to the question “Why isn’t X supported?” >> is always useful. For example, if supporting it would imply a logical >> impossibility that I’m too slow to spot, it helps me when someone expl

Re: Fresh eyeballs needed: input into error [FIXED]

2022-04-26 Thread Rich Shepard
On Tue, 26 Apr 2022, Rich Shepard wrote: It's probably a transient glitch that will go away after I log out. Yep. I logged out and back in just now. The insert script worked as it always had before and both rows were added to the table. I've seen these sort of hang-ups before and didn't want

Re: "create function... depends on extension..." not supported. Why?

2022-04-26 Thread David G. Johnston
On Tue, Apr 26, 2022 at 5:22 PM Bryn Llewellyn wrote: > Note: I’m asking because the answer to the question “Why isn’t X > supported?” is always useful. For example, if supporting it would imply a > logical impossibility that I’m too slow to spot, it helps me when someone > explains what I failed

"create function... depends on extension..." not supported. Why?

2022-04-26 Thread Bryn Llewellyn
Note: I’m asking because the answer to the question “Why isn’t X supported?” is always useful. For example, if supporting it would imply a logical impossibility that I’m too slow to spot, it helps me when someone explains what I failed to realize. Equally, it helps me to know when the answer is

Re: Backing up a DB excluding certain tables

2022-04-26 Thread Tom Lane
[ please keep the list cc'd ] JORGE MALDONADO writes: > As for the answer by *Tom Lane*, I am not restoring the DB but only getting > the backup in plain format. I see that tables that contain "AspNet" in > their name are part of the resulting dumped file. For example, the > following is part of

Re: Fresh eyeballs needed: input into error

2022-04-26 Thread Adrian Klaver
On 4/26/22 3:08 PM, Rich Shepard wrote: On Tue, 26 Apr 2022, David G. Johnston wrote: What version of PostgreSQL? David, 12.7 Testing on HEAD (and by inspection) nothing you've shown us provokes a syntax error in PostgreSQL. regression=> insert into people (person_nbr,lname,fname,job_titl

Re: Fresh eyeballs needed: input into error

2022-04-26 Thread Rich Shepard
On Tue, 26 Apr 2022, Tom Lane wrote: so there's nothing wrong with the syntax as-presented. I agree with Adrian's guess about invisible characters in your input file; perhaps a control-D or ASCII NUL would produce that symptom. tom, It's probably a transient glitch that will go away after I l

Re: Fresh eyeballs needed: input into error

2022-04-26 Thread Rich Shepard
On Tue, 26 Apr 2022, David G. Johnston wrote: What version of PostgreSQL? David, 12.7 Testing on HEAD (and by inspection) nothing you've shown us provokes a syntax error in PostgreSQL. regression=> insert into people (person_nbr,lname,fname,job_title,company_nbr,loc_nbr, regression(> loc_p

Re: Fresh eyeballs needed: input into error

2022-04-26 Thread Adrian Klaver
On 4/26/22 2:53 PM, Rich Shepard wrote: On Tue, 26 Apr 2022, Adrian Klaver wrote: I'm guessing some sort of hidden character. Adrian, Oh, ... forgot to mention in my response that the MWE values were added to the template in emacs while I get the same error using psql -d -f in a v.t. or

Re: Fresh eyeballs needed: input into error

2022-04-26 Thread Tom Lane
Rich Shepard writes: > I'm getting a syntax error with an input into statement and I cannot see the > cause. > A MWE and the result (N.B.: line one wrapped for readability; it ends with > 'values'): > insert into people (person_nbr,lname,fname,job_title,company_nbr,loc_nbr, > loc_phone_ext,direct

Re: Fresh eyeballs needed: input into error

2022-04-26 Thread David G. Johnston
On Tue, Apr 26, 2022 at 2:54 PM Rich Shepard wrote: > On Tue, 26 Apr 2022, Adrian Klaver wrote: > > > I'm guessing some sort of hidden character. > > Adrian, > > Oh, ... forgot to mention in my response that the MWE values were added to > the template in emacs while I get the same error using psq

Re: Fresh eyeballs needed: input into error

2022-04-26 Thread Rich Shepard
On Tue, 26 Apr 2022, Adrian Klaver wrote: I'm guessing some sort of hidden character. Adrian, Oh, ... forgot to mention in my response that the MWE values were added to the template in emacs while I get the same error using psql -d -f in a v.t. or entering 'insert into people values (...)'

Re: Fresh eyeballs needed: input into error

2022-04-26 Thread Rich Shepard
On Tue, 26 Apr 2022, Adrian Klaver wrote: I'm guessing some sort of hidden character. Adrian, The 'insert into ...' string is a template I've been using for years. It's worked earlier today, too. What client are you using to run this? psql in a linux virtual terminal. Where is the query

Re: Fresh eyeballs needed: input into error

2022-04-26 Thread Adrian Klaver
On 4/26/22 2:31 PM, Rich Shepard wrote: I'm getting a syntax error with an input into statement and I cannot see the cause. A MWE and the result (N.B.: line one wrapped for readability; it ends with 'values'): insert into people (person_nbr,lname,fname,job_title,company_nbr,loc_nbr, loc_phone_e

Fresh eyeballs needed: input into error

2022-04-26 Thread Rich Shepard
I'm getting a syntax error with an input into statement and I cannot see the cause. A MWE and the result (N.B.: line one wrapped for readability; it ends with 'values'): insert into people (person_nbr,lname,fname,job_title,company_nbr,loc_nbr, loc_phone_ext,direct_phone,direct_fax,cell_phone,emai

Re: row level security on conflict do update

2022-04-26 Thread David G. Johnston
On Tue, Apr 26, 2022 at 9:44 AM alias wrote: > >> 723 >> >> -- Violates USING qual for UPDATE policy p3.

Re: Backing up a DB excluding certain tables

2022-04-26 Thread Tom Lane
JORGE MALDONADO writes: > I am using *pg_dump* to backup a DB but I would like to exclude some tables > so I added the *-T* switch with a pattern like this: *aspnet*.**. The > backup command includes the *-s* switch to consider the schema only > because I do not need the data. However, even with

How many max_replication_slots?

2022-04-26 Thread andrew cooke
Hi, How can I estimate the correct value for max_replication_slots (logical replication, pg 14)? As far as I understand, they're needed to keep WAL files on the publisher when something goes wrong. But we seem to need way, way more slots than publishers. Is it one slot per publisher per table

Re: Backing up a DB excluding certain tables

2022-04-26 Thread Adrian Klaver
On 4/26/22 12:15 PM, JORGE MALDONADO wrote: Hi, I am using *pg_dump* to backup a DB but I would like to exclude some tables so I added the *-T* switch with a pattern like this: *aspnet*.**. The backup command  includes the *-s* switch to consider the schema only because I do not need the data

Backing up a DB excluding certain tables

2022-04-26 Thread JORGE MALDONADO
Hi, I am using *pg_dump* to backup a DB but I would like to exclude some tables so I added the *-T* switch with a pattern like this: *aspnet*.**. The backup command includes the *-s* switch to consider the schema only because I do not need the data. However, even with the *-T* switch, the tables

row level security on conflict do update

2022-04-26 Thread alias
git.postgresql.org Git - postgresql.git/blob - src/test/regress/sql/rowsecurity.sql > 58 >

Re: pg_stat_activity.query empty

2022-04-26 Thread Ian Lawrence Barwick
2022年4月26日(火) 23:24 Laurenz Albe : > > On Tue, 2022-04-26 at 06:59 -0700, David G. Johnston wrote: > > On Tue, Apr 26, 2022 at 6:55 AM Robert Lichtenberger > > wrote: > > > When executing "SELECT * FROM pg_stat_activity" I get lots of rows that > > > have an empty "query" column. > > > > > > Acco

Re: pg_stat_activity.query empty

2022-04-26 Thread Laurenz Albe
On Tue, 2022-04-26 at 06:59 -0700, David G. Johnston wrote: > On Tue, Apr 26, 2022 at 6:55 AM Robert Lichtenberger > wrote: > > When executing "SELECT * FROM pg_stat_activity" I get lots of rows that  > > have an empty "query" column. > > > > According to [1] this column should contain the "Text

Re: pg_stat_activity.query empty

2022-04-26 Thread David G. Johnston
On Tue, Apr 26, 2022 at 6:55 AM Robert Lichtenberger < r.lichtenber...@synedra.com> wrote: > When executing "SELECT * FROM pg_stat_activity" I get lots of rows that > have an empty "query" column. > > According to [1] this column should contain the "Text of this backend's > most recent query", eit

pg_stat_activity.query empty

2022-04-26 Thread Robert Lichtenberger
When executing "SELECT * FROM pg_stat_activity" I get lots of rows that have an empty "query" column. According to [1] this column should contain the "Text of this backend's most recent query", either a query that is currently running or the last query that was executed. So how comes that a

range of composite types!

2022-04-26 Thread Jian He
range of composite types. I found this would be a great idea!!! Question on stackoverflow DB Fiddle