Hi. I've recently realized via a post (or article?) from Laurenz that the
PUBLIC role has CREATE privilege on the 'public' schema by default (see
query below). I guess it can't be avoided?
OK, then I'll REVOKE that privilege when creating a new DB.
Like I already revoked the default CONNECT to PUB
## Dominique Devienne (ddevie...@gmail.com):
> Hi. I've recently realized via a post (or article?) from Laurenz that the
> PUBLIC role has CREATE privilege on the 'public' schema by default (see
> query below). I guess it can't be avoided?
You could just use PostgreSQL 15:
https://www.postgresql.
That’s excellent Chris, thanks very much for doing that. Concise, informative
and targeted. Is there a mailing list for updates?
--
Tim Clarke BSc (Hons), MBCS
IT Director
Direct: +44 (0)1376 504510 | Mobile: +44 (0)7887 563420
From: Chris Travers
Sent: Thursday, March 9, 2023 3:24 AM
To: pgsql-
Hi List
I like to use crosstab to pivot a long list of rows into columns, however the
column labels are created dynamically with the resulting column type known.
Is there a way pass a list of names and types to crosstab (‘query’) as (<‘type
list as strings in array’> ) ?
In other words,
Can I pa
On Thu, 2023-03-09 at 10:34 +0100, Dominique Devienne wrote:
> Hi. I've recently realized via a post (or article?) from Laurenz that the
> PUBLIC
> role has CREATE privilege on the 'public' schema by default (see query below).
> I guess it can't be avoided?
It can be avoided if you connect to "te
On Wednesday, March 8, 2023, Rosebrock, Uwe (Environment, Hobart) <
uwe.rosebr...@csiro.au> wrote:
> Hi List
>
> I like to use crosstab to pivot a long list of rows into columns, however
> the column labels are created dynamically with the resulting column type
> known.
>
>
>
> Is there a way pass
Hello all!
can you help, i need to write a query that displays column name with his
data type that have maximum bytes length in row for every table in database:
for example, for table employees with data:
emp_id, emp_name, emp_dept, emp_surname
1 alexey 2trew
On Thu, Mar 9, 2023 at 2:13 PM Laurenz Albe
wrote:
Hi,
On Thu, 2023-03-09 at 10:34 +0100, Dominique Devienne wrote:
> > Hi. I've recently realized via a post (or article?) from Laurenz that
> the PUBLIC
> > role has CREATE privilege on the 'public' schema by default (see query
> below).
> > I gu
> david.g.johns...@gmail.com wrote:
>
>> b...@yugabyte.com wrote:
>>
>> r := (my_c1, my_c2)::s.t;
>>
>> If you write s.x there it will also work.
>
> Your first and third assignments are identical in syntax/nature. These are
> both the first examples here[1]
>
> Yes, the behavior of INTO
On Thu, Mar 9, 2023 at 12:46 PM Bryn Llewellyn wrote:
> «
> SELECT select_expressions INTO [STRICT] target FROM …;
>
> where target can be a record variable, a row variable, or a
> comma-separated list of simple variables and record/row fields.
> »
>
> In plain English, the "into" target cannot b
Dear Members!
I'm searching for a simple solution, like this:
select GetIDForThisSelect(1, 1) as UID, * from anytablehasdoublestringkey
join othertablehasnotuniqueintegerkey ...
where
Ok, I can make a sequence, but I don't want to use persistent data.
It is enough to get 1...N as UID for th
Hi,
Is it something like row_number() you want?
https://www.postgresql.org/docs/current/functions-window.html
KR
Mikael
Från: Durumdara
Skickat: den 10 mars 2023 8:12
Till: Postgres General
Ämne: Onfly, function generated ID for Select Query
Dear Members!
I'm
Dear Members!
I use the subselects many times in my Queries to get some info (Name, etc)
from a subtable.
Sometimes I have to use it to get the last element.
select t.*,
(
select value from u join ... where ...
order by id desc limit 1
) as last_value,
It is ok, but how can I get more
Dear Mikael!
Wow... that is it!
Thank you!
SELECT product_id, product_name, group_id, ROW_NUMBER () OVER (ORDER BY
product_id) FROM products;
Does this mean that I have to duplicate the order by clause?
SELECT product_id, product_name, group_id, ROW_NUMBER ()
OVER (*ORDER BY product_id
No, the result will be ordered by the window functions order clause so no
additional ordering is nessesary.
You can try this by changing it to OVER(ORDER BY product_name)
KR
Mikael
Från: Durumdara
Skickat: den 10 mars 2023 08:41:06
Till: Gustavsson Mikael
Kopi
15 matches
Mail list logo