Title: crosstab
Hi I have looked into the tablefunc / crosstab contrib for postgres and it appears like it can't perform what I need.
The crosstab function converts this :
row_name cat value
--+---+---
row1 cat1 val1
THeo,
> I have tried using unions or subselects however the table is quite large
> and it takes far too long to run. The most efficient way would be to create
> a stored proc that uses a cursor to loop through the table transforming the
> data into the new table structure. However I would apprecia
Hello there,
i have a short question ...
I have a few tables (at the moment "only" 3 for testing), over which
will by made a query in this form:
SELECT
a.orderitem_id,
a.transaction_id,
a.order_id,
a.shop_id,
a.quantity,
a.price,
b.affiliat
Hi,
Tom Lane schrieb:
> [ experiments... ] This works reliably in 7.4 and up. Before that,
> the optimizer didn't make the connection between the sort ordering of
> the inner query and that needed by the outer, so it would repeat the
> sort step using only key1 and very possibly destroy the key2
Hi,
If you are moving from Postgres to MS SQL you will most likely will find
that you can not recreate your PostgreSQL FK to MSSQL FK because this
enterprise class database will NOT allow you to create all 3 FK which are
exist in your PGSQL:
table users(user_id PK)
table journal(created_by, mod
Hello,
I am trying to insert the following record:
INSERT INTO item (name,retail_price) VALUES ('Cheese Soufflé',7.95,);
(I presume you see the accented character in *Soufflé*)
psql comes back with "invalid byte sequence for encoding "UNICODE": 0xe9"
If I do this via DbVisualizer, the record is in
> Not always, AFAICT. The four most common reasons why PG tests slower
> than Mysql are:
> 1. You haven't configured or have misconfigured PostgreSQL.
> 2. You are testing a MySQL-tuned application (lots of small, simple
> queries, no views, no subselects etc)
> 3. You are only testing one connec
foreign keys and primary keys have to be defined as unique at the table /
column level if you want to implement a check constraint -- your contrived
example doesn't stand up all that well -- If you want to use constraints --
then your database schema should conform to traditional RDBMS theory a