A
A
Alexander2019-10-29 17:18:56
PostgreSQL
Alexander, 2019-10-29 17:18:56

Why is pgadmin yelling at dblink?

Hello!
I want to access the test_1 database via dblink from the test_2 database and get data from there. Well, at least some for starters.
I am writing a query like
select * from dblink (
'host=localhost user=postgres password=NeProstoParolAParolishe dbname=test_1',
'select * from v8users'
) as users (
rolesid numeric(10)
);
And he yells:
ERROR: remote query result rowtype does not match the specified FROM clause rowtype
SQL state: 42804
5db84a34554c1826314722.png
What doesn't he like?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Melkij, 2019-10-29
@Dem0lisher

You asked for select *, then you said that the records returned by the function correspond in structure to a single field of type numeric.
Everything in the truest sense

query result rowtype does not match the specified FROM clause rowtype

pgadmin has nothing to do with it, postgresql itself is naturally surprised at the request

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question