El vie, 21 ene 2022 a las 5:04, Michael Lewis ()
escribió:
> When dealing with foreign tables, I believe planning is not the same
> because of access to statistics (maybe has improved since 9.6 though). I
> just wonder... Would it be a viable option to create a materialized view
> using the FDW
When dealing with foreign tables, I believe planning is not the same
because of access to statistics (maybe has improved since 9.6 though). I
just wonder... Would it be a viable option to create a materialized view
using the FDW but then use the PHP script against the local tables only?
On Thu, Jan 20, 2022 at 4:34 PM David G. Johnston <
david.g.johns...@gmail.com> wrote:
> On Thu, Jan 20, 2022 at 4:32 PM Ken Tanzer wrote:
>
>>
>>
>> On Thu, Jan 20, 2022 at 8:46 AM David G. Johnston <
>> david.g.johns...@gmail.com> wrote:
>>
>>> You can always write:
>>>
>>> CREATE VIEW
On Thu, Jan 20, 2022 at 4:32 PM Ken Tanzer wrote:
>
>
> On Thu, Jan 20, 2022 at 8:46 AM David G. Johnston <
> david.g.johns...@gmail.com> wrote:
>
>> You can always write:
>>
>> CREATE VIEW cte_view AS
>> WITH cte AS (...)
>> SELECT * FROM cte;
>>
>> And then incorporate that into any queries
On Thu, Jan 20, 2022 at 8:46 AM David G. Johnston <
david.g.johns...@gmail.com> wrote:
> You can always write:
>
> CREATE VIEW cte_view AS
> WITH cte AS (...)
> SELECT * FROM cte;
>
> And then incorporate that into any queries that require the results of
> said CTE.
>
>
Is there any advantage to
On 1/20/22 12:35, Shaozhong SHI wrote:
Added. But only head of columns appeared.
Best guess is there is no data in table.
Do:
select count(*) from boundaryline.scotland_and_wales_const_region;
Any way to visualise?
Regards, David
On Thursday, 20 January 2022, Rob Sargent
On Thu, Jan 20, 2022 at 1:35 PM Shaozhong SHI
wrote:
> Added. But only head of columns appeared.
Then the table is probably empty...
Any way to visualise?
>
Visualize what? You do realize that psql is a text-based application,
right?
David J.
Added. But only head of columns appeared.
Any way to visualise?
Regards, David
On Thursday, 20 January 2022, Rob Sargent wrote:
> On 1/20/22 10:54, Shaozhong SHI wrote:
>
> I do not know what happened.
>
> psql does not provide proper response anymore.
>
> I typed the following and see
On Thu, Jan 20, 2022 at 10:55 AM Shaozhong SHI
wrote:
> I do not know what happened.
>
> psql does not provide proper response anymore.
>
> I typed the following and see nothing.
>
> user=# select * from boundaryline.scotland_and_wales_const_region
> user-#
>
> Can anyone enlighten me?
>
>
You
čt 20. 1. 2022 v 19:50 odesílatel Bryn Llewellyn napsal:
> > shishaozh...@gmail.com wrote:
> >
> > I do not know what happened.
> >
> > psql does not provide proper response anymore.
> >
> > I typed the following and see nothing.
> >
> > user=# select * from
On Thu, Jan 20, 2022 at 11:36 AM Garfield Lewis
wrote:
> The following knows there is no CTID so shouldn’t I be able to get
> something similar programmatically?
>
> [sysprog@nucky lz_pgmod] (h-master-LZRDB-4714)*$ psql -U postgres -d
> postgres -c "select ctid, 'test'"
> ERROR: column "ctid"
> shishaozh...@gmail.com wrote:
>
> I do not know what happened.
>
> psql does not provide proper response anymore.
>
> I typed the following and see nothing.
>
> user=# select * from boundaryline.scotland_and_wales_const_region
> user-#
>
> Can anyone enlighten me?
This happens to me all
On 2022-01-20, 1:11 PM, "Tom Lane" wrote:
>No, it's the same problem in reverse: the output function cannot
>know where the value came from. There is no hard and fast
>reason that it must have come out of a table, either. Consider
>something as simple as
>
> SELECT 'blah
Garfield Lewis writes:
> I think you are right in the case of INPUT/RECEIVE, however we should be able
> to get that info during OUTPUT/SEND (I think) since it is fixed at that
> point. At the time I return the information to the user I could augment the
> output to add that information to the
> On 2022-01-20, 12:52 PM, "Tom Lane" wrote:
>
>Garfield Lewis writes:
>> I need the page and possibly row of the data location to be stored as an
> element of the new type. This is to simulate a structure from another
> database system.
>
>You need to rethink. The datatype input
Ekaterina Amez writes:
> I've tested the query with psql and DBeaver and it takes only milliseconds:
> it returns 39 records and now there's only 16000 records on the table but
> I've tested it with <100K. When I've tested my php script the same query
> takes 14 minutes to return (more or less).
On 1/20/22 10:54, Shaozhong SHI wrote:
I do not know what happened.
psql does not provide proper response anymore.
I typed the following and see nothing.
user=# select * from boundaryline.scotland_and_wales_const_region
user-#
Can anyone enlighten me?
Regards,
David
Add semi-colon return?
I do not know what happened.
psql does not provide proper response anymore.
I typed the following and see nothing.
user=# select * from boundaryline.scotland_and_wales_const_region
user-#
Can anyone enlighten me?
Regards,
David
Garfield Lewis writes:
> I need the page and possibly row of the data location to be stored as an
> element of the new type. This is to simulate a structure from another
> database system.
You need to rethink. The datatype input function cannot know even that
the value is going to be stored
On Thu, 20 Jan 2022 at 21:29, Duarte Carreira wrote:
> Hello everyone.
>
> I don't know... realistically what do you guys see as a best/simple
> approach?
>
We implemented a custom sharding (directory sharding with lookup tables)
layer of 10 shards, but it was write local, read global.
the api
A CTID is a special column documented here:
https://www.postgresql.org/docs/12/ddl-system-columns.html
Regards,
Garfield
Hi Laurenz,
I need the page and possibly row of the data location to be stored as an
element of the new type. This is to simulate a structure from another database
system.
Regards,
Garfield
On Thu, Jan 20, 2022 at 7:42 AM Avi Weinberg wrote:
>
>
> Thanks David for the reply, but my question was a little different.
>
> I know I can have multiple CTE queries like you showed, but I want to
> have one single WITH query, and use it in multiple queries, not just by one
> query the
Hello everyone.
I got here after encountering the same difficulty, although on a much more
mundane scenario.
I'm used to fdw on a read-only basis. I was just inserting a new record on
a foreign table and got blocked... and after much searching got here.
Not to rant or anything, but I am
On 20/01/2022 15.42, Avi Weinberg wrote:
Thanks David for the reply, but my question was a little different.
I know I can have multiple CTE queries like you showed, but I want to
have one single WITH query, and use it in multiple queries, not just by
one query the directly proceed the CTE.
čt 20. 1. 2022 v 13:48 odesílatel Avi Weinberg napsal:
>
> Hi,
Hello!
>
>
> Can I have multiple select statements using one WITH statement?
>
>
>
> WITH t AS (
>
> Select A, B from …
>
> )
>
> SELECT A into tableA FROM t where ….;
>
>
>
> SELECT B into tableB FROM t where ….;
>
I think it is
Thanks David for the reply, but my question was a little different.
I know I can have multiple CTE queries like you showed, but I want to have one
single WITH query, and use it in multiple queries, not just by one query the
directly proceed the CTE.
Why do I need to execute the CTE query twice
Hi,
After receiving an Unknown Address error with *pgsql-...@postgresql.org* I've
discovered this mailing list is catalogued as Inactive, so I'm sending my
question to this list.
I've made a php cli script that downloads a file from FTP, loads it in a
table and compares against the same table in
Paul van der Linden writes:
> during maintenance I saw a lot of lines in my postgreslog saying:
> CONTEXT: SQL function "line_function" during inlining
> automatic analyze of table "osm.planet_osm_line"
> ERROR: operator does not exist: public.hstore -> unknown at character 45
It
On Thursday, January 20, 2022, Avi Weinberg wrote:
> Hi,
>
>
>
> Can I have multiple select statements using one WITH statement?
>
>
>
> WITH t AS (
>
> Select A, B from …
>
> )
>
> SELECT A into tableA FROM t where ….;
>
>
>
> SELECT B into tableB FROM t where ….;
>
>
> With q1 as (), q2 as
Hi,
Can I have multiple select statements using one WITH statement?
WITH t AS (
Select A, B from ...
)
SELECT A into tableA FROM t where ;
SELECT B into tableB FROM t where ;
IMPORTANT - This email and any attachments is intended for the above named
addressee(s), and may contain
On Wed, Jan 19, 2022 at 1:39 PM Garfield Lewis
wrote:
>
> Hi,
>
>
>
> I am creating a new type and would like to know if it was possible to access
> the CTID for the row affected by the INPUT and RECEIVE functions of the new
> type? Actually, would it be possible from the OUTPUT and SEND
Hi,
during maintenance I saw a lot of lines in my postgreslog saying:
CONTEXT: SQL function "line_function" during inlining
automatic analyze of table "osm.planet_osm_line"
ERROR: operator does not exist: public.hstore -> unknown at character 45
HINT: No operator matches the given name
On Wed, 2022-01-19 at 19:38 +, Garfield Lewis wrote:
> I am creating a new type and would like to know if it was possible to access
> the CTID for the row affected by the INPUT and RECEIVE functions of the new
> type?
> Actually, would it be possible from the OUTPUT and SEND functions as
34 matches
Mail list logo