Re: What have I done!?!?!? :-)

2022-04-07 Thread Nikolay Samokhvalov
On Thu, Apr 7, 2022 at 8:10 AM Jan Wieck wrote: > So **IF** Active Record is using that feature, then it can dump any > amount of garbage into your PostgreSQL database and PostgreSQL will > happily accept it with zero integrity checking. > It's DISABLE TRIGGER ALL https://github.com/rails/rails/

Re: psql removes dashed comments

2022-04-07 Thread Tom Lane
Adrian Klaver writes: > On 4/7/22 11:25, Boris Zentner wrote: >> I was wondering why psql loose dashed comments and what can be done about >> this misbehaviour. > See this recent thread: > https://www.postgresql.org/message-id/265623A4-F304-4E68-90D0-343F614DB2B7%40americanefficient.com This mi

Re: psql removes dashed comments

2022-04-07 Thread Boris Zentner
> I was wondering why psql loose dashed comments and what can be done about > this misbehaviour. > > postgres=# \e > > > Because \e treats the query buffer as a single line of code and dashed > comments cannot be used, just like meta-commands cannot be used. > > Including a filename should es

Re: psql removes dashed comments

2022-04-07 Thread David G. Johnston
On Thursday, April 7, 2022, Boris Zentner wrote: > Hi, > > I was wondering why psql loose dashed comments and what can be done about > this misbehaviour. > > # start psql, paste something run it, edit \e, rerun and so on. At the end > all dashed comments are removed. > > > psql -Xe postgres > psq

Re: psql removes dashed comments

2022-04-07 Thread David G. Johnston
On Thursday, April 7, 2022, Boris Zentner wrote: > > I was wondering why psql loose dashed comments and what can be done about > this misbehaviour. > > postgres=# \e > > Because \e treats the query buffer as a single line of code and dashed comments cannot be used, just like meta-commands cannot

Re: psql removes dashed comments

2022-04-07 Thread Adrian Klaver
On 4/7/22 11:25, Boris Zentner wrote: Hi, I was wondering why psql loose dashed comments and what can be done about this misbehaviour. See this recent thread: https://www.postgresql.org/message-id/265623A4-F304-4E68-90D0-343F614DB2B7%40americanefficient.com -- Boris -- Adrian Klav

psql removes dashed comments

2022-04-07 Thread Boris Zentner
Hi, I was wondering why psql loose dashed comments and what can be done about this misbehaviour. I get often some sql, paste it into psql run and edit it via \e. A few iterations until everything works. But psql removes the comments and creates a lot extra work to restore the comments and chan

Re: Resources on modeling ordered hierachies?

2022-04-07 Thread Rob Sargent
On 4/7/22 10:55, Peter J. Holzer wrote: On 2022-04-07 17:45:49 +1200, Tim Uckun wrote: There a tons of articles about how to model hierarchies in SQL but I haven't seen any about dealing with hierarchies where the order of children is important. The canonical example is a simple outline 1. 1.1

Re: Resources on modeling ordered hierachies?

2022-04-07 Thread Peter J. Holzer
On 2022-04-07 17:45:49 +1200, Tim Uckun wrote: > There a tons of articles about how to model hierarchies in SQL but I > haven't seen any about dealing with hierarchies where the order of > children is important. > > The canonical example is a simple outline > > 1. > 1.1 > 1.1.1 > 1.2 > 2. > 2.1 >

Re: What have I done!?!?!? :-)

2022-04-07 Thread Jan Wieck
On 4/6/22 18:25, Perry Smith wrote: Rather than explain how I got here, I’ll just explain the state I’m in. ... I’m using Active Record with the psql adapter.  It has a disable_referential_integrity which takes a block of code.  When the block of code exists, the constraints are put back.  At

Re: Reg. GET STACKED DIAGNOSTICS values to be stored in a single variable

2022-04-07 Thread Pavel Stehule
Hi čt 7. 4. 2022 v 11:58 odesílatel Maheswaran R napsal: > Sir/madam, > While exception handling, we have to write multiple repeated lines in each > function to handle the GET STACKED DIAGNOSTICS values. it would be better > if all items in the diagnostics may be assigned to a single > variable/

Reg. GET STACKED DIAGNOSTICS values to be stored in a single variable

2022-04-07 Thread Maheswaran R
Sir/madam, While exception handling, we have to write multiple repeated lines in each function to handle the GET STACKED DIAGNOSTICS values. it would be better if all items in the diagnostics may be assigned to a single variable/object. at least like GET STACKED DIAGNOSTICS v_state := RETURNED_SQL