st 8. 3. 2023 v 22:29 odesílatel Bryn Llewellyn napsal:
> t...@sss.pgh.pa.us wrote:
>
> david.g.johns...@gmail.com wrote:
>
> So I found where this difference in behavior is at least explicitly noted:
>
> /*
> * If it's a named composite type (or domain over one), find the typcache
> * entry and
On Wed, Mar 8, 2023 at 7:58 PM Bryn Llewellyn 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 in the second assignment is s
Hi all;
I have been writing a few blog posts trying to shed some light on the
development process of PostgreSQL , what's coming and what I hope we see
more of.
I would be very much interested in feedback as to whether people
(particularly non-Postgres contributors) find this useful or not.
The l
> t...@sss.pgh.pa.us wrote:
>
>> b...@yugabyte.com writes:
>>select (17, 42)::s.t2 into r2;
>> [ doesn't work ]
>
> This would work as
>
> select 17, 42 into r2;
>
> In general, SELECT INTO with a composite target expects to see a source
> column per target field. If you want to assign a
Bryn Llewellyn writes:
> select (17, 42)::s.t2 into r2;
> [ doesn't work ]
This would work as
select 17, 42 into r2;
In general, SELECT INTO with a composite target expects to see
a source column per target field. If you want to assign a
composite value to the whole target, don't use
On Wed, Mar 8, 2023 at 5:41 PM Bryn Llewellyn wrote:
>
> select (((17, 42)::s.t2)::text)::s.t2 into r2;
>
> then I'm back to the same 22P02 error:
>
> invalid input syntax for type integer: "(17,42)"
>
>
Single quotes. SELECT '(17,42)'::s.t2;
David J.
I have a horrible feeling that I'm missing the blindingly obvious here. But I
can't spot it. Help!
This simple setup produces the expected result:
create type s.t1 as (c1 text, c2 text);
select ('cat', 'dog')::s.t1;
This is the result:
(cat,dog)
create type s.t2 as (c1 int, c2 int);
select
On 3/8/23 15:29, Bryn Llewellyn wrote:
[snip]
create table s.t(k int primary key, c1 int, c2 int, c3 int);
insert into s.t(k, c1, c2, c3) values(1, 17, 42, 57);
create type s.x as (c1 int, c2 int, c3 int);
[snip]
This is an excellent analysis.
Native PG doesn't provide much metadata or tool
> t...@sss.pgh.pa.us wrote:
>
>> david.g.johns...@gmail.com wrote:
>>
>> So I found where this difference in behavior is at least explicitly noted:
>>
>> /*
>> * If it's a named composite type (or domain over one), find the typcache
>> * entry and record the current tupdesc ID, so we can detect
Thanks Tom. found the problem.
On Tue, Mar 7, 2023 at 8:28 PM Tom Lane wrote:
> Siddharth Jain writes:
> > But when I try to start the server I get this:
>
> > 2023-03-07 17:16:43.228 PST [25925] LOG: could not bind IPv6 address
> > "::1": Address already in use
> > 2023-03-07 17:16:43.228 PST
10 matches
Mail list logo